Add Avalonia apphost package test coverage #6
This file contains hidden or 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: build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| windows-hostlibs-x64: | |
| runs-on: windows-2025-vs2026 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| submodules: false | |
| - name: Initialize runtime submodule | |
| shell: powershell | |
| run: git submodule update --init --depth 1 repo/runtime | |
| - name: Build hostlibs for Windows x64 | |
| shell: powershell | |
| run: python .\scripts\build-hostlibs.py all -v --arch x64 | |
| - name: Upload hostlibs win-x64 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hostlibs-win-x64 | |
| path: artifacts\hostlibs\win-x64 | |
| if-no-files-found: error | |
| - name: Run matrix integration build | |
| shell: powershell | |
| run: python .\scripts\pipeline.py matrix -v | |
| windows-hostlibs-arm64: | |
| runs-on: windows-2025-vs2026 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| submodules: false | |
| - name: Initialize runtime submodule | |
| shell: powershell | |
| run: git submodule update --init --depth 1 repo/runtime | |
| - name: Build hostlibs for Windows arm64 | |
| shell: powershell | |
| run: python .\scripts\build-hostlibs.py all -v --arch arm64 | |
| - name: Upload hostlibs win-arm64 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hostlibs-win-arm64 | |
| path: artifacts\hostlibs\win-arm64 | |
| if-no-files-found: error | |
| windows-skia-x64: | |
| runs-on: windows-2025-vs2026 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| submodules: false | |
| - name: Initialize Skia dependencies submodules | |
| shell: powershell | |
| run: git submodule update --init --depth 1 repo/skia repo/depot_tools | |
| - name: Build SkiaSharp and HarfBuzz for Windows x64 | |
| shell: powershell | |
| run: python .\scripts\build-skia-harfbuzz.py -v -a x64 | |
| - name: Upload skiasharp-2.88.9 win-x64 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: skiasharp-2.88.9-win-x64 | |
| path: artifacts\skiasharp-2.88.9\win-x64 | |
| if-no-files-found: error | |
| windows-skia-arm64: | |
| runs-on: windows-2025-vs2026 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| submodules: false | |
| - name: Initialize Skia dependencies submodules | |
| shell: powershell | |
| run: git submodule update --init --depth 1 repo/skia repo/depot_tools | |
| - name: Build SkiaSharp and HarfBuzz for Windows arm64 | |
| shell: powershell | |
| run: python .\scripts\build-skia-harfbuzz.py -v -a arm64 | |
| - name: Upload skiasharp-2.88.9 win-arm64 | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: skiasharp-2.88.9-win-arm64 | |
| path: artifacts\skiasharp-2.88.9\win-arm64 | |
| if-no-files-found: error | |
| windows-pack-avalonia: | |
| runs-on: windows-2025-vs2026 | |
| needs: | |
| - windows-hostlibs-x64 | |
| - windows-hostlibs-arm64 | |
| - windows-skia-x64 | |
| - windows-skia-arm64 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| submodules: false | |
| - name: Download hostlibs win-x64 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: hostlibs-win-x64 | |
| path: artifacts\hostlibs\win-x64 | |
| - name: Download hostlibs win-arm64 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: hostlibs-win-arm64 | |
| path: artifacts\hostlibs\win-arm64 | |
| - name: Download skiasharp-2.88.9 win-x64 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: skiasharp-2.88.9-win-x64 | |
| path: artifacts\skiasharp-2.88.9\win-x64 | |
| - name: Download skiasharp-2.88.9 win-arm64 | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: skiasharp-2.88.9-win-arm64 | |
| path: artifacts\skiasharp-2.88.9\win-arm64 | |
| - name: Pack Avalonia apphost | |
| shell: powershell | |
| run: python .\scripts\pipeline.py pack-avalonia -v | |
| - name: Upload nuget packages | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-packages | |
| path: artifacts\packages\Release | |
| if-no-files-found: error | |
| - name: Run Avalonia App Host package tests | |
| shell: powershell | |
| run: dotnet test --project .\tests\HostForge.AvaloniaAppHost.Tests\HostForge.AvaloniaAppHost.Tests.csproj -c Release -v:normal | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| submodules: recursive | |
| - name: Install runtime native dependencies | |
| working-directory: ./repo/runtime | |
| run: sudo ./eng/common/native/install-dependencies.sh linux | |
| - name: Build hostlibs for Linux x64 | |
| run: python ./scripts/build-hostlibs.py -v --os linux --arch x64 | |
| - name: Run SimplePInvoke sample | |
| run: ./repo/runtime/.dotnet/dotnet run --project samples/simple-pinvoke/SimplePInvoke.csproj -v:normal | |
| - name: Publish SimplePInvoke sample trimmed | |
| run: ./repo/runtime/.dotnet/dotnet publish samples/simple-pinvoke/SimplePInvoke.csproj -v:normal -p:"PublishTrimmed=true" |