Fix InvalidCastException when wrapping TabbedPage/NavigationPage in browser target #917
Workflow file for this run
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: CICD | |
| on: | |
| push: | |
| branches: [ "main", "release/*" ] | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| check-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| maui-changes: ${{ steps.filter.outputs.maui == 'true' || startsWith(github.ref, 'refs/heads/release/') }} | |
| test-changes: ${{ steps.filter.outputs.test == 'true' || startsWith(github.ref, 'refs/heads/release/') }} | |
| build-changes: ${{ steps.filter.outputs.build == 'true' || startsWith(github.ref, 'refs/heads/release/') }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| continue-on-error: true | |
| with: | |
| filters: | | |
| maui: | |
| - 'src/Avalonia.Controls.Maui/**' | |
| - 'src/Avalonia.Controls.Maui.Compatibility/**' | |
| - 'src/Avalonia.Controls.Maui.Essentials/**' | |
| - 'src/Avalonia.Controls.Maui.SkiaSharp.Views/**' | |
| - 'Directory.*.props' | |
| - 'Directory.*.targets' | |
| - 'global.json' | |
| - 'build/**' | |
| test: | |
| - 'tests/Avalonia.Controls.Maui.*/**' | |
| - 'samples/BenchmarkApp/**' | |
| - 'Directory.*.props' | |
| - 'Directory.*.targets' | |
| - 'global.json' | |
| - 'build/**' | |
| build: | |
| - 'build/**' | |
| - '*.ps1' | |
| - '*.sh' | |
| - 'Directory.*.props' | |
| - 'Directory.*.targets' | |
| - 'global.json' | |
| build: | |
| needs: check-changes | |
| if: needs.check-changes.outputs.test-changes == 'true' || needs.check-changes.outputs.maui-changes == 'true' || needs.check-changes.outputs.build-changes == 'true' | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '11.0.x' | |
| dotnet-quality: 'preview' | |
| - name: Restore dotnet workloads | |
| run: | | |
| dotnet workload restore ${{github.workspace}}/Avalonia.Controls.Maui.slnx --source https://api.nuget.org/v3/index.json | |
| - name: Create NuGet Packages | |
| run: dotnet run --project ${{github.workspace}}/build/_build.csproj -- --target CreateNugetPackages --configuration Release --output ${{github.workspace}}/artifacts/packages/ | |
| - name: Upload nupkg artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nupkgs | |
| path: ${{github.workspace}}/artifacts/**/*.nupkg | |
| retention-days: 1 | |
| publish-nightly: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Download nupkg artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: nupkgs | |
| path: ${{github.workspace}}/artifacts | |
| - name: Push to nightly feed | |
| run: dotnet nuget push "${{github.workspace}}/artifacts/**/*.nupkg" --source "${{ vars.NIGHTLY_FEED_UPLOAD_URL }}" --api-key "${{ secrets.NIGHTLY_FEED_API_KEY }}" --skip-duplicate | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '11.0.x' | |
| dotnet-quality: 'preview' | |
| - name: Restore dotnet workloads | |
| run: | | |
| dotnet workload restore ${{github.workspace}}/Avalonia.Controls.Maui.slnx --source https://api.nuget.org/v3/index.json | |
| - name: Run Tests | |
| run: dotnet run --project ${{github.workspace}}/build/_build.csproj -- --target RunTests --configuration Release | |
| continue-on-error: false | |
| - name: Upload Test Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-results | |
| path: ${{github.workspace}}/artifacts/test-results/**/*.trx | |
| retention-days: 7 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev at-spi2-core | |
| - name: Run Benchmark Tests | |
| run: | | |
| xvfb-run dotnet run --project ${{github.workspace}}/samples/BenchmarkApp/BenchmarkApp.Desktop -- --run-all --output ${{github.workspace}}/artifacts/test-results/benchmark-results.xml | |
| continue-on-error: false | |
| - name: Upload Benchmark Results | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: benchmark-results | |
| path: ${{github.workspace}}/artifacts/test-results/benchmark-results.xml | |
| if-no-files-found: ignore | |
| retention-days: 7 | |
| - name: Upload Render Test Images | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: render-test-images | |
| path: | | |
| ${{github.workspace}}/tests/Avalonia.Controls.Maui.RenderTests/bin/Release/net11.0/*.out.png | |
| ${{github.workspace}}/tests/Avalonia.Controls.Maui.RenderTests/bin/Release/net11.0/*.diff.png | |
| if-no-files-found: ignore | |
| retention-days: 7 |