From 5cdf942cebf66f5da6f0beda708324fd78772d4a Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 8 Oct 2025 14:03:29 +0100 Subject: [PATCH 1/7] Fix CI for 1.12 --- .github/workflows/CI.yml | 4 ++++ test/runtests.jl | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cfaca7620..fd16cd1e1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,6 +35,10 @@ jobs: - version: 'min' os: ubuntu-latest num_threads: 2 + # 1.11 + - version: '1.11' + os: ubuntu-latest + num_threads: 2 # Single-threaded - version: '1' os: ubuntu-latest diff --git a/test/runtests.jl b/test/runtests.jl index 40960884e..14cd4d1d3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -36,9 +36,9 @@ using DynamicPPL: getargs_dottilde, getargs_tilde const GROUP = get(ENV, "GROUP", "All") const AQUA = get(ENV, "AQUA", "true") == "true" -# Detect if prerelease version, if so, we skip some tests -const IS_PRERELEASE = !isempty(VERSION.prerelease) -if !IS_PRERELEASE +# Skip Mooncake if it doesn't work +const MOONCAKE_SUPPORTED = VERSION < v"1.12.0" +if MOONCAKE_SUPPORTED Pkg.add("Mooncake") using Mooncake: Mooncake end From b4d02892314c6de7aa69f77933a79d211ceab13f Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 8 Oct 2025 14:06:48 +0100 Subject: [PATCH 2/7] Disable JuliaPre --- .github/workflows/JuliaPre.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/JuliaPre.yml b/.github/workflows/JuliaPre.yml index adea619ab..ab8998d0a 100644 --- a/.github/workflows/JuliaPre.yml +++ b/.github/workflows/JuliaPre.yml @@ -1,10 +1,11 @@ name: JuliaPre -on: - push: - branches: - - main - pull_request: +# JuliaPre tests are currently disabled because there is no pre-release of v1.13. +on: workflow_dispatch + # push: + # branches: + # - main + # pull_request: # needed to allow julia-actions/cache to delete old caches that it has created permissions: From 0d5f1c14c3c7910d540b0b835b2d5e3480c62bdd Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 8 Oct 2025 14:08:22 +0100 Subject: [PATCH 3/7] Fix version checking --- test/ad.jl | 6 +++--- test/runtests.jl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/ad.jl b/test/ad.jl index 371e79b06..6bc0271e9 100644 --- a/test/ad.jl +++ b/test/ad.jl @@ -5,14 +5,14 @@ using DynamicPPL.TestUtils.AD: run_ad, WithExpectedResult, NoTest # Used as the ground truth that others are compared against. ref_adtype = AutoForwardDiff() - test_adtypes = if IS_PRERELEASE - [AutoReverseDiff(; compile=false), AutoReverseDiff(; compile=true)] - else + test_adtypes = if MOONCAKE_SUPPORTED [ AutoReverseDiff(; compile=false), AutoReverseDiff(; compile=true), AutoMooncake(; config=nothing), ] + else + [AutoReverseDiff(; compile=false), AutoReverseDiff(; compile=true)] end @testset "Unsupported backends" begin diff --git a/test/runtests.jl b/test/runtests.jl index 14cd4d1d3..2b92a023d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -84,7 +84,7 @@ include("test_util.jl") end @testset "ad" begin include("ext/DynamicPPLForwardDiffExt.jl") - if !IS_PRERELEASE + if MOONCAKE_SUPPORTED include("ext/DynamicPPLMooncakeExt.jl") end include("ad.jl") From 8314e4253b34f4be0b28980cd6ec1373e2edc9a8 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 8 Oct 2025 14:13:23 +0100 Subject: [PATCH 4/7] Run other workflows on 1.11 --- .github/workflows/Benchmarking.yml | 2 +- .github/workflows/Enzyme.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Benchmarking.yml b/.github/workflows/Benchmarking.yml index bf188059f..1b219eedf 100644 --- a/.github/workflows/Benchmarking.yml +++ b/.github/workflows/Benchmarking.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Julia uses: julia-actions/setup-julia@v2 with: - version: '1' + version: '1.11' - uses: julia-actions/cache@v2 diff --git a/.github/workflows/Enzyme.yml b/.github/workflows/Enzyme.yml index 88f7e6109..36f11b914 100644 --- a/.github/workflows/Enzyme.yml +++ b/.github/workflows/Enzyme.yml @@ -24,7 +24,7 @@ jobs: - uses: julia-actions/setup-julia@v2 with: - version: "1" + version: "1.11" - uses: julia-actions/cache@v2 From 70311769069fb5f3b58c080570aae4693a3d8b73 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 8 Oct 2025 14:21:23 +0100 Subject: [PATCH 5/7] Don't need two sets of tests on 1.10 --- .github/workflows/CI.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fd16cd1e1..14bf62221 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,7 +31,7 @@ jobs: - version: '1' os: ubuntu-latest num_threads: 2 - # Minimum supported version + # 1.10 - version: 'min' os: ubuntu-latest num_threads: 2 @@ -43,10 +43,6 @@ jobs: - version: '1' os: ubuntu-latest num_threads: 1 - # Minimum supported version, single-threaded - - version: 'min' - os: ubuntu-latest - num_threads: 1 # Windows - version: '1' os: windows-latest From 0ecf9337ff594c3d0677afa1b6e1abd614142dd9 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Thu, 9 Oct 2025 12:15:48 +0100 Subject: [PATCH 6/7] Update doctests for 1.12 --- src/simple_varinfo.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simple_varinfo.jl b/src/simple_varinfo.jl index cfad93ed9..31b2d2ac6 100644 --- a/src/simple_varinfo.jl +++ b/src/simple_varinfo.jl @@ -58,7 +58,7 @@ julia> vi[@varname(x[1:2])] julia> # (×) If we don't provide the container... _, vi = DynamicPPL.evaluate_and_sample!!(rng, m, SimpleVarInfo()); vi -ERROR: type NamedTuple has no field x +ERROR: FieldError: type NamedTuple has no field `x`, available fields: `m` [...] 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] [...] julia> svi_nt[@varname(m.b)] -ERROR: type NamedTuple has no field b +ERROR: FieldError: type NamedTuple has no field `b`, available fields: `a` [...] ``` From 1cbeeeeb788344acf3bf814423b7a00466311c51 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Thu, 9 Oct 2025 12:45:25 +0100 Subject: [PATCH 7/7] Update .github/workflows/CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 14bf62221..a5735402a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,7 +31,7 @@ jobs: - version: '1' os: ubuntu-latest num_threads: 2 - # 1.10 + # Minimum supported version - version: 'min' os: ubuntu-latest num_threads: 2