From b4d8479086e6137cadfb529cd49eb6b62451e04d Mon Sep 17 00:00:00 2001 From: Hendrik Mennen Date: Fri, 1 Mar 2024 12:25:32 +0100 Subject: [PATCH] init --- .github/workflows/publish.yml | 64 ++++++++++++++++++ .github/workflows/test.yml | 32 +++++++++ .gitignore | 7 ++ Extension.md | 5 ++ Icon.png | Bin 0 -> 6757 bytes License.md | 20 ++++++ OneWare.Quartus.sln | 46 +++++++++++++ README.md | 8 +++ oneware-extension.json | 48 +++++++++++++ src/OneWare.Quartus/OneWare.Quartus.csproj | 22 ++++++ src/OneWare.Quartus/OneWareQuartusModule.cs | 33 +++++++++ src/OneWare.Quartus/oneware.json | 9 +++ .../OneWare.Quartus.UnitTests.csproj | 22 ++++++ .../OneWareQuartusTests.cs | 14 ++++ 14 files changed, 330 insertions(+) create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/test.yml create mode 100644 .gitignore create mode 100644 Extension.md create mode 100644 Icon.png create mode 100644 License.md create mode 100644 OneWare.Quartus.sln create mode 100644 README.md create mode 100644 oneware-extension.json create mode 100644 src/OneWare.Quartus/OneWare.Quartus.csproj create mode 100644 src/OneWare.Quartus/OneWareQuartusModule.cs create mode 100644 src/OneWare.Quartus/oneware.json create mode 100644 tests/OneWare.Quartus.UnitTests/OneWare.Quartus.UnitTests.csproj create mode 100644 tests/OneWare.Quartus.UnitTests/OneWareQuartusTests.cs diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..5c76368 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,64 @@ +name: Publish + +on: + workflow_dispatch: + release: + types: + - published + +jobs: + build: + strategy: + matrix: + target: ["win-x64", "linux-x64", "osx-x64", "osx-arm64"] + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + - name: Get Version + uses: kzrnm/get-net-sdk-project-versions-action@v1.3.0 + id: get-version + with: + proj-path: src/OneWare.Quartus/OneWare.Quartus.csproj + - name: Build ${{ matrix.target }} + run: dotnet build src/OneWare.Quartus/OneWare.Quartus.csproj -c Release -r ${{ matrix.target }} -o publish + - name: Compress ${{ matrix.target }} + uses: thedoctor0/zip-release@0.7.1 + with: + type: 'zip' + filename: ../OneWare.QuartusExtension_${{steps.get-version.outputs.version}}_${{ matrix.target }}.zip + directory: ./publish + - uses: actions/upload-artifact@v3 + with: + name: OneWare.QuartusExtension_${{ matrix.target }} + if-no-files-found: error + retention-days: 5 + path: ./OneWare.QuartusExtension_${{steps.get-version.outputs.version}}_${{ matrix.target }}.zip + + release: + runs-on: ubuntu-latest + permissions: + contents: write + needs: [ build ] + steps: + - uses: actions/checkout@v3 + - name: Get Version + uses: kzrnm/get-net-sdk-project-versions-action@v1.3.0 + id: get-version + with: + proj-path: src/OneWare.Quartus/OneWare.Quartus.csproj + - uses: actions/download-artifact@v3 + with: + path: ./artifacts + - uses: ncipollo/release-action@v1 + with: + artifacts: "artifacts/**/*.zip" + tag: ${{steps.get-version.outputs.version}} + allowUpdates: true \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..0ec8206 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + - name: Workload Restore + run: dotnet workload restore + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e5436d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +native_tools/ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ +.idea diff --git a/Extension.md b/Extension.md new file mode 100644 index 0000000..666062b --- /dev/null +++ b/Extension.md @@ -0,0 +1,5 @@ +![Icon](https://raw.githubusercontent.com/one-ware/OneWare.Quartus/main/Icon.png) + +### Get Started + +> This text will be visible in the builtin package manager diff --git a/Icon.png b/Icon.png new file mode 100644 index 0000000000000000000000000000000000000000..cbbd534b50728c8a9932e48c62ab5a69d0edb883 GIT binary patch literal 6757 zcmZu$c{o&G+`nTiS;v+&hLnA4L&%K1lCA8!B0Ckbg(0&2vSi-}m8~pe&o+^ib+U$p z6qCp<%glI>_x<<1&oj@=Ip>~p&pC6xpXGbwj0|*{8Tc3=2x7i*UF$Xk!N5-#bcz;y z**q${e^TL!79Yx(pKOtq(<%}6WKPx&ZNvAtlOnv4~{1uaHi7w;W2e3s1+U!1tAart7&Jq*1# z!%fySwsKhZ7h?)l@7plr|B54VWt!A3)bvKN7|ZJ#kyD?@M;=EPl|O!N`8?P@8#-6I z@;2|UQBRBFa>&siwdE&+U_$@zg}spZsj#ok;eBM0b(8m+W8IW2Drn2e_4e(N*h?-$ zH90wa69j_L@oA`F;f0>8X_lCK#{=1y{(*{yo0L1R zj3=O~_PuGTBmotLj;bnePd&ZRAmaAy3ib(2_ESJzE4iDVVXt=-Ie{6bDpGr8}P zUFA;dhf7g9-lu$aR>uEiL`Fs`QB>xgHh=Wk9`5|U6kU3|_4Czyd%ok-)V#vWR|e^> z&>_FMH}gsl4-E+pgfF*B+ce9k(NP9sV`EEB1%I0SK-WsEb}jINlvIDyf7qHDf}D(u z*As9_P$9RRzce5@ImeRo^4cDMYks(7$h;qm93Cwkgu!5M!-QFX>OEo!+o{vbloe}X zBf0mbNl@B`rR@S2Xu<_aoeV52YSC=S$S~=6dUodjYHMrdY(v%>mYm?JqWU=h_3vZ} zwPm;6ZcWx5pA@#QYkPN8??2mY{Jyg~bxBfK*s*DJA&{F|-7EHPv>|=Yix)2*1z8(D z^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*%tK~`-iSvOB0h-64utuK-Cry}uFcCkGps)dG=@Om@#rE6b^Lkl)Tu~S zk$6;2BFI1u|MVIjskZODDi597syZtoqUY=Dt9elC612Y%)4d-~L1aPHLAsX@U7VZ( z!*&8Lx)QJtN$2<+saStn8V_h|Yq#fTXHQl6t2TWBHtzUUY6Lwx*+r|Ci;r)5Kf#`K zSKcQemZddj*1JWZyFa> zQBlb$l_=coHbXH{t50aZ_oXU5c)ma7xC;Y= z@6d;d1qB7|fhYfy7r+Qj{$vVM+bR@5g^|443=MxQE|NobS9U#tLD@&QF-Bq)v})P; z`Hy6h@{8KuD&{Ks?5)oWIr#*PM{ou67*zfeRyWc*usKm8W>JhON$*bdur-~7vi+nDHO_%)w&8VFK>5X z=K;t-p4%gSxhHiz|GaH#B@?dxI$2Qe znGOBA|LTuB^LMo0f;93__Jw=TmJ@=?KEAw>I?}@S=7+cVYg&2uCr+aK(8|AKCZ!RF8AKwHy + + + 0.1 + net8.0 + enable + enable + true + true + false + + + + + + + + + + + + diff --git a/src/OneWare.Quartus/OneWareQuartusModule.cs b/src/OneWare.Quartus/OneWareQuartusModule.cs new file mode 100644 index 0000000..3a276f3 --- /dev/null +++ b/src/OneWare.Quartus/OneWareQuartusModule.cs @@ -0,0 +1,33 @@ +using OneWare.Essentials.Models; +using OneWare.Essentials.Services; +using OneWare.Essentials.ViewModels; +using Prism.Ioc; +using Prism.Modularity; + +namespace OneWare.Quartus; + +public class OneWareQuartusModule : IModule +{ + public void RegisterTypes(IContainerRegistry containerRegistry) + { + } + + public void OnInitialized(IContainerProvider containerProvider) + { + //This example adds a context menu for .vhd files + containerProvider.Resolve().RegisterConstructContextMenu(x => + { + if (x is [IProjectFile {Extension: ".vhd"} json]) + { + return new[] + { + new MenuItemViewModel("Hello World") + { + Header = "Hello World" + } + }; + } + return null; + }); + } +} \ No newline at end of file diff --git a/src/OneWare.Quartus/oneware.json b/src/OneWare.Quartus/oneware.json new file mode 100644 index 0000000..b90bbee --- /dev/null +++ b/src/OneWare.Quartus/oneware.json @@ -0,0 +1,9 @@ +{ + "Dependencies": [ + { + "Name": "OneWare.Essentials", + "MinVersion": "0.1.0.0", + "MaxVersion": "0.1.0.0" + } + ] +} \ No newline at end of file diff --git a/tests/OneWare.Quartus.UnitTests/OneWare.Quartus.UnitTests.csproj b/tests/OneWare.Quartus.UnitTests/OneWare.Quartus.UnitTests.csproj new file mode 100644 index 0000000..66405d5 --- /dev/null +++ b/tests/OneWare.Quartus.UnitTests/OneWare.Quartus.UnitTests.csproj @@ -0,0 +1,22 @@ + + + + net8.0 + Library + False + True + False + True + enable + + + + + + + + + + + + diff --git a/tests/OneWare.Quartus.UnitTests/OneWareQuartusTests.cs b/tests/OneWare.Quartus.UnitTests/OneWareQuartusTests.cs new file mode 100644 index 0000000..8dea010 --- /dev/null +++ b/tests/OneWare.Quartus.UnitTests/OneWareQuartusTests.cs @@ -0,0 +1,14 @@ +using Xunit; + +namespace OneWare.Quartus.UnitTests; + +public class OneWareQuartusTests +{ + //Add your unit tests here + + [Fact] + public void LoadLibrary() + { + Assert.True(true); + } +} \ No newline at end of file