From 7d2008bfe2504b34563d99f1a919555141e52cfc Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Fri, 13 Mar 2026 09:05:49 +1100 Subject: [PATCH 1/4] CI overhaul Removed TestApp and sysimage compilation completely. Split tests into different runners. Now supporting newest stable julia release. --- .github/workflows/ci.yml | 66 +++++++----------- test/TestApp/.gitignore | 1 - test/TestApp/Project.toml | 16 ----- test/TestApp/compile/compile.jl | 34 --------- test/TestApp/compile/compile.sh | 7 -- test/TestApp/src/TestApp.jl | 26 ------- test/mpi/runtests.jl | 26 +++---- test/mpi/runtests_np4.jl | 39 +++++++++-- test/mpi/runtests_np4_body.jl | 120 ++++++++++++++++++-------------- test/runtests.jl | 10 ++- test/sequential/runtests.jl | 67 +++++++++--------- 11 files changed, 174 insertions(+), 238 deletions(-) delete mode 100644 test/TestApp/.gitignore delete mode 100644 test/TestApp/Project.toml delete mode 100644 test/TestApp/compile/compile.jl delete mode 100755 test/TestApp/compile/compile.sh delete mode 100644 test/TestApp/src/TestApp.jl diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfb5e09e..d0ae4ef7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,19 +18,36 @@ on: - 'NEWS.md' workflow_dispatch: # Allow manual triggering of the workflow from the Actions tab +# Cancel redundant CI runs: always for PRs, never for pushes to master +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + jobs: - SequentialTests: - name: Serial Tests - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + test: + name: ${{ matrix.testcase }} - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: version: - - '1.10' + - 'lts' + - '1' os: - ubuntu-latest arch: - x64 + testcase: + - seq-geometry + - seq-fespaces + - seq-physics + - seq-transient + - seq-misc + - mpi-geometry + - mpi-fespaces + - mpi-physics + - mpi-adaptivity + - mpi-misc steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 @@ -39,46 +56,15 @@ jobs: arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - - run: julia --project=. -e 'using Pkg; Pkg.instantiate()' - - run: julia --project=. --color=yes --check-bounds=yes test/sequential/runtests.jl - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v5 - with: - verbose: true - token: ${{ secrets.CODECOV_TOKEN }} - flags: sequential - MPITests: - name: MPI Tests - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - version: - - '1.10' - os: - - ubuntu-latest - arch: - - x64 - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/cache@v2 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - run: | - julia --project=test/TestApp/ -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - run: cd test/TestApp/compile; ./compile.sh - - run: julia --project=test/TestApp/ --color=yes --check-bounds=yes test/mpi/runtests.jl test/TestApp/compile/TestApp.so + - uses: julia-actions/julia-runtest@v1 + env: + TESTCASE: ${{ matrix.testcase }} - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v5 with: verbose: true token: ${{ secrets.CODECOV_TOKEN }} - flags: mpi + flags: ${{ matrix.testcase }} docs: name: Documentation runs-on: ubuntu-latest @@ -86,7 +72,7 @@ jobs: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: - version: '1.10' + version: '1' - run: | julia --project=docs -e ' using Pkg @@ -95,4 +81,4 @@ jobs: - run: julia --project=docs docs/make.jl env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/test/TestApp/.gitignore b/test/TestApp/.gitignore deleted file mode 100644 index ba39cc53..00000000 --- a/test/TestApp/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Manifest.toml diff --git a/test/TestApp/Project.toml b/test/TestApp/Project.toml deleted file mode 100644 index 8e3f9472..00000000 --- a/test/TestApp/Project.toml +++ /dev/null @@ -1,16 +0,0 @@ -name = "TestApp" -uuid = "3ba29202-0f57-4e69-8cbd-5c57d4c4860a" -version = "0.1.0" - -[deps] -BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" -ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" -Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e" -GridapDistributed = "f9701e48-63b3-45aa-9a63-9bc6c271f355" -LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" -PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d" -PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9" -SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/TestApp/compile/compile.jl b/test/TestApp/compile/compile.jl deleted file mode 100644 index d57f2577..00000000 --- a/test/TestApp/compile/compile.jl +++ /dev/null @@ -1,34 +0,0 @@ -using Pkg -using PackageCompiler - -source_code=""" -module sysimagegenerator - using TestApp - using PartitionedArrays - const PArrays = PartitionedArrays - using MPI - include("../../mpi/runtests_np4_body.jl") - with_mpi() do distribute - all_tests(distribute,(1,1)) - end - MPI.Finalize() -end #module -""" - -warmup_file = joinpath(@__DIR__,"sysimagegenerator.jl") -open(warmup_file,"w") do io - println(io,source_code) -end - -pkgs = Symbol[] -push!(pkgs, :TestApp) - -if VERSION >= v"1.4" - append!(pkgs, [Symbol(v.name) for v in values(Pkg.dependencies()) if v.is_direct_dep],) -else - append!(pkgs, [Symbol(name) for name in keys(Pkg.installed())]) -end - -create_sysimage(pkgs, - sysimage_path=joinpath(@__DIR__,"TestApp.so"), - precompile_execution_file=warmup_file) diff --git a/test/TestApp/compile/compile.sh b/test/TestApp/compile/compile.sh deleted file mode 100755 index c745b309..00000000 --- a/test/TestApp/compile/compile.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# This script is to be executed from this folder (compile/) -# See https://juliaparallel.github.io/MPI.jl/latest/knownissues/#Julia-module-precompilation-1 -# for a justification of this line -julia --project=../ --color=yes -e 'using Pkg; Pkg.precompile()' -julia --project=../ -O3 --check-bounds=no --color=yes compile.jl $1 diff --git a/test/TestApp/src/TestApp.jl b/test/TestApp/src/TestApp.jl deleted file mode 100644 index a129128d..00000000 --- a/test/TestApp/src/TestApp.jl +++ /dev/null @@ -1,26 +0,0 @@ -module TestApp - include("../../CellDataTests.jl") - include("../../FESpacesTests.jl") - include("../../GeometryTests.jl") - include("../../MultiFieldTests.jl") - include("../../PLaplacianTests.jl") - include("../../PoissonTests.jl") - include("../../PeriodicBCsTests.jl") - include("../../SurfaceCouplingTests.jl") - include("../../TransientDistributedCellFieldTests.jl") - include("../../TransientMultiFieldDistributedCellFieldTests.jl") - include("../../ZeroMeanFESpacesTests.jl") - include("../../HeatEquationTests.jl") - include("../../StokesOpenBoundaryTests.jl") - include("../../AdaptivityTests.jl") - include("../../AdaptivityCartesianTests.jl") - include("../../AdaptivityUnstructuredTests.jl") - include("../../AdaptivityMultiFieldTests.jl") - include("../../PolytopalCoarseningTests.jl") - include("../../BlockSparseMatrixAssemblersTests.jl") - include("../../BlockPartitionedArraysTests.jl") - include("../../VisualizationTests.jl") - include("../../AutodiffTests.jl") - include("../../ConstantFESpacesTests.jl") - include("../../MacroDiscreteModelsTests.jl") -end \ No newline at end of file diff --git a/test/mpi/runtests.jl b/test/mpi/runtests.jl index 122ab7d1..80f1cca4 100644 --- a/test/mpi/runtests.jl +++ b/test/mpi/runtests.jl @@ -3,30 +3,22 @@ module MPITests using MPI using Test -#Sysimage -sysimage=nothing -if length(ARGS)==1 - @assert isfile(ARGS[1]) "$(ARGS[1]) must be a valid Julia sysimage file" - sysimage=ARGS[1] -end +mpidir = @__DIR__ +testdir = joinpath(mpidir, "..") +repodir = joinpath(testdir, "..") -mpidir = @__DIR__ -testdir = joinpath(mpidir,"..") -repodir = joinpath(testdir,"TestApp") -function run_driver(procs,file,sysimage) +function run_driver(procs, file) mpiexec() do cmd - if sysimage!=nothing - extra_args="-J$(sysimage)" - run(`$cmd -n $procs $(Base.julia_cmd()) $(extra_args) --project=$repodir $(joinpath(mpidir,file))`) + if MPI.MPI_LIBRARY == "OpenMPI" || (isdefined(MPI, :OpenMPI) && MPI.MPI_LIBRARY == MPI.OpenMPI) + run(`$cmd -n $procs --oversubscribe $(Base.julia_cmd()) --code-coverage=user --project=$repodir $(joinpath(mpidir, file))`) else - run(`$cmd -n $procs $(Base.julia_cmd()) --project=$repodir $(joinpath(mpidir,file))`) + run(`$cmd -n $procs $(Base.julia_cmd()) --code-coverage=user --project=$repodir $(joinpath(mpidir, file))`) end @test true end end -run_driver(4,"runtests_np4.jl",sysimage) -run_driver(1,"runtests_np4.jl",sysimage) # Check that the degenerated case works - +run_driver(4, "runtests_np4.jl") +run_driver(1, "runtests_np4.jl") # Check that the degenerated case works end # module diff --git a/test/mpi/runtests_np4.jl b/test/mpi/runtests_np4.jl index 6fdf57e5..1592b9ea 100644 --- a/test/mpi/runtests_np4.jl +++ b/test/mpi/runtests_np4.jl @@ -1,27 +1,52 @@ module NP4 # All test running on 4 procs here -using TestApp +using GridapDistributed using PartitionedArrays const PArrays = PartitionedArrays using MPI -if ! MPI.Initialized() +if !MPI.Initialized() MPI.Init() end +include("../CellDataTests.jl") +include("../FESpacesTests.jl") +include("../GeometryTests.jl") +include("../MultiFieldTests.jl") +include("../PLaplacianTests.jl") +include("../PoissonTests.jl") +include("../PeriodicBCsTests.jl") +include("../SurfaceCouplingTests.jl") +include("../TransientDistributedCellFieldTests.jl") +include("../TransientMultiFieldDistributedCellFieldTests.jl") +include("../ZeroMeanFESpacesTests.jl") +include("../HeatEquationTests.jl") +include("../StokesOpenBoundaryTests.jl") +include("../AdaptivityTests.jl") +include("../AdaptivityCartesianTests.jl") +include("../AdaptivityUnstructuredTests.jl") +include("../AdaptivityMultiFieldTests.jl") +include("../PolytopalCoarseningTests.jl") +include("../BlockSparseMatrixAssemblersTests.jl") +include("../BlockPartitionedArraysTests.jl") +include("../VisualizationTests.jl") +include("../AutodiffTests.jl") +include("../ConstantFESpacesTests.jl") +include("../MacroDiscreteModelsTests.jl") + include("runtests_np4_body.jl") if MPI.Comm_size(MPI.COMM_WORLD) == 4 - with_mpi() do distribute - all_tests(distribute,(2,2)) + with_mpi() do distribute + all_tests(distribute, (2,2)) end elseif MPI.Comm_size(MPI.COMM_WORLD) == 1 - with_mpi() do distribute - all_tests(distribute,(1,1)) + with_mpi() do distribute + all_tests(distribute, (1,1)) end else - MPI.Abort(MPI.COMM_WORLD,0) + MPI.Abort(MPI.COMM_WORLD, 0) end end #module diff --git a/test/mpi/runtests_np4_body.jl b/test/mpi/runtests_np4_body.jl index c46bea12..680529ef 100644 --- a/test/mpi/runtests_np4_body.jl +++ b/test/mpi/runtests_np4_body.jl @@ -1,77 +1,89 @@ -function all_tests(distribute,parts) +function all_tests(distribute, parts) + TESTCASE = get(ENV, "TESTCASE", "all") + ranks = distribute(LinearIndices((prod(parts),))) - t = PArrays.PTimer(ranks,verbose=true) + t = PArrays.PTimer(ranks, verbose=true) PArrays.tic!(t) - TestApp.GeometryTests.main(distribute,parts) - PArrays.toc!(t,"Geometry") - - TestApp.CellDataTests.main(distribute,parts) - PArrays.toc!(t,"CellData") - - TestApp.FESpacesTests.main(distribute,parts) - PArrays.toc!(t,"FESpaces") + if TESTCASE ∈ ("all", "mpi-geometry") + GeometryTests.main(distribute, parts) + PArrays.toc!(t, "Geometry") - TestApp.MultiFieldTests.main(distribute,parts) - PArrays.toc!(t,"MultiField") + CellDataTests.main(distribute, parts) + PArrays.toc!(t, "CellData") + end - TestApp.PoissonTests.main(distribute,parts) - PArrays.toc!(t,"Poisson") + if TESTCASE ∈ ("all", "mpi-fespaces") + FESpacesTests.main(distribute, parts) + PArrays.toc!(t, "FESpaces") - TestApp.PLaplacianTests.main(distribute,parts) - PArrays.toc!(t,"PLaplacian") + MultiFieldTests.main(distribute, parts) + PArrays.toc!(t, "MultiField") - TestApp.TransientDistributedCellFieldTests.main(distribute,parts) - PArrays.toc!(t,"TransientDistributedCellField") + ZeroMeanFESpacesTests.main(distribute, parts) + PArrays.toc!(t, "ZeroMeanFESpaces") - TestApp.TransientMultiFieldDistributedCellFieldTests.main(distribute,parts) - PArrays.toc!(t,"TransientMultiFieldDistributedCellField") + PeriodicBCsTests.main(distribute, parts) + PArrays.toc!(t, "PeriodicBCs") + end - TestApp.ZeroMeanFESpacesTests.main(distribute,parts) - PArrays.toc!(t,"ZeroMeanFESpaces") + if TESTCASE ∈ ("all", "mpi-physics") + PoissonTests.main(distribute, parts) + PArrays.toc!(t, "Poisson") - TestApp.PeriodicBCsTests.main(distribute,parts) - PArrays.toc!(t,"PeriodicBCs") + PLaplacianTests.main(distribute, parts) + PArrays.toc!(t, "PLaplacian") - TestApp.SurfaceCouplingTests.main(distribute,parts) - PArrays.toc!(t,"SurfaceCoupling") + SurfaceCouplingTests.main(distribute, parts) + PArrays.toc!(t, "SurfaceCoupling") - TestApp.HeatEquationTests.main(distribute,parts) - PArrays.toc!(t,"HeatEquation") + HeatEquationTests.main(distribute, parts) + PArrays.toc!(t, "HeatEquation") - TestApp.StokesOpenBoundaryTests.main(distribute,parts) - PArrays.toc!(t,"StokesOpenBoundary") + StokesOpenBoundaryTests.main(distribute, parts) + PArrays.toc!(t, "StokesOpenBoundary") + end - if prod(parts) == 4 - TestApp.AdaptivityTests.main(distribute) - TestApp.AdaptivityCartesianTests.main(distribute) - TestApp.AdaptivityMultiFieldTests.main(distribute) - TestApp.AdaptivityUnstructuredTests.main(distribute) - TestApp.PolytopalCoarseningTests.main(distribute,parts) - PArrays.toc!(t,"Adaptivity") + if TESTCASE ∈ ("all", "mpi-adaptivity") + TransientDistributedCellFieldTests.main(distribute, parts) + PArrays.toc!(t, "TransientDistributedCellField") + + TransientMultiFieldDistributedCellFieldTests.main(distribute, parts) + PArrays.toc!(t, "TransientMultiFieldDistributedCellField") + + if prod(parts) == 4 + AdaptivityTests.main(distribute) + AdaptivityCartesianTests.main(distribute) + AdaptivityMultiFieldTests.main(distribute) + AdaptivityUnstructuredTests.main(distribute) + PolytopalCoarseningTests.main(distribute, parts) + PArrays.toc!(t, "Adaptivity") + end end - TestApp.BlockSparseMatrixAssemblersTests.main(distribute,parts) - TestApp.BlockPartitionedArraysTests.main(distribute,parts) - PArrays.toc!(t,"BlockSparseMatrixAssemblers") + if TESTCASE ∈ ("all", "mpi-misc") + BlockSparseMatrixAssemblersTests.main(distribute, parts) + BlockPartitionedArraysTests.main(distribute, parts) + PArrays.toc!(t, "BlockSparseMatrixAssemblers") - if prod(parts) == 4 - TestApp.ConstantFESpacesTests.main(distribute,parts) - PArrays.toc!(t,"ConstantFESpaces") - end - - if prod(parts) == 4 - TestApp.VisualizationTests.main(distribute,parts) - PArrays.toc!(t,"Visualization") - end + if prod(parts) == 4 + ConstantFESpacesTests.main(distribute, parts) + PArrays.toc!(t, "ConstantFESpaces") + end + + if prod(parts) == 4 + VisualizationTests.main(distribute, parts) + PArrays.toc!(t, "Visualization") + end - TestApp.AutodiffTests.main(distribute,parts) - PArrays.toc!(t,"Autodiff") + AutodiffTests.main(distribute, parts) + PArrays.toc!(t, "Autodiff") - if prod(parts) == 4 - TestApp.MacroDiscreteModelsTests.main(distribute,parts) - PArrays.toc!(t,"MacroDiscreteModels") + if prod(parts) == 4 + MacroDiscreteModelsTests.main(distribute, parts) + PArrays.toc!(t, "MacroDiscreteModels") + end end display(t) diff --git a/test/runtests.jl b/test/runtests.jl index 0b34b884..01796626 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,13 @@ module GridapDistributedTests -include("sequential/runtests.jl") +TESTCASE = get(ENV, "TESTCASE", "all") -include("mpi/runtests.jl") +if startswith(TESTCASE, "seq") || TESTCASE == "all" + include("sequential/runtests.jl") +end + +if startswith(TESTCASE, "mpi") || TESTCASE == "all" + include("mpi/runtests.jl") +end end # module diff --git a/test/sequential/runtests.jl b/test/sequential/runtests.jl index 981cef0f..23573913 100644 --- a/test/sequential/runtests.jl +++ b/test/sequential/runtests.jl @@ -2,48 +2,47 @@ module SequentialTests using Test -@time @testset "Geometry" begin include("GeometryTests.jl") end +TESTCASE = get(ENV, "TESTCASE", "all") -@time @testset "PeriodicBCs" begin include("PeriodicBCsTests.jl") end - -@time @testset "CellData" begin include("CellDataTests.jl") end - -@time @testset "FESpaces" begin include("FESpacesTests.jl") end - -@time @testset "MultiField" begin include("MultiFieldTests.jl") end - -@time @testset "issue_142" begin include("issue_142.jl") end - -@time @testset "Poisson" begin include("PoissonTests.jl") end - -@time @testset "PLaplacian" begin include("PLaplacianTests.jl") end - -@time @testset "DivConformingTests" begin include("DivConformingTests.jl") end - -@time @testset "SurfaceCouplingTests" begin include("SurfaceCouplingTests.jl") end - -@time @testset "TransientDistributedCellFieldTests" begin - include("TransientDistributedCellFieldTests.jl") +if TESTCASE ∈ ("all", "seq-geometry") + @time @testset "Geometry" begin include("GeometryTests.jl") end + @time @testset "PeriodicBCs" begin include("PeriodicBCsTests.jl") end + @time @testset "CellData" begin include("CellDataTests.jl") end end -@time @testset "TransientMultiFieldDistributedCellFieldTests" begin - include("TransientMultiFieldDistributedCellFieldTests.jl") +if TESTCASE ∈ ("all", "seq-fespaces") + @time @testset "FESpaces" begin include("FESpacesTests.jl") end + @time @testset "MultiField" begin include("MultiFieldTests.jl") end + @time @testset "issue_142" begin include("issue_142.jl") end + @time @testset "ZeroMeanFESpaces" begin include("ZeroMeanFESpacesTests.jl") end end -@time @testset "ZeroMeanFESpaces" begin include("ZeroMeanFESpacesTests.jl") end - -@time @testset "HeatEquation" begin include("HeatEquationTests.jl") end - -@time @testset "StokesOpenBoundary" begin include("StokesOpenBoundaryTests.jl") end - -@time @testset "StokesHdivDGTests.jl" begin include("StokesHdivDGTests.jl") end +if TESTCASE ∈ ("all", "seq-physics") + @time @testset "Poisson" begin include("PoissonTests.jl") end + @time @testset "PLaplacian" begin include("PLaplacianTests.jl") end + @time @testset "DivConformingTests" begin include("DivConformingTests.jl") end + @time @testset "SurfaceCouplingTests" begin include("SurfaceCouplingTests.jl") end + @time @testset "StokesHdivDGTests.jl" begin include("StokesHdivDGTests.jl") end +end -@time @testset "BlockSparseMatrixAssemblers" begin - include("BlockSparseMatrixAssemblersTests.jl") +if TESTCASE ∈ ("all", "seq-transient") + @time @testset "TransientDistributedCellFieldTests" begin + include("TransientDistributedCellFieldTests.jl") + end + @time @testset "TransientMultiFieldDistributedCellFieldTests" begin + include("TransientMultiFieldDistributedCellFieldTests.jl") + end + @time @testset "HeatEquation" begin include("HeatEquationTests.jl") end + @time @testset "StokesOpenBoundary" begin include("StokesOpenBoundaryTests.jl") end end -@time @testset "AdaptivityTests" begin - include("AdaptivityTests.jl") +if TESTCASE ∈ ("all", "seq-misc") + @time @testset "BlockSparseMatrixAssemblers" begin + include("BlockSparseMatrixAssemblersTests.jl") + end + @time @testset "AdaptivityTests" begin + include("AdaptivityTests.jl") + end end end # module From 03302be4614b0d7bd76b0b8464682e086b33b073 Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Fri, 13 Mar 2026 09:30:10 +1100 Subject: [PATCH 2/4] Added caching job, to avoid repeating precompilatin between jobs --- .github/workflows/ci.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0ae4ef7..523e2d84 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,19 +24,31 @@ concurrency: cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: + prime-cache: + name: Prime cache - ${{ matrix.version }} - ubuntu-latest - x64 + runs-on: ubuntu-latest + strategy: + matrix: + version: ['lts', '1'] + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + arch: x64 + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + test: - name: ${{ matrix.testcase }} - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} + needs: [prime-cache] + name: ${{ matrix.testcase }} - ${{ matrix.version }} - ubuntu-latest - x64 - ${{ github.event_name }} + runs-on: ubuntu-latest strategy: fail-fast: false matrix: version: - 'lts' - '1' - os: - - ubuntu-latest - arch: - - x64 testcase: - seq-geometry - seq-fespaces @@ -53,7 +65,7 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} + arch: x64 - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 @@ -65,6 +77,7 @@ jobs: verbose: true token: ${{ secrets.CODECOV_TOKEN }} flags: ${{ matrix.testcase }} + docs: name: Documentation runs-on: ubuntu-latest From 2cc6db03d511492bb6de58ba04bd081891d8aba6 Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Fri, 13 Mar 2026 09:48:26 +1100 Subject: [PATCH 3/4] Reordered test groups to make more sense --- .github/workflows/ci.yml | 2 ++ test/mpi/runtests_np4.jl | 1 + test/mpi/runtests_np4_body.jl | 23 ++++++++++++++--------- test/sequential/runtests.jl | 25 +++++++++++++------------ 4 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 523e2d84..9dc8a929 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,10 +54,12 @@ jobs: - seq-fespaces - seq-physics - seq-transient + - seq-adaptivity - seq-misc - mpi-geometry - mpi-fespaces - mpi-physics + - mpi-transient - mpi-adaptivity - mpi-misc steps: diff --git a/test/mpi/runtests_np4.jl b/test/mpi/runtests_np4.jl index 1592b9ea..3a15c544 100644 --- a/test/mpi/runtests_np4.jl +++ b/test/mpi/runtests_np4.jl @@ -23,6 +23,7 @@ include("../TransientMultiFieldDistributedCellFieldTests.jl") include("../ZeroMeanFESpacesTests.jl") include("../HeatEquationTests.jl") include("../StokesOpenBoundaryTests.jl") +include("../StokesHdivDGTests.jl") include("../AdaptivityTests.jl") include("../AdaptivityCartesianTests.jl") include("../AdaptivityUnstructuredTests.jl") diff --git a/test/mpi/runtests_np4_body.jl b/test/mpi/runtests_np4_body.jl index 680529ef..3ca4d9f0 100644 --- a/test/mpi/runtests_np4_body.jl +++ b/test/mpi/runtests_np4_body.jl @@ -26,6 +26,11 @@ function all_tests(distribute, parts) PeriodicBCsTests.main(distribute, parts) PArrays.toc!(t, "PeriodicBCs") + + if prod(parts) == 4 + ConstantFESpacesTests.main(distribute, parts) + PArrays.toc!(t, "ConstantFESpaces") + end end if TESTCASE ∈ ("all", "mpi-physics") @@ -38,20 +43,25 @@ function all_tests(distribute, parts) SurfaceCouplingTests.main(distribute, parts) PArrays.toc!(t, "SurfaceCoupling") - HeatEquationTests.main(distribute, parts) - PArrays.toc!(t, "HeatEquation") - StokesOpenBoundaryTests.main(distribute, parts) PArrays.toc!(t, "StokesOpenBoundary") + + StokesHdivDGTests.main(distribute, parts) + PArrays.toc!(t, "StokesHdivDG") end - if TESTCASE ∈ ("all", "mpi-adaptivity") + if TESTCASE ∈ ("all", "mpi-transient") TransientDistributedCellFieldTests.main(distribute, parts) PArrays.toc!(t, "TransientDistributedCellField") TransientMultiFieldDistributedCellFieldTests.main(distribute, parts) PArrays.toc!(t, "TransientMultiFieldDistributedCellField") + HeatEquationTests.main(distribute, parts) + PArrays.toc!(t, "HeatEquation") + end + + if TESTCASE ∈ ("all", "mpi-adaptivity") if prod(parts) == 4 AdaptivityTests.main(distribute) AdaptivityCartesianTests.main(distribute) @@ -67,11 +77,6 @@ function all_tests(distribute, parts) BlockPartitionedArraysTests.main(distribute, parts) PArrays.toc!(t, "BlockSparseMatrixAssemblers") - if prod(parts) == 4 - ConstantFESpacesTests.main(distribute, parts) - PArrays.toc!(t, "ConstantFESpaces") - end - if prod(parts) == 4 VisualizationTests.main(distribute, parts) PArrays.toc!(t, "Visualization") diff --git a/test/sequential/runtests.jl b/test/sequential/runtests.jl index 23573913..2f13ef9a 100644 --- a/test/sequential/runtests.jl +++ b/test/sequential/runtests.jl @@ -5,9 +5,8 @@ using Test TESTCASE = get(ENV, "TESTCASE", "all") if TESTCASE ∈ ("all", "seq-geometry") - @time @testset "Geometry" begin include("GeometryTests.jl") end - @time @testset "PeriodicBCs" begin include("PeriodicBCsTests.jl") end - @time @testset "CellData" begin include("CellDataTests.jl") end + @time @testset "Geometry" begin include("GeometryTests.jl") end + @time @testset "CellData" begin include("CellDataTests.jl") end end if TESTCASE ∈ ("all", "seq-fespaces") @@ -15,14 +14,16 @@ if TESTCASE ∈ ("all", "seq-fespaces") @time @testset "MultiField" begin include("MultiFieldTests.jl") end @time @testset "issue_142" begin include("issue_142.jl") end @time @testset "ZeroMeanFESpaces" begin include("ZeroMeanFESpacesTests.jl") end + @time @testset "PeriodicBCs" begin include("PeriodicBCsTests.jl") end end if TESTCASE ∈ ("all", "seq-physics") - @time @testset "Poisson" begin include("PoissonTests.jl") end - @time @testset "PLaplacian" begin include("PLaplacianTests.jl") end - @time @testset "DivConformingTests" begin include("DivConformingTests.jl") end + @time @testset "Poisson" begin include("PoissonTests.jl") end + @time @testset "PLaplacian" begin include("PLaplacianTests.jl") end + @time @testset "DivConformingTests" begin include("DivConformingTests.jl") end @time @testset "SurfaceCouplingTests" begin include("SurfaceCouplingTests.jl") end - @time @testset "StokesHdivDGTests.jl" begin include("StokesHdivDGTests.jl") end + @time @testset "StokesHdivDGTests" begin include("StokesHdivDGTests.jl") end + @time @testset "StokesOpenBoundary" begin include("StokesOpenBoundaryTests.jl") end end if TESTCASE ∈ ("all", "seq-transient") @@ -32,17 +33,17 @@ if TESTCASE ∈ ("all", "seq-transient") @time @testset "TransientMultiFieldDistributedCellFieldTests" begin include("TransientMultiFieldDistributedCellFieldTests.jl") end - @time @testset "HeatEquation" begin include("HeatEquationTests.jl") end - @time @testset "StokesOpenBoundary" begin include("StokesOpenBoundaryTests.jl") end + @time @testset "HeatEquation" begin include("HeatEquationTests.jl") end +end + +if TESTCASE ∈ ("all", "seq-adaptivity") + @time @testset "AdaptivityTests" begin include("AdaptivityTests.jl") end end if TESTCASE ∈ ("all", "seq-misc") @time @testset "BlockSparseMatrixAssemblers" begin include("BlockSparseMatrixAssemblersTests.jl") end - @time @testset "AdaptivityTests" begin - include("AdaptivityTests.jl") - end end end # module From 06c59a5b7b01d7d79a371a28ae17bf53563df482 Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Fri, 13 Mar 2026 10:14:51 +1100 Subject: [PATCH 4/4] Minor buffixes in tests --- test/CellDataTests.jl | 2 +- test/mpi/runtests_np4_body.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/CellDataTests.jl b/test/CellDataTests.jl index 3baa2b88..16476233 100644 --- a/test/CellDataTests.jl +++ b/test/CellDataTests.jl @@ -30,7 +30,7 @@ function main(distribute,parts) pvd[0.1] = createvtk(Ω,joinpath(output,"Ω_1"),cellfields=["f"=>f]) pvd[0.2] = createvtk(Ω,joinpath(output,"Ω_2"),cellfields=["f"=>f]) end - @test isfile(joinpath(output,"Ω_pvd")*".pvd") + i_am_main(ranks) && @test isfile(joinpath(output,"Ω_pvd")*".pvd") x_Γ = get_cell_points(Γ) @test isa(f(x_Γ),AbstractArray) diff --git a/test/mpi/runtests_np4_body.jl b/test/mpi/runtests_np4_body.jl index 3ca4d9f0..161a2948 100644 --- a/test/mpi/runtests_np4_body.jl +++ b/test/mpi/runtests_np4_body.jl @@ -91,5 +91,5 @@ function all_tests(distribute, parts) end end - display(t) + isempty(t.timings) || display(t) end