Skip to content

Commit d772913

Browse files
authored
Fix CI for 1.12 (#1067)
* Fix CI for 1.12 * Disable JuliaPre * Fix version checking * Run other workflows on 1.11 * Don't need two sets of tests on 1.10 * Update doctests for 1.12 * Update .github/workflows/CI.yml
1 parent 70b9e5f commit d772913

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

.github/workflows/Benchmarking.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Julia
1717
uses: julia-actions/setup-julia@v2
1818
with:
19-
version: '1'
19+
version: '1.11'
2020

2121
- uses: julia-actions/cache@v2
2222

.github/workflows/CI.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ jobs:
3535
- version: 'min'
3636
os: ubuntu-latest
3737
num_threads: 2
38+
# 1.11
39+
- version: '1.11'
40+
os: ubuntu-latest
41+
num_threads: 2
3842
# Single-threaded
3943
- version: '1'
4044
os: ubuntu-latest
4145
num_threads: 1
42-
# Minimum supported version, single-threaded
43-
- version: 'min'
44-
os: ubuntu-latest
45-
num_threads: 1
4646
# Windows
4747
- version: '1'
4848
os: windows-latest

.github/workflows/Enzyme.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
- uses: julia-actions/setup-julia@v2
2626
with:
27-
version: "1"
27+
version: "1.11"
2828

2929
- uses: julia-actions/cache@v2
3030

.github/workflows/JuliaPre.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: JuliaPre
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
3+
# JuliaPre tests are currently disabled because there is no pre-release of v1.13.
4+
on: workflow_dispatch
5+
# push:
6+
# branches:
7+
# - main
8+
# pull_request:
89

910
# needed to allow julia-actions/cache to delete old caches that it has created
1011
permissions:

src/simple_varinfo.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ julia> vi[@varname(x[1:2])]
5858
5959
julia> # (×) If we don't provide the container...
6060
_, vi = DynamicPPL.evaluate_and_sample!!(rng, m, SimpleVarInfo()); vi
61-
ERROR: type NamedTuple has no field x
61+
ERROR: FieldError: type NamedTuple has no field `x`, available fields: `m`
6262
[...]
6363
6464
julia> # If one does not know the varnames, we can use a `OrderedDict` instead.
@@ -158,7 +158,7 @@ ERROR: BoundsError: attempt to access 1-element Vector{Float64} at index [2]
158158
[...]
159159
160160
julia> svi_nt[@varname(m.b)]
161-
ERROR: type NamedTuple has no field b
161+
ERROR: FieldError: type NamedTuple has no field `b`, available fields: `a`
162162
[...]
163163
```
164164

test/ad.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ using DynamicPPL.TestUtils.AD: run_ad, WithExpectedResult, NoTest
55
# Used as the ground truth that others are compared against.
66
ref_adtype = AutoForwardDiff()
77

8-
test_adtypes = if IS_PRERELEASE
9-
[AutoReverseDiff(; compile=false), AutoReverseDiff(; compile=true)]
10-
else
8+
test_adtypes = if MOONCAKE_SUPPORTED
119
[
1210
AutoReverseDiff(; compile=false),
1311
AutoReverseDiff(; compile=true),
1412
AutoMooncake(; config=nothing),
1513
]
14+
else
15+
[AutoReverseDiff(; compile=false), AutoReverseDiff(; compile=true)]
1616
end
1717

1818
@testset "Unsupported backends" begin

test/runtests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ using DynamicPPL: getargs_dottilde, getargs_tilde
3636
const GROUP = get(ENV, "GROUP", "All")
3737
const AQUA = get(ENV, "AQUA", "true") == "true"
3838

39-
# Detect if prerelease version, if so, we skip some tests
40-
const IS_PRERELEASE = !isempty(VERSION.prerelease)
41-
if !IS_PRERELEASE
39+
# Skip Mooncake if it doesn't work
40+
const MOONCAKE_SUPPORTED = VERSION < v"1.12.0"
41+
if MOONCAKE_SUPPORTED
4242
Pkg.add("Mooncake")
4343
using Mooncake: Mooncake
4444
end
@@ -84,7 +84,7 @@ include("test_util.jl")
8484
end
8585
@testset "ad" begin
8686
include("ext/DynamicPPLForwardDiffExt.jl")
87-
if !IS_PRERELEASE
87+
if MOONCAKE_SUPPORTED
8888
include("ext/DynamicPPLMooncakeExt.jl")
8989
end
9090
include("ad.jl")

0 commit comments

Comments
 (0)