Improve CI workflow performance #428
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: CI | |
| on: [push, pull_request] | |
| env: | |
| CONFIGURATION: Release | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| jobs: | |
| build: | |
| runs-on: windows-2025 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: .NET 10.0 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: NuGet Cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.nuget/packages | |
| key: nuget-${{ hashFiles('**/*.csproj', '**/Directory.Build.props', '**/Versions.props') }} | |
| restore-keys: nuget- | |
| - name: Build | |
| run: | | |
| try { | |
| .\build.ps1 -Configuration ${{ env.CONFIGURATION }} | |
| exit $LASTEXITCODE | |
| } | |
| catch { | |
| echo $_ | |
| exit 1 | |
| } | |
| shell: powershell | |
| - name: Upload Build Output | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: build-output | |
| path: '.\\out\\' | |
| - name: Upload Test Binaries | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-binaries | |
| path: '.\\src\\**\\bin\\' | |
| test: | |
| needs: build | |
| runs-on: windows-2025 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Full coverage on FB50 (latest) | |
| - { FIREBIRD_SELECTION: FB50, TEST_SUITE: Tests-FirebirdClient-Default-Compression-CryptRequired } | |
| - { FIREBIRD_SELECTION: FB50, TEST_SUITE: Tests-FirebirdClient-Default-NoCompression-CryptRequired } | |
| - { FIREBIRD_SELECTION: FB50, TEST_SUITE: Tests-FirebirdClient-Default-Compression-CryptDisabled } | |
| - { FIREBIRD_SELECTION: FB50, TEST_SUITE: Tests-FirebirdClient-Default-NoCompression-CryptDisabled } | |
| - { FIREBIRD_SELECTION: FB50, TEST_SUITE: Tests-FirebirdClient-Embedded } | |
| - { FIREBIRD_SELECTION: FB50, TEST_SUITE: Tests-EFCore } | |
| - { FIREBIRD_SELECTION: FB50, TEST_SUITE: Tests-EFCore-Functional } | |
| - { FIREBIRD_SELECTION: FB50, TEST_SUITE: Tests-EF6 } | |
| # Compatibility check on FB40 | |
| - { FIREBIRD_SELECTION: FB40, TEST_SUITE: Tests-FirebirdClient-All } | |
| - { FIREBIRD_SELECTION: FB40, TEST_SUITE: Tests-EFCore } | |
| - { FIREBIRD_SELECTION: FB40, TEST_SUITE: Tests-EF6 } | |
| # Compatibility check on FB30 | |
| - { FIREBIRD_SELECTION: FB30, TEST_SUITE: Tests-FirebirdClient-All } | |
| - { FIREBIRD_SELECTION: FB30, TEST_SUITE: Tests-EFCore } | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: .NET 10.0 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Download Test Binaries | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: test-binaries | |
| path: '.\\src\\' | |
| - name: Firebird Cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: 'C:\firebird' | |
| key: firebird-${{ matrix.FIREBIRD_SELECTION }} | |
| - name: Tests | |
| run: | | |
| try { | |
| $env:tests_firebird_dir = 'C:\firebird' | |
| .\tests.ps1 -Configuration ${{ env.CONFIGURATION }} -FirebirdSelection ${{ matrix.FIREBIRD_SELECTION }} -TestSuite ${{ matrix.TEST_SUITE }} | |
| exit $LASTEXITCODE | |
| } | |
| catch { | |
| echo $_ | |
| exit 1 | |
| } | |
| shell: powershell |