Skip to content

Commit

Permalink
ci fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
aviatesk committed Mar 23, 2024
1 parent 9ddbb2a commit 132f9bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
push:
branches:
- main
tags: '*'
tags:
- '*'
workflow_dispatch:
jobs:
test:
Expand All @@ -19,12 +20,12 @@ jobs:
version:
- '1.10'
- 'nightly'
os:
os: # FIXME - windows-latest
- ubuntu-latest
- macOS-latest
# FIXME - windows-latest
arch:
- x64
allow_failure: [false]
include:
- version: 'nightly'
allow_failure: true
Expand Down
12 changes: 5 additions & 7 deletions test/stage2_fwd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,34 @@ module stage2_fwd
@test sin′(1.0) == cos(1.0)
end
let sin′′ = Diffractor.dontuse_nth_order_forward_stage2(Tuple{typeof(mysin), Float64}, 2)
# This broke some time between 1.10 and 1.11-DEV.10001
@test isa(sin′′, Core.OpaqueClosure{Tuple{Float64}, Float64}) broken=VERSION>=v"1.11-"
@test isa(sin′′, Core.OpaqueClosure{Tuple{Float64}, Float64})
@test sin′′(1.0) == -sin(1.0)
end

myminus(a, b) = a - b
self_minus(a) = myminus(a, a)
ChainRulesCore.@scalar_rule myminus(x, y) (true, -1)
let self_minus′ = Diffractor.dontuse_nth_order_forward_stage2(Tuple{typeof(self_minus), Float64})
# This broke some time between 1.10 and 1.11-DEV.10001
@test isa(self_minus′, Core.OpaqueClosure{Tuple{Float64}, Float64}) broken=VERSION>=v"1.11-"
@test isa(self_minus′, Core.OpaqueClosure{Tuple{Float64}, Float64})
@test self_minus′(1.0) == 0.
end
ChainRulesCore.@scalar_rule myminus(x, y) (true, true) # frule for `x - y`
let self_minus′ = Diffractor.dontuse_nth_order_forward_stage2(Tuple{typeof(self_minus), Float64})
# This broke some time between 1.10 and 1.11-DEV.10001
@test isa(self_minus′, Core.OpaqueClosure{Tuple{Float64}, Float64}) broken=VERSION>=v"1.11-"
@test isa(self_minus′, Core.OpaqueClosure{Tuple{Float64}, Float64})
@test self_minus′(1.0) == 2.
end

myminus2(a, b) = a - b
self_minus2(a) = myminus2(a, a)
let self_minus2′ = Diffractor.dontuse_nth_order_forward_stage2(Tuple{typeof(self_minus2), Float64})
@test isa(self_minus2′, Core.OpaqueClosure{Tuple{Float64}, Float64}) broken=VERSION>=v"1.11-"
@test isa(self_minus2′, Core.OpaqueClosure{Tuple{Float64}, Float64}
@test self_minus2′(1.0) == 0.
end
ChainRulesCore.@scalar_rule myminus2(x, y) (true, true) # frule for `x - y`
let self_minus2′ = Diffractor.dontuse_nth_order_forward_stage2(Tuple{typeof(self_minus2), Float64})
# This broke some time between 1.10 and 1.11-DEV.10001
@test isa(self_minus2′, Core.OpaqueClosure{Tuple{Float64}, Float64}) broken=VERSION>=v"1.11-"
@test isa(self_minus2′, Core.OpaqueClosure{Tuple{Float64}, Float64})
@test self_minus2′(1.0) == 2.
end

Expand Down

0 comments on commit 132f9bb

Please sign in to comment.