Skip to content

Commit 88fb92b

Browse files
committed
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
1 parent 1e4104b commit 88fb92b

1 file changed

Lines changed: 46 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@ env:
77
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
88

99
jobs:
10-
ci:
10+
build:
1111
runs-on: windows-2025
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
FIREBIRD_SELECTION: [FB30, FB40, FB50]
16-
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]
17-
timeout-minutes: 120
12+
timeout-minutes: 30
1813
steps:
1914
- name: Checkout
2015
uses: actions/checkout@v5
21-
16+
2217
- name: .NET 10.0
2318
uses: actions/setup-dotnet@v5
2419
with:
2520
dotnet-version: 10.0.x
2621

22+
- name: NuGet Cache
23+
uses: actions/cache@v4
24+
with:
25+
path: ~/.nuget/packages
26+
key: nuget-${{ hashFiles('**/*.csproj', '**/Directory.Build.props', '**/Versions.props') }}
27+
restore-keys: nuget-
28+
2729
- name: Build
2830
run: |
2931
try {
@@ -36,6 +38,42 @@ jobs:
3638
}
3739
shell: powershell
3840

41+
- name: Upload Build Output
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: build-output
45+
path: '.\\out\\'
46+
47+
- name: Upload Test Binaries
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: test-binaries
51+
path: '.\\src\\**\\bin\\'
52+
53+
test:
54+
needs: build
55+
runs-on: windows-2025
56+
strategy:
57+
fail-fast: false
58+
matrix:
59+
FIREBIRD_SELECTION: [FB30, FB40, FB50]
60+
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]
61+
timeout-minutes: 120
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v5
65+
66+
- name: .NET 10.0
67+
uses: actions/setup-dotnet@v5
68+
with:
69+
dotnet-version: 10.0.x
70+
71+
- name: Download Test Binaries
72+
uses: actions/download-artifact@v4
73+
with:
74+
name: test-binaries
75+
path: '.\\src\\'
76+
3977
- name: Tests
4078
run: |
4179
try {
@@ -49,9 +87,3 @@ jobs:
4987
exit 1
5088
}
5189
shell: powershell
52-
53-
- name: Publish Artifacts
54-
uses: actions/upload-artifact@v4
55-
with:
56-
name: 'ci_${{ matrix.TEST_SUITE }}_${{ matrix.FIREBIRD_SELECTION }}_${{ env.CONFIGURATION }}'
57-
path: '.\\out\\'

0 commit comments

Comments
 (0)