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 
@@ -31,12 +31,21 @@ jobs:
3131          - ubuntu-latest 
3232          - windows-latest 
3333          - macOS-latest 
34+         nansafe :
35+           - true 
36+           - false 
3437    steps :
3538      - uses : actions/checkout@v5 
3639      - uses : julia-actions/setup-julia@v2 
3740        with :
3841          version : ${{ matrix.version }} 
3942      - uses : julia-actions/cache@v2 
43+       - name : Set NaN-safe mode preference 
44+         run : | 
45+           open(joinpath(pwd(), "Project.toml"), "a") do io 
46+             println(io, "\n[preferences.ForwardDiff]\nnansafe_mode = ${{ matrix.nansafe }}\n") 
47+           end 
48+          shell : julia --color=yes {0} 
4049      - uses : julia-actions/julia-buildpkg@v1 
4150      - uses : julia-actions/julia-runtest@v1 
4251      - 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