Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 67 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v5
with:
path: ~/.nuget/packages
key: nuget-${{ hashFiles('**/*.csproj', '**/Directory.Build.props', '**/Versions.props') }}
restore-keys: nuget-

- name: Build
run: |
try {
Expand All @@ -36,6 +38,63 @@ jobs:
}
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 {
Expand All @@ -49,9 +108,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\\'
1 change: 0 additions & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
45 changes: 33 additions & 12 deletions tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -88,7 +103,6 @@ function Cleanup() {
# give OS time to release all files
sleep -Milliseconds 100
}
rm -Force -Recurse $firebirdDir

Write-Host "=== END ==="
}
Expand Down Expand Up @@ -119,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 {
Expand Down