From 1e4104b150b4657ed1eab79c7da5d4abde2f468e Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Mon, 23 Mar 2026 00:18:41 -0300 Subject: [PATCH 1/6] build: remove unnecessary dotnet clean from build.ps1 On CI with a clean workspace, dotnet clean is redundant and wastes time. --- build.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 308363e27..9f00025ea 100644 --- a/build.ps1 +++ b/build.ps1 @@ -20,7 +20,6 @@ function Clean() { } function Build() { - dotnet clean "$baseDir\src\NETProvider.slnx" -c $Configuration -v m dotnet build "$baseDir\src\NETProvider.slnx" -c $Configuration -p:ContinuousIntegrationBuild=true -v m } From 88fb92ba9850c78c8edfe76c60c6eef2fb5a56cd Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Mon, 23 Mar 2026 00:19:12 -0300 Subject: [PATCH 2/6] ci: split into build + test jobs with NuGet cache - Single build job builds once and uploads artifacts (NuGet packages + test binaries) - Test jobs download pre-built binaries instead of rebuilding - Add NuGet package caching to speed up the build step - Eliminates 23 redundant builds from the 24-job matrix --- .github/workflows/ci.yml | 60 ++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7de7a822a..119602fbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,23 +7,25 @@ env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 jobs: - ci: + build: runs-on: windows-2025 - strategy: - fail-fast: false - matrix: - FIREBIRD_SELECTION: [FB30, FB40, FB50] - TEST_SUITE: [Tests-FirebirdClient-Default-Compression-CryptRequired, Tests-FirebirdClient-Default-NoCompression-CryptRequired, Tests-FirebirdClient-Default-Compression-CryptDisabled, Tests-FirebirdClient-Default-NoCompression-CryptDisabled, Tests-FirebirdClient-Embedded, Tests-EFCore, Tests-EFCore-Functional, Tests-EF6] - timeout-minutes: 120 + 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@v4 + with: + path: ~/.nuget/packages + key: nuget-${{ hashFiles('**/*.csproj', '**/Directory.Build.props', '**/Versions.props') }} + restore-keys: nuget- + - name: Build run: | try { @@ -36,6 +38,42 @@ jobs: } shell: powershell + - name: Upload Build Output + uses: actions/upload-artifact@v4 + with: + name: build-output + path: '.\\out\\' + + - name: Upload Test Binaries + uses: actions/upload-artifact@v4 + with: + name: test-binaries + path: '.\\src\\**\\bin\\' + + test: + needs: build + runs-on: windows-2025 + strategy: + fail-fast: false + matrix: + FIREBIRD_SELECTION: [FB30, FB40, FB50] + TEST_SUITE: [Tests-FirebirdClient-Default-Compression-CryptRequired, Tests-FirebirdClient-Default-NoCompression-CryptRequired, Tests-FirebirdClient-Default-Compression-CryptDisabled, Tests-FirebirdClient-Default-NoCompression-CryptDisabled, Tests-FirebirdClient-Embedded, Tests-EFCore, Tests-EFCore-Functional, Tests-EF6] + 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@v4 + with: + name: test-binaries + path: '.\\src\\' + - name: Tests run: | try { @@ -49,9 +87,3 @@ jobs: exit 1 } shell: powershell - - - name: Publish Artifacts - uses: actions/upload-artifact@v4 - with: - name: 'ci_${{ matrix.TEST_SUITE }}_${{ matrix.FIREBIRD_SELECTION }}_${{ env.CONFIGURATION }}' - path: '.\\out\\' From 13804553fd5f183fc218dc83f90849ef438e69d2 Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Mon, 23 Mar 2026 00:19:57 -0300 Subject: [PATCH 3/6] ci: cache Firebird server downloads between runs - Modify Prepare() to skip download/extract when Firebird is already cached - Remove directory deletion from Cleanup() (CI runners are ephemeral) - Add actions/cache step keyed by Firebird version - Saves download and extraction time on cache hits --- .github/workflows/ci.yml | 6 ++++++ tests.ps1 | 38 ++++++++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 119602fbd..51720d7ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,12 @@ jobs: name: test-binaries path: '.\\src\\' + - name: Firebird Cache + uses: actions/cache@v4 + with: + path: 'C:\firebird' + key: firebird-${{ matrix.FIREBIRD_SELECTION }} + - name: Tests run: | try { diff --git a/tests.ps1 b/tests.ps1 index 6af9ac102..7636563f0 100644 --- a/tests.ps1 +++ b/tests.ps1 @@ -47,21 +47,36 @@ function Prepare() { $selectedConfiguration = $FirebirdConfiguration[$FirebirdSelection] $fbDownload = $selectedConfiguration.Download $fbDownloadName = $fbDownload -Replace '.+/(.+)$','$1' - if (Test-Path $firebirdDir) { - rm -Force -Recurse $firebirdDir + + if (Test-Path "$firebirdDir\firebird.exe") { + echo "Using cached Firebird from $firebirdDir" + } + else { + if (Test-Path $firebirdDir) { + rm -Force -Recurse $firebirdDir + } + mkdir $firebirdDir | Out-Null + + pushd $firebirdDir + try { + echo "Downloading $fbDownload" + Invoke-RestMethod -Uri $fbDownload -OutFile $fbDownloadName + echo "Extracting $fbDownloadName" + 7z x -bsp0 -bso0 $fbDownloadName + rm $fbDownloadName + } + finally { + popd + } } - mkdir $firebirdDir | Out-Null + + cp -Recurse -Force $firebirdDir\* $testsProviderDir pushd $firebirdDir try { - echo "Downloading $fbDownload" - Invoke-RestMethod -Uri $fbDownload -OutFile $fbDownloadName - echo "Extracting $fbDownloadName" - 7z x -bsp0 -bso0 $fbDownloadName - rm $fbDownloadName - cp -Recurse -Force .\* $testsProviderDir - - ni firebird.log -ItemType File | Out-Null + if (-not (Test-Path firebird.log)) { + ni firebird.log -ItemType File | Out-Null + } echo "Starting Firebird" $process = Start-Process -FilePath $selectedConfiguration.Executable -ArgumentList $selectedConfiguration.Args -PassThru @@ -88,7 +103,6 @@ function Cleanup() { # give OS time to release all files sleep -Milliseconds 100 } - rm -Force -Recurse $firebirdDir Write-Host "=== END ===" } From ca88f8e09a10a2a67359b510fba6305ca1e0ae94 Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Mon, 23 Mar 2026 00:20:17 -0300 Subject: [PATCH 4/6] tests: add Tests-FirebirdClient-All grouped test suite Runs all 5 FirebirdClient test variants (4 compression/crypt combos + embedded) in a single invocation, reducing per-job overhead when full granularity is not needed. --- tests.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests.ps1 b/tests.ps1 index 7636563f0..a852d5014 100644 --- a/tests.ps1 +++ b/tests.ps1 @@ -133,6 +133,13 @@ function Tests-FirebirdClient-Default-NoCompression-CryptDisabled() { function Tests-FirebirdClient-Embedded() { Tests-FirebirdClient 'Embedded' $False 'Disabled' } +function Tests-FirebirdClient-All() { + Tests-FirebirdClient-Default-Compression-CryptRequired + Tests-FirebirdClient-Default-NoCompression-CryptRequired + Tests-FirebirdClient-Default-Compression-CryptDisabled + Tests-FirebirdClient-Default-NoCompression-CryptDisabled + Tests-FirebirdClient-Embedded +} function Tests-FirebirdClient($serverType, $compression, $wireCrypt) { pushd $testsProviderDir try { From 1edd21d24fa39946319205ea67ecb20ae796a87c Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Mon, 23 Mar 2026 00:20:48 -0300 Subject: [PATCH 5/6] ci: trim test matrix from 24 to 13 jobs - Full coverage (all 8 test suites) on FB50 (latest Firebird) - Grouped FirebirdClient tests + EFCore + EF6 on FB40 - Grouped FirebirdClient tests + EFCore on FB30 - Uses Tests-FirebirdClient-All for older versions to reduce job count while maintaining compatibility coverage --- .github/workflows/ci.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51720d7ad..37ac7c39d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,8 +56,23 @@ jobs: strategy: fail-fast: false matrix: - FIREBIRD_SELECTION: [FB30, FB40, FB50] - TEST_SUITE: [Tests-FirebirdClient-Default-Compression-CryptRequired, Tests-FirebirdClient-Default-NoCompression-CryptRequired, Tests-FirebirdClient-Default-Compression-CryptDisabled, Tests-FirebirdClient-Default-NoCompression-CryptDisabled, Tests-FirebirdClient-Embedded, Tests-EFCore, Tests-EFCore-Functional, Tests-EF6] + 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 From 5987643feb041112a49bac133c09cb8d1dba3959 Mon Sep 17 00:00:00 2001 From: "F.D.Castel" Date: Mon, 23 Mar 2026 00:53:39 -0300 Subject: [PATCH 6/6] ci: update actions to Node.js 24-compatible versions - actions/cache v4 -> v5 - actions/upload-artifact v4 -> v7 - actions/download-artifact v4 -> v8 Fixes Node.js 20 deprecation warnings. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37ac7c39d..5f529b548 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: dotnet-version: 10.0.x - name: NuGet Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/.nuget/packages key: nuget-${{ hashFiles('**/*.csproj', '**/Directory.Build.props', '**/Versions.props') }} @@ -39,13 +39,13 @@ jobs: shell: powershell - name: Upload Build Output - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: build-output path: '.\\out\\' - name: Upload Test Binaries - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: test-binaries path: '.\\src\\**\\bin\\' @@ -84,13 +84,13 @@ jobs: dotnet-version: 10.0.x - name: Download Test Binaries - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: name: test-binaries path: '.\\src\\' - name: Firebird Cache - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: 'C:\firebird' key: firebird-${{ matrix.FIREBIRD_SELECTION }}