88#
99# Architecture:
1010# changed -> skip detection (docs-only PRs skip tests)
11- # test -> build & test matrix (legacy core test project)
12- # io-test-macos -> Magicodes.IE.IO dedicated regression suite on Apple-Silicon
13- # (-c Debug activates the CRC32 self-check; guards #1-class
14- # arm64 platform traps that x86-only CI would miss)
11+ # test -> build & test matrix (legacy core + IO test projects)
1512# check -> alls-green gate (single required status check)
1613#
1714# Test runner:
5249 DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION : 1
5350 TERM : xterm
5451 TEST_PROJECT : src/Magicodes.ExporterAndImporter.Tests/Magicodes.IE.Tests.csproj
52+ IO_TEST_PROJECT : tests/Magicodes.IE.IO.Tests/Magicodes.IE.IO.Tests.csproj
5553
5654jobs :
5755
@@ -274,90 +272,32 @@ jobs:
274272 if-no-files-found : ignore
275273 retention-days : 7
276274
277- # ##################################################
278- # IO PERF-REGRESSION GUARD (Apple Silicon / arm64)
279- #
280- # Runs the *dedicated* Magicodes.IE.IO test project
281- # (tests/Magicodes.IE.IO.Tests) on Apple-Silicon. This is the project that
282- # holds XlsxIoPerfRegressionTests — the round-trip + ZipArchive-reopen guard
283- # for the ForwardOnlyZipWriter CRC32 path. The main matrix above targets the
284- # legacy core test project only, so without this job the IO regression suite
285- # never ran in CI and an arm64 CRC bug (#1 class) could slip through on
286- # x86-only runners.
287- #
288- # Built/tested in -c Debug on purpose: ForwardOnlyZipWriter contains a
289- # #if DEBUG CRC32 self-check ("123456789" => 0xCBF43926). A wrong arm64 CRC
290- # throws at assembly load, failing the whole run immediately — the cheapest,
291- # strongest platform trap. (Release runtime CRC is still exercised by the
292- # ZipArchive reopen assertions inside the tests.)
293- # ##################################################
294-
295- io-test-macos :
296- name : IO Tests (macOS arm64 / Debug)
297- needs : changed
298- if : needs.changed.outputs.should_skip != 'true'
299- runs-on : macos-15
300- timeout-minutes : 20
301- env :
302- IO_TEST_PROJECT : tests/Magicodes.IE.IO.Tests/Magicodes.IE.IO.Tests.csproj
303- steps :
304- - name : Checkout
305- uses : actions/checkout@v4
306-
307- - name : Setup .NET SDK
308- uses : actions/setup-dotnet@v4
309- with :
310- dotnet-version : |
311- 8.0.x
312- cache : true
313- cache-dependency-path : |
314- Magicodes.IE.sln
315- src/**/*.csproj
316-
317- - name : Restore
275+ - name : Restore IO
318276 run : dotnet restore ${{ env.IO_TEST_PROJECT }}
319277
320- - name : Build
321- run : dotnet build ${{ env.IO_TEST_PROJECT }} -c Debug --no-restore -bl
278+ - name : Build IO
279+ run : dotnet build ${{ env.IO_TEST_PROJECT }} -c Release --no-restore -bl
322280
323- - name : Test
324- shell : bash
325- run : |
326- set +e
327- dotnet test ${{ env.IO_TEST_PROJECT }} \
328- -c Debug --no-build \
329- -f net8.0 \
330- --blame-hang-timeout 10m \
331- --blame-crash-dump-type full \
332- --blame-hang-dump-type full \
333- --logger "trx;LogFileName=results-io-macos-debug.trx" \
334- --logger GitHubActions \
335- --results-directory TestResults
336- TEST_EXIT=$?
337- set -e
338- if [ $TEST_EXIT -ne 0 ]; then
339- echo "::error::IO tests failed on macOS arm64 (Debug CRC self-check active)"
340- exit 1
341- fi
281+ - name : Test IO
282+ if : matrix.framework != 'net9.0'
283+ run : >
284+ dotnet test ${{ env.IO_TEST_PROJECT }}
285+ -c Release --no-build
286+ -f ${{ matrix.framework }}
287+ --blame-hang-timeout 10m
288+ --logger "trx;LogFileName=results-io-${{ matrix.framework }}.trx"
289+ --logger GitHubActions
290+ --results-directory TestResults
342291
343- - name : Upload test results
344- if : always()
292+ - name : Upload IO test results
293+ if : always() && matrix.framework != 'net9.0'
345294 uses : actions/upload-artifact@v4
346295 with :
347- name : io-test-results-macos-debug
296+ name : io-test-results-${{ runner.os }}-${{ matrix.framework }}
348297 path : TestResults
349298 if-no-files-found : ignore
350299 retention-days : 7
351300
352- - name : Upload build log
353- if : failure()
354- uses : actions/upload-artifact@v4
355- with :
356- name : io-build-log-macos-debug
357- path : msbuild.binlog
358- if-no-files-found : ignore
359- retention-days : 7
360-
361301 # ##################################################
362302 # ALLS-GREEN GATE
363303 # Single required status check for branch protection.
@@ -367,7 +307,7 @@ jobs:
367307 check :
368308 name : CI Passed
369309 if : always()
370- needs : [changed, test, io-test-macos ]
310+ needs : [changed, test]
371311 runs-on : ubuntu-latest
372312 steps :
373313 - name : Evaluate results
0 commit comments