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/CI.yml b/.github/workflows/CI.yml index cfaca7620..a5735402a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,14 +35,14 @@ 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 num_threads: 1 - # Minimum supported version, single-threaded - - version: 'min' - os: ubuntu-latest - num_threads: 1 # Windows - version: '1' os: windows-latest 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 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: 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` [...] ``` 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 40960884e..2b92a023d 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 @@ -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")