Added ARM64 build for Windows #177
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build | |
env: | |
BuildDir: ./bld | |
ScriptDir: ./scripts | |
SrcDir: ./src | |
Product: Mzinga | |
BinDir: ./src/Mzinga/bin | |
SolutionFile: ./src/Mzinga.sln | |
on: | |
push: | |
branches: | |
- main | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
ci_build_and_test: | |
name: CI Build and Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
configuration: [Debug, Release] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build Solution | |
run: dotnet build -v d --configuration ${{ matrix.configuration }} ${{ env.SolutionFile }} | |
- name: Test Solution | |
run: dotnet test --configuration ${{ matrix.configuration }} --no-build ${{ env.SolutionFile }} | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.configuration }}Binaries | |
path: ${{ env.BinDir }}/${{ matrix.configuration }}/net6.0 | |
ci_build_windows: | |
name: CI Windows Build | |
runs-on: windows-latest | |
needs: ci_build_and_test | |
strategy: | |
matrix: | |
target: [Unpacked, WinX86, WinX64, WinArm64] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build ${{ matrix.target }} | |
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1 | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.Product }}.${{ matrix.target }} | |
path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.zip | |
ci_build_windows_setup: | |
name: CI Windows Setup Build | |
runs-on: windows-latest | |
needs: ci_build_and_test | |
env: | |
Product: MzingaViewer | |
strategy: | |
matrix: | |
target: [WinX86.Setup, WinX64.Setup] | |
steps: | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build ${{ matrix.target }} | |
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1 | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.Product }}.${{ matrix.target }} | |
path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}/${{ env.Product }}.${{ matrix.target }}.msi | |
ci_build_windows_winstore: | |
name: CI Windows WinStore Build | |
runs-on: windows-latest | |
needs: ci_build_and_test | |
env: | |
Product: MzingaViewer | |
CertFile: src\Mzinga.Viewer.WinStore\Mzinga.Viewer.WinStore_TemporaryKey.pfx | |
strategy: | |
matrix: | |
target: [WinStore] | |
steps: | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create Code Signing Certificate | |
run: | | |
Set-Content -Path cert.txt -Value '${{ secrets.WINSTORE_PFX }}' | |
certutil -decode cert.txt ${{ env.CertFile }} | |
Remove-Item cert.txt | |
- name: Build ${{ matrix.target }} | |
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1 | |
- name: Cleanup Code Signing Certificate | |
if: always() | |
run: | | |
Remove-Item ${{ env.CertFile }} | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.Product }}.${{ matrix.target }} | |
path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }} | |
ci_build_linux: | |
name: CI Linux Build | |
runs-on: ubuntu-latest | |
needs: ci_build_and_test | |
strategy: | |
matrix: | |
target: [Linux] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build ${{ matrix.target }} | |
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1 | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.Product }}.${{ matrix.target }} | |
path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.tar.gz | |
ci_build_macos: | |
name: CI MacOS Build | |
runs-on: macOS-latest | |
needs: ci_build_and_test | |
strategy: | |
matrix: | |
target: [MacOS] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build ${{ matrix.target }} | |
run: ${{ env.ScriptDir }}/Build${{ matrix.target }}.ps1 | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.Product }}.${{ matrix.target }} | |
path: ${{ env.BuildDir }}/${{ env.Product }}.${{ matrix.target }}.tar.gz |