From d96fbd9e3c1b76829a34dce7de184820b7b2558d Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Fri, 9 Jan 2026 07:27:58 -0500 Subject: [PATCH] Split tests: move JET tests to nopre group excluded on pre Julia - Create test/nopre directory with its own Project.toml for JET tests - Update CI workflow to use GROUP matrix with All and nopre groups - Exclude nopre group from pre Julia version to avoid JET compatibility issues - Remove JET from main test dependencies - Update runtests.jl to use GROUP environment variable This follows the OrdinaryDiffEq pattern for organizing tests with separate environments for tests that need specific dependencies. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 10 +++++++++- test/Project.toml | 2 +- test/nopre/Project.toml | 7 +++++++ test/{ => nopre}/jet_tests.jl | 0 test/runtests.jl | 26 +++++++++++++++++++++----- 5 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 test/nopre/Project.toml rename test/{ => nopre}/jet_tests.jl (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f13451b..907d1738 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,11 +9,14 @@ on: tags: '*' jobs: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: Julia ${{ matrix.version }} - ${{ matrix.group }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + group: + - All + - nopre version: - 'lts' - '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia. @@ -22,6 +25,9 @@ jobs: - ubuntu-latest arch: - x64 + exclude: + - group: nopre + version: 'pre' steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 @@ -40,6 +46,8 @@ jobs: ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 + env: + GROUP: ${{ matrix.group }} - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v5 with: diff --git a/test/Project.toml b/test/Project.toml index d5b04460..488f242f 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -7,12 +7,12 @@ FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" InvertedIndices = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" -JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" JLArrays = "27aeb0d3-9eb9-45fb-866b-73c2ecf80fcb" LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2" +Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" diff --git a/test/nopre/Project.toml b/test/nopre/Project.toml new file mode 100644 index 00000000..a3afab31 --- /dev/null +++ b/test/nopre/Project.toml @@ -0,0 +1,7 @@ +[deps] +ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" +JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[compat] +JET = "0.9, 0.10, 0.11" diff --git a/test/jet_tests.jl b/test/nopre/jet_tests.jl similarity index 100% rename from test/jet_tests.jl rename to test/nopre/jet_tests.jl diff --git a/test/runtests.jl b/test/runtests.jl index c60044aa..361bd735 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,3 +1,24 @@ +using Pkg +using Test + +const GROUP = get(ENV, "GROUP", "All") + +function activate_nopre_env() + Pkg.activate("nopre") + Pkg.develop(PackageSpec(path = dirname(@__DIR__))) + Pkg.instantiate() +end + +# Handle nopre group separately - requires its own environment +if GROUP == "nopre" + activate_nopre_env() + @testset "JET" begin + include("nopre/jet_tests.jl") + end + exit(0) # Exit after nopre tests +end + +# Main test group (GROUP == "All" or default) using ComponentArrays using BenchmarkTools using ForwardDiff @@ -7,7 +28,6 @@ using LabelledArrays using LinearAlgebra using StaticArrays using OffsetArrays -using Test using Unitful using Functors @@ -982,7 +1002,3 @@ end @testset "Reactant" begin include("reactant_tests.jl") end - -@testset "JET" begin - include("jet_tests.jl") -end