File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ permissions:
1717
1818jobs :
1919 test :
20- name : Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }}
20+ name : Julia ${{ matrix.version }} - ${{ matrix.os }} - NaN-safe mode ${{ matrix.nansafe && 'enabled' || 'disabled' }} - ${{ github.event_name }}
2121 runs-on : ${{ matrix.os }}
2222 strategy :
2323 fail-fast : false
@@ -30,12 +30,21 @@ jobs:
3030 - ubuntu-latest
3131 - windows-latest
3232 - macOS-latest
33+ nansafe :
34+ - true
35+ - false
3336 steps :
3437 - uses : actions/checkout@v5
3538 - uses : julia-actions/setup-julia@v2
3639 with :
3740 version : ${{ matrix.version }}
3841 - uses : julia-actions/cache@v2
42+ - name : Set NaN-safe mode preference
43+ run : |
44+ open(joinpath(pwd(), "Project.toml"), "a") do io
45+ println(io, "\n[preferences.ForwardDiff]\nnansafe_mode = ${{ matrix.nansafe }}\n")
46+ end
47+ shell : julia --color=yes {0}
3948 - uses : julia-actions/julia-buildpkg@v1
4049 - uses : julia-actions/julia-runtest@v1
4150 - uses : julia-actions/julia-processcoverage@v1
Original file line number Diff line number Diff line change 11using ForwardDiff, Test, Random
22
3+ @info " Testing ForwardDiff with NaN-safe mode $(ForwardDiff. NANSAFE_MODE_ENABLED ? " enabled" : " disabled" ) "
4+
35SEED = trunc (Int, time ())
46println (" ##### Random.seed!($SEED ), on VERSION == $VERSION " )
57Random. seed! (SEED)
You can’t perform that action at this time.
0 commit comments