From 759e42939f4713ab9364fc0841f3dee24497c44c Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Thu, 16 Apr 2026 15:06:44 +0200 Subject: [PATCH 01/33] feat(ci): parallelize reference tests via bucketing Split reference tests into N buckets (default 4) that run in parallel CI jobs. Each bucket runs mod1(i, N) == j of the @reference_test invocations, controlled by REFTEST_BUCKET and REFTEST_NBUCKETS env vars. Local runs are unaffected (all tests run when env vars are unset). The consolidation job now merges bucket artifacts per backend before combining across backends, and correctly computes missing_files.txt using the new skipped_names.txt output. --- ReferenceTests/src/database.jl | 85 +++++++++++++++++++++++----------- ReferenceTests/src/runtests.jl | 6 +++ 2 files changed, 64 insertions(+), 27 deletions(-) diff --git a/ReferenceTests/src/database.jl b/ReferenceTests/src/database.jl index 73372ca5baa..c38bc0e15e2 100644 --- a/ReferenceTests/src/database.jl +++ b/ReferenceTests/src/database.jl @@ -21,8 +21,23 @@ const RECORDING_DIR = Base.RefValue{String}() const SKIP_TITLES = Set{String}() const SKIP_FUNCTIONS = Set{Symbol}() const COUNTER = Ref(0) +const TOTAL_COUNTER = Ref(0) # counts all @reference_test invocations, used for bucket assignment const SKIPPED_NAMES = Set{String}() # names skipped due to title exclusion or function exclusion +""" + should_run_in_bucket(test_index::Int) + +Check whether a test with the given index should run in the current bucket. +Bucketing is controlled by the `REFTEST_BUCKET` and `REFTEST_NBUCKETS` environment variables. +If either is unset, all tests run (no bucketing). +""" +function should_run_in_bucket(test_index::Int) + nbuckets_str = get(ENV, "REFTEST_NBUCKETS", nothing) + bucket_str = get(ENV, "REFTEST_BUCKET", nothing) + (nbuckets_str === nothing || bucket_str === nothing) && return true + return mod1(test_index, parse(Int, nbuckets_str)) == parse(Int, bucket_str) +end + """ @reference_test(name, code) @@ -34,35 +49,40 @@ macro reference_test(name, code) funcs = used_functions(code) skip = (title in SKIP_TITLES) || any(x -> x in funcs, SKIP_FUNCTIONS) return quote - @testset $(title) begin - if $skip - @test_broken false - mark_skipped!($title) - else - t1 = time() - if $title in $REGISTERED_TESTS - error("title must be unique. Duplicate title: $($title)") + ReferenceTests.TOTAL_COUNTER[] += 1 + if !ReferenceTests.should_run_in_bucket(ReferenceTests.TOTAL_COUNTER[]) + # Not in this bucket, skip entirely + else + @testset $(title) begin + if $skip + @test_broken false + mark_skipped!($title) + else + t1 = time() + if $title in $REGISTERED_TESTS + error("title must be unique. Duplicate title: $($title)") + end + println("running $(lpad(COUNTER[] += 1, 3)): $($title)") + Makie.set_theme!(; + size = (500, 500), + CairoMakie = (; px_per_unit = 1), + GLMakie = (; scalefactor = 1, px_per_unit = 1), + WGLMakie = (; scalefactor = 1, px_per_unit = 1) + ) + ReferenceTests.RNG.seed_rng!() + result = let + $(esc(code)) + end + @test save_result(joinpath(RECORDING_DIR[], $title), result) + push!($REGISTERED_TESTS, $title) + elapsed = round(time() - t1; digits = 5) + total = Sys.total_memory() + mem = round((total - Sys.free_memory()) / 10^9; digits = 3) + # TODO, write to file and create an overview in the end, similar to the benchmark results! + println("Used $(mem)gb of $(round(total / 10^9; digits = 3))gb RAM, time: $(elapsed)s") end - println("running $(lpad(COUNTER[] += 1, 3)): $($title)") - Makie.set_theme!(; - size = (500, 500), - CairoMakie = (; px_per_unit = 1), - GLMakie = (; scalefactor = 1, px_per_unit = 1), - WGLMakie = (; scalefactor = 1, px_per_unit = 1) - ) - ReferenceTests.RNG.seed_rng!() - result = let - $(esc(code)) - end - @test save_result(joinpath(RECORDING_DIR[], $title), result) - push!($REGISTERED_TESTS, $title) - elapsed = round(time() - t1; digits = 5) - total = Sys.total_memory() - mem = round((total - Sys.free_memory()) / 10^9; digits = 3) - # TODO, write to file and create an overview in the end, similar to the benchmark results! - println("Used $(mem)gb of $(round(total / 10^9; digits = 3))gb RAM, time: $(elapsed)s") + GC.gc(true) # Run GC, to catch accumulating memory early on (used RAM) end - GC.gc(true) # Run GC, to catch accumulating memory early on (used RAM) end end end @@ -115,6 +135,16 @@ macro include_reference_tests(backend::Symbol, path, paths...) # prefix the recordings with the backend name so that each backend has its own versions ReferenceTests.RECORDING_DIR[] = joinpath(recording_dir, "recorded", $(string(backend))) mkpath(ReferenceTests.RECORDING_DIR[]) + + # Log bucket configuration + let + nb = get(ENV, "REFTEST_NBUCKETS", nothing) + b = get(ENV, "REFTEST_BUCKET", nothing) + if nb !== nothing && b !== nothing + @info "Running reference test bucket $(b)/$(nb)" + end + end + @testset "Reference tests $($(string(backend)))" begin empty!(ReferenceTests.REGISTERED_TESTS) for include_path in include_paths @@ -125,6 +155,7 @@ macro include_reference_tests(backend::Symbol, path, paths...) recording_dir = recording_dir empty!(ReferenceTests.REGISTERED_TESTS) ReferenceTests.COUNTER[] = 0 + ReferenceTests.TOTAL_COUNTER[] = 0 (recorded_files, recording_dir) end ) diff --git a/ReferenceTests/src/runtests.jl b/ReferenceTests/src/runtests.jl index e00effcdb96..16a88636c15 100644 --- a/ReferenceTests/src/runtests.jl +++ b/ReferenceTests/src/runtests.jl @@ -37,6 +37,12 @@ function record_comparison(base_folder::String, backend::String; record_folder_n end end + open(joinpath(base_folder, "skipped_names.txt"), "w") do file + for name in sort!(collect(SKIPPED_NAMES)) + println(file, joinpath(backend, "$name.png")) + end + end + return missing_refimages, scores end From 586ee5a6b2f4a8c42529d5a92be1045e295ec8ae Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 10:17:25 +0200 Subject: [PATCH 02/33] fix(wglmakie): make reference tests independent of execution order - html_widgets resize_to tests: add explicit WGLMakie.activate!() calls so they don't depend on px_per_unit/scalefactor state left by earlier tests (which may be skipped under bucketing) - deletion tests: replace display(f) with colorbuffer(f) + getscreen() since the inline display path doesn't reliably wait for the WGLMakie session to be established --- ReferenceTests/src/tests/updating.jl | 10 ++++++++-- WGLMakie/test/html_widgets_refimages.jl | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ReferenceTests/src/tests/updating.jl b/ReferenceTests/src/tests/updating.jl index a8089c411bf..17ff041c6e2 100644 --- a/ReferenceTests/src/tests/updating.jl +++ b/ReferenceTests/src/tests/updating.jl @@ -108,7 +108,11 @@ end @reference_test "deletion" begin f = Figure() l = Legend(f[1, 1], [LineElement(color = :red)], ["Line"]) - s = display(f) + # Use colorbuffer to initialize the screen with a properly established session. + # The generic `display(f)` inline path doesn't reliably wait for the WGLMakie session. + Makie.colorbuffer(f) + s = Makie.getscreen(f.scene) + @test !isnothing(s) @test f.scene.current_screens[1] === s @test f.scene.children[1].current_screens[1] === s @test f.scene.children[1].children[1].current_screens[1] === s @@ -123,7 +127,9 @@ end @reference_test "deletion and observable args" begin obs = Observable(1:5) f, ax, pl = scatter(obs; markersize = 150) - s = display(f) + # Use colorbuffer to initialize the screen with a properly established session. + # The generic `display(f)` inline path doesn't reliably wait for the WGLMakie session. + Makie.colorbuffer(f) # So, for GLMakie it will be 2, since we register an additional listener for # State changes for the on demand renderloop @test length(obs.listeners) in (1, 2) diff --git a/WGLMakie/test/html_widgets_refimages.jl b/WGLMakie/test/html_widgets_refimages.jl index d12a3b6bf60..d19ec88b6ee 100644 --- a/WGLMakie/test/html_widgets_refimages.jl +++ b/WGLMakie/test/html_widgets_refimages.jl @@ -283,6 +283,7 @@ end end @reference_test "resize_to parent with fixed size div" begin + WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = App() do fig = create_test_figure() DOM.div( @@ -297,6 +298,7 @@ end end @reference_test "resize_to parent with ResizableCard" begin + WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = App() do fig = create_test_figure() card = TestResizableCard(WGLMakie.WithConfig(fig; use_html_widgets = true, resize_to = :parent)) @@ -309,6 +311,7 @@ end end @reference_test "resize_to parent nested in styled container" begin + WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = App() do fig = create_test_figure() DOM.div( @@ -326,6 +329,7 @@ end end @reference_test "resize_to parent with multiple figures side by side" begin + WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = App() do fig1 = Figure(; size = (600, 400)) ax1 = Axis(fig1[1, 1]; title = "Left Plot") @@ -356,6 +360,7 @@ end end @reference_test "resize_to body baseline" begin + WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = Bonito.App() do fig = create_test_figure() DOM.div( From 55abaf8a381943cd2ed062bd12b54b69b79835fd Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 10:27:31 +0200 Subject: [PATCH 03/33] ci: apply bucketing to new reusable workflow structure Adapt the bucket parallelization to the refactored CI that uses reusable workflows (_cairomakie.yml, _glmakie.yml, _wglmakie.yml) and a consolidation step in _reference-tests.yml. --- .github/workflows/_cairomakie.yml | 8 ++- .github/workflows/_glmakie.yml | 8 ++- .github/workflows/_reference-tests.yml | 75 ++++++++++++++++---------- .github/workflows/_wglmakie.yml | 10 ++-- 4 files changed, 66 insertions(+), 35 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index afce54308a2..37b4ff79258 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -4,7 +4,7 @@ on: jobs: test: - name: CairoMakie Julia ${{ matrix.version }} + name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -16,6 +16,7 @@ jobs: - ubuntu-latest arch: - x64 + bucket: [1, 2, 3, 4] steps: - name: Checkout uses: actions/checkout@v6 @@ -34,13 +35,16 @@ jobs: pkg"dev ./Makie ./CairoMakie ./ReferenceTests ./ComputePipeline" - name: Run the tests continue-on-error: true + env: + REFTEST_BUCKET: ${{ matrix.bucket }} + REFTEST_NBUCKETS: '4' run: > julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie", coverage=true)' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - name: Upload test Artifacts uses: actions/upload-artifact@v7 with: - name: ReferenceImages_CairoMakie_${{ matrix.version }} + name: ReferenceImages_CairoMakie_${{ matrix.version }}_${{ matrix.bucket }} path: ./CairoMakie/test/reference_images/ - name: Fail after artifacts if tests failed if: ${{ env.TESTS_SUCCESSFUL != 'true' }} diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 6572dba7828..d880d1f923f 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -4,7 +4,7 @@ on: jobs: test: - name: GLMakie Julia ${{ matrix.version }} + name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 env: MODERNGL_DEBUGGING: "true" runs-on: ${{ matrix.os }} @@ -18,6 +18,7 @@ jobs: - ubuntu-latest arch: - x64 + bucket: [1, 2, 3, 4] steps: - name: Checkout uses: actions/checkout@v6 @@ -38,13 +39,16 @@ jobs: - name: Run the tests id: referencetests continue-on-error: true + env: + REFTEST_BUCKET: ${{ matrix.bucket }} + REFTEST_NBUCKETS: '4' run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie", coverage=true)' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - name: Upload test Artifacts uses: actions/upload-artifact@v7 with: - name: ReferenceImages_GLMakie_${{ matrix.version }} + name: ReferenceImages_GLMakie_${{ matrix.version }}_${{ matrix.bucket }} path: | ./GLMakie/test/reference_images/ - name: Fail after artifacts if tests failed diff --git a/.github/workflows/_reference-tests.yml b/.github/workflows/_reference-tests.yml index 6076b788d0b..d3326e179ec 100644 --- a/.github/workflows/_reference-tests.yml +++ b/.github/workflows/_reference-tests.yml @@ -18,42 +18,61 @@ jobs: if: always() needs: [cairomakie, glmakie, wglmakie] steps: - - uses: actions/download-artifact@v8 - with: - name: ReferenceImages_WGLMakie_1 - path: ./ReferenceImages/WGLMakie - - uses: actions/download-artifact@v8 + - name: Download all bucket artifacts for Julia 1 + uses: actions/download-artifact@v8 with: - name: ReferenceImages_CairoMakie_1 - path: ./ReferenceImages/CairoMakie - - uses: actions/download-artifact@v8 - with: - name: ReferenceImages_GLMakie_1 - path: ./ReferenceImages/GLMakie + pattern: ReferenceImages_*_1_* + path: ./BucketArtifacts/ - name: Consolidate reference image folders run: | - baseDir="./ReferenceImages" + baseDir="./BucketArtifacts" + outDir="./ReferenceImagesCombined" + mkdir -p "$outDir" + + # Copy reference images from the first available artifact (same across all buckets/backends) + first_artifact=$(ls -d ${baseDir}/ReferenceImages_*_1_*/ 2>/dev/null | head -1) + if [ -n "$first_artifact" ] && [ -d "${first_artifact}/reference" ]; then + cp -r "${first_artifact}/reference/." "$outDir/reference/" + fi + + # Initialize output files + > "$outDir/scores.tsv" + > "$outDir/new_files.txt" + > "$outDir/missing_files.txt" + + for backend in CairoMakie GLMakie WGLMakie; do + mkdir -p "$outDir/recorded/${backend}/" + + # Merge all buckets for this backend + for bucket_dir in ${baseDir}/ReferenceImages_${backend}_1_*/; do + [ -d "$bucket_dir" ] || continue + + # Copy recorded images (no overlap between buckets) + if [ -d "${bucket_dir}/recorded/${backend}/" ]; then + cp -r "${bucket_dir}/recorded/${backend}/." "$outDir/recorded/${backend}/" + fi - # Create new top-level directory for combined files - mkdir -p "./ReferenceImagesCombined" + # Concatenate scores and new_files from each bucket + [ -f "${bucket_dir}/scores.tsv" ] && cat "${bucket_dir}/scores.tsv" >> "$outDir/scores.tsv" + [ -f "${bucket_dir}/new_files.txt" ] && cat "${bucket_dir}/new_files.txt" >> "$outDir/new_files.txt" + done - # Copy the reference folder from GLMakie, it's the same for all backends - cp -r "${baseDir}/GLMakie/reference/." "./ReferenceImagesCombined/reference/" + # Compute missing_files: reference files that were neither recorded nor skipped + if [ -d "$outDir/reference/${backend}" ]; then + first_bucket=$(ls -d ${baseDir}/ReferenceImages_${backend}_1_*/ 2>/dev/null | head -1) - # Initialize empty files for concatenation - > "./ReferenceImagesCombined/scores.tsv" - > "./ReferenceImagesCombined/new_files.txt" + # Build sorted list of files that are accounted for (recorded + skipped) + { + [ -d "$outDir/recorded/${backend}" ] && (cd "$outDir/recorded" && find "${backend}" -type f) + [ -n "$first_bucket" ] && [ -f "${first_bucket}/skipped_names.txt" ] && cat "${first_bucket}/skipped_names.txt" + } | sort -u > /tmp/have_or_skip.txt - # Loop through the directories and concatenate the files, and copy recorded folders - for dir in WGLMakie CairoMakie GLMakie; do - # Concatenate scores.tsv, new_files.txt and missing_files.txt - cat "${baseDir}/${dir}/scores.tsv" >> "./ReferenceImagesCombined/scores.tsv" - cat "${baseDir}/${dir}/new_files.txt" >> "./ReferenceImagesCombined/new_files.txt" - cat "${baseDir}/${dir}/missing_files.txt" >> "./ReferenceImagesCombined/missing_files.txt" + # Reference files + (cd "$outDir/reference" && find "${backend}" -type f) | sort > /tmp/ref_files.txt - # Copy recorded folder - mkdir -p "./ReferenceImagesCombined/recorded/${dir}/" - cp -r "${baseDir}/${dir}/recorded/${dir}/." "./ReferenceImagesCombined/recorded/${dir}/" + # Missing = reference - (recorded ∪ skipped) + comm -23 /tmp/ref_files.txt /tmp/have_or_skip.txt >> "$outDir/missing_files.txt" + fi done echo "Files and folders have been successfully combined into ReferenceImagesCombined." diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index bc037485a87..23b66d17a09 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -4,7 +4,7 @@ on: jobs: test: - name: WGLMakie Julia ${{ matrix.version }} + name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -16,6 +16,7 @@ jobs: - ubuntu-latest arch: - x64 + bucket: [1, 2, 3, 4] steps: - name: Checkout uses: actions/checkout@v6 @@ -35,18 +36,21 @@ jobs: pkg"dev ./Makie ./WGLMakie ./ReferenceTests ./ComputePipeline" - name: Run the tests continue-on-error: true + env: + REFTEST_BUCKET: ${{ matrix.bucket }} + REFTEST_NBUCKETS: '4' run: > DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie", coverage=true)' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - name: Upload test Artifacts uses: actions/upload-artifact@v7 with: - name: ReferenceImages_WGLMakie_${{ matrix.version }} + name: ReferenceImages_WGLMakie_${{ matrix.version }}_${{ matrix.bucket }} path: ./WGLMakie/test/reference_images/ - name: Upload test Electron logs uses: actions/upload-artifact@v7 with: - name: Electron_Logs_WGLMakie_${{ matrix.version }} + name: Electron_Logs_WGLMakie_${{ matrix.version }}_${{ matrix.bucket }} path: ./WGLMakie/test/electron.log - name: Fail after artifacts if tests failed if: ${{ env.TESTS_SUCCESSFUL != 'true' }} From 8d02ac57573758b68c81b0167e79dca768dc4709 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 10:57:36 +0200 Subject: [PATCH 04/33] ci: share Julia cache across buckets of same backend+version Use a custom cache-name with include-matrix: false so all 4 buckets of the same backend and Julia version share one cache entry. Without this, each bucket gets its own cache key (including the bucket number), causing every bucket to precompile independently (~11 min each). On the first run buckets still precompile in parallel (unavoidable), but on subsequent runs all buckets hit the shared cache immediately. --- .github/workflows/_cairomakie.yml | 3 +++ .github/workflows/_glmakie.yml | 3 +++ .github/workflows/_wglmakie.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 37b4ff79258..90e7220c07c 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -25,6 +25,9 @@ jobs: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v3 + with: + cache-name: julia-cache-cairomakie-${{ matrix.version }} + include-matrix: false - name: Install Julia dependencies shell: julia --project=monorepo {0} run: | diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index d880d1f923f..9be648a5d14 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -27,6 +27,9 @@ jobs: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v3 + with: + cache-name: julia-cache-glmakie-${{ matrix.version }} + include-matrix: false - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Install Julia dependencies shell: julia --project=monorepo {0} diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 23b66d17a09..5616fc65d3a 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -25,6 +25,9 @@ jobs: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - uses: julia-actions/cache@v3 + with: + cache-name: julia-cache-wglmakie-${{ matrix.version }} + include-matrix: false - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Install Julia dependencies shell: julia --project=monorepo {0} From 15c480008c93f872b8045598fa6c04c75049fc83 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 11:01:16 +0200 Subject: [PATCH 05/33] refactor: use contiguous chunks instead of interleaved bucket assignment Contiguous chunks (tests 1-95 in bucket 1, 96-190 in bucket 2, etc.) mean each bucket touches fewer distinct code paths than interleaved mod1(i, N) assignment, reducing JIT/compilation overhead. A dry-run counting pass determines the total number of tests before the real run. Since the test files are already compiled from the counting pass, the second include is essentially free. --- ReferenceTests/src/database.jl | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/ReferenceTests/src/database.jl b/ReferenceTests/src/database.jl index c38bc0e15e2..f037d433318 100644 --- a/ReferenceTests/src/database.jl +++ b/ReferenceTests/src/database.jl @@ -22,6 +22,8 @@ const SKIP_TITLES = Set{String}() const SKIP_FUNCTIONS = Set{Symbol}() const COUNTER = Ref(0) const TOTAL_COUNTER = Ref(0) # counts all @reference_test invocations, used for bucket assignment +const TOTAL_TESTS = Ref(0) # total number of tests across all files, set before running for chunked bucketing +const COUNT_ONLY = Ref(false) # when true, @reference_test only counts without running const SKIPPED_NAMES = Set{String}() # names skipped due to title exclusion or function exclusion """ @@ -35,7 +37,17 @@ function should_run_in_bucket(test_index::Int) nbuckets_str = get(ENV, "REFTEST_NBUCKETS", nothing) bucket_str = get(ENV, "REFTEST_BUCKET", nothing) (nbuckets_str === nothing || bucket_str === nothing) && return true - return mod1(test_index, parse(Int, nbuckets_str)) == parse(Int, bucket_str) + nbuckets = parse(Int, nbuckets_str) + bucket = parse(Int, bucket_str) + # Use contiguous chunks rather than interleaving so that each bucket + # touches fewer distinct code paths, reducing JIT/compilation overhead. + ntotal = TOTAL_TESTS[] + if ntotal <= 0 + # Total unknown, fall back to interleaved assignment + return mod1(test_index, nbuckets) == bucket + end + chunk_size = cld(ntotal, nbuckets) # ceil division + return (bucket - 1) * chunk_size < test_index <= min(bucket * chunk_size, ntotal) end """ @@ -50,7 +62,9 @@ macro reference_test(name, code) skip = (title in SKIP_TITLES) || any(x -> x in funcs, SKIP_FUNCTIONS) return quote ReferenceTests.TOTAL_COUNTER[] += 1 - if !ReferenceTests.should_run_in_bucket(ReferenceTests.TOTAL_COUNTER[]) + if ReferenceTests.COUNT_ONLY[] + # Counting pass, don't run anything + elseif !ReferenceTests.should_run_in_bucket(ReferenceTests.TOTAL_COUNTER[]) # Not in this bucket, skip entirely else @testset $(title) begin @@ -136,12 +150,24 @@ macro include_reference_tests(backend::Symbol, path, paths...) ReferenceTests.RECORDING_DIR[] = joinpath(recording_dir, "recorded", $(string(backend))) mkpath(ReferenceTests.RECORDING_DIR[]) + # Count total tests via a dry-run pass (test files are already + # compiled so the second include is essentially free) + ReferenceTests.COUNT_ONLY[] = true + ReferenceTests.TOTAL_COUNTER[] = 0 + for include_path in include_paths + include(include_path) + end + ReferenceTests.TOTAL_TESTS[] = ReferenceTests.TOTAL_COUNTER[] + ReferenceTests.COUNT_ONLY[] = false + ReferenceTests.TOTAL_COUNTER[] = 0 + # Log bucket configuration let nb = get(ENV, "REFTEST_NBUCKETS", nothing) b = get(ENV, "REFTEST_BUCKET", nothing) if nb !== nothing && b !== nothing - @info "Running reference test bucket $(b)/$(nb)" + ntotal = ReferenceTests.TOTAL_TESTS[] + @info "Running reference test bucket $(b)/$(nb) ($(ntotal) total tests)" end end From edac37d1f5b9a8aa16a5b37e24e78ddd3a3197a0 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 11:35:13 +0200 Subject: [PATCH 06/33] ci: add precompilation setup job, reduce Cairo/GL to 2 buckets Each backend now has a setup job that installs packages and runs Pkg.precompile() before the bucket jobs start. Bucket jobs restore the shared cache, so precompilation is already done. Bucket counts adjusted to match backend speed: - CairoMakie: 2 buckets (faster backend) - GLMakie: 2 buckets (faster backend) - WGLMakie: 4 buckets (slowest, ~1h unbucketed) This reduces total runner-hours while keeping wall-clock time low, which matters with limited org runner capacity. --- .github/workflows/_cairomakie.yml | 47 ++++++++++++++++++++---------- .github/workflows/_glmakie.yml | 48 +++++++++++++++++++++---------- .github/workflows/_wglmakie.yml | 42 +++++++++++++++++++-------- 3 files changed, 95 insertions(+), 42 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 90e7220c07c..009801b3285 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -3,27 +3,45 @@ on: workflow_call: jobs: + setup: + name: Setup CairoMakie Julia ${{ matrix.version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: ['1.10', '1'] + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - uses: julia-actions/cache@v3 + with: + cache-name: julia-cache-cairomakie-${{ matrix.version }} + include-matrix: false + - name: Install and precompile + shell: julia --project=monorepo {0} + run: | + using Pkg; + pkg"registry up" + Pkg.update() + pkg"dev ./Makie ./CairoMakie ./ReferenceTests ./ComputePipeline" + Pkg.precompile() + test: - name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 - runs-on: ${{ matrix.os }} + name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 + needs: setup + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - version: - - '1.10' - - '1' - os: - - ubuntu-latest - arch: - - x64 - bucket: [1, 2, 3, 4] + version: ['1.10', '1'] + bucket: [1, 2] steps: - - name: Checkout - uses: actions/checkout@v6 + - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - uses: julia-actions/cache@v3 with: cache-name: julia-cache-cairomakie-${{ matrix.version }} @@ -32,7 +50,6 @@ jobs: shell: julia --project=monorepo {0} run: | using Pkg; - # dev mono repo versions pkg"registry up" Pkg.update() pkg"dev ./Makie ./CairoMakie ./ReferenceTests ./ComputePipeline" @@ -40,7 +57,7 @@ jobs: continue-on-error: true env: REFTEST_BUCKET: ${{ matrix.bucket }} - REFTEST_NBUCKETS: '4' + REFTEST_NBUCKETS: '2' run: > julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie", coverage=true)' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 9be648a5d14..884f204bce0 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -3,29 +3,48 @@ on: workflow_call: jobs: + setup: + name: Setup GLMakie Julia ${{ matrix.version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: ['1.10', '1'] + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - uses: julia-actions/cache@v3 + with: + cache-name: julia-cache-glmakie-${{ matrix.version }} + include-matrix: false + - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils + - name: Install and precompile + shell: julia --project=monorepo {0} + run: | + using Pkg; + pkg"registry up" + Pkg.update() + pkg"dev ./Makie ./GLMakie ./ReferenceTests ./ComputePipeline" + Pkg.precompile() + test: - name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 + name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 + needs: setup env: MODERNGL_DEBUGGING: "true" - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - version: - - '1.10' - - '1' - os: - - ubuntu-latest - arch: - - x64 - bucket: [1, 2, 3, 4] + version: ['1.10', '1'] + bucket: [1, 2] steps: - - name: Checkout - uses: actions/checkout@v6 + - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - uses: julia-actions/cache@v3 with: cache-name: julia-cache-glmakie-${{ matrix.version }} @@ -35,7 +54,6 @@ jobs: shell: julia --project=monorepo {0} run: | using Pkg; - # dev mono repo versions pkg"registry up" Pkg.update() pkg"dev ./Makie ./GLMakie ./ReferenceTests ./ComputePipeline" @@ -44,7 +62,7 @@ jobs: continue-on-error: true env: REFTEST_BUCKET: ${{ matrix.bucket }} - REFTEST_NBUCKETS: '4' + REFTEST_NBUCKETS: '2' run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie", coverage=true)' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 5616fc65d3a..6c5c3448598 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -3,27 +3,46 @@ on: workflow_call: jobs: + setup: + name: Setup WGLMakie Julia ${{ matrix.version }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: ['1.10', '1'] + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - uses: julia-actions/cache@v3 + with: + cache-name: julia-cache-wglmakie-${{ matrix.version }} + include-matrix: false + - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev + - name: Install and precompile + shell: julia --project=monorepo {0} + run: | + using Pkg; + pkg"registry up" + Pkg.update() + pkg"dev ./Makie ./WGLMakie ./ReferenceTests ./ComputePipeline" + Pkg.precompile() + test: name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 - runs-on: ${{ matrix.os }} + needs: setup + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - version: - - '1.10' - - '1' - os: - - ubuntu-latest - arch: - - x64 + version: ['1.10', '1'] bucket: [1, 2, 3, 4] steps: - - name: Checkout - uses: actions/checkout@v6 + - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - uses: julia-actions/cache@v3 with: cache-name: julia-cache-wglmakie-${{ matrix.version }} @@ -33,7 +52,6 @@ jobs: shell: julia --project=monorepo {0} run: | using Pkg; - # dev mono repo versions pkg"registry up" Pkg.update() pkg"dev ./Makie ./WGLMakie ./ReferenceTests ./ComputePipeline" From 87f3c6a9f2f268eb0c0bd439831b843500984d08 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 11:38:16 +0200 Subject: [PATCH 07/33] ci: use Pkg.test for setup precompilation via PRECOMPILE_ONLY Use Pkg.test with PRECOMPILE_ONLY=true in the setup job instead of Pkg.precompile(). This ensures the test environment is resolved and precompiled with exactly the same settings and dependencies as the real test run. The test scripts exit(0) immediately when the flag is set, after Pkg.test has done its precompilation work. --- .github/workflows/_cairomakie.yml | 7 +++++-- .github/workflows/_glmakie.yml | 9 +++++++-- .github/workflows/_wglmakie.yml | 9 +++++++-- CairoMakie/test/runtests.jl | 3 +++ GLMakie/test/runtests.jl | 3 +++ WGLMakie/test/runtests.jl | 4 ++++ 6 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 009801b3285..4ba9f39d05a 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -19,14 +19,17 @@ jobs: with: cache-name: julia-cache-cairomakie-${{ matrix.version }} include-matrix: false - - name: Install and precompile + - name: Install Julia dependencies shell: julia --project=monorepo {0} run: | using Pkg; pkg"registry up" Pkg.update() pkg"dev ./Makie ./CairoMakie ./ReferenceTests ./ComputePipeline" - Pkg.precompile() + - name: Precompile via Pkg.test + env: + PRECOMPILE_ONLY: 'true' + run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' test: name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 884f204bce0..f051ac2849a 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -20,14 +20,19 @@ jobs: cache-name: julia-cache-glmakie-${{ matrix.version }} include-matrix: false - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - - name: Install and precompile + - name: Install Julia dependencies shell: julia --project=monorepo {0} run: | using Pkg; pkg"registry up" Pkg.update() pkg"dev ./Makie ./GLMakie ./ReferenceTests ./ComputePipeline" - Pkg.precompile() + - name: Precompile via Pkg.test + env: + PRECOMPILE_ONLY: 'true' + run: > + DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' test: name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 6c5c3448598..77cdd39c0f3 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -20,14 +20,19 @@ jobs: cache-name: julia-cache-wglmakie-${{ matrix.version }} include-matrix: false - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - - name: Install and precompile + - name: Install Julia dependencies shell: julia --project=monorepo {0} run: | using Pkg; pkg"registry up" Pkg.update() pkg"dev ./Makie ./WGLMakie ./ReferenceTests ./ComputePipeline" - Pkg.precompile() + - name: Precompile via Pkg.test + env: + PRECOMPILE_ONLY: 'true' + run: > + DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' test: name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 diff --git a/CairoMakie/test/runtests.jl b/CairoMakie/test/runtests.jl index 7d2d2e7d2e4..bf38203cb11 100644 --- a/CairoMakie/test/runtests.jl +++ b/CairoMakie/test/runtests.jl @@ -1,5 +1,8 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" +# Allow Pkg.test to be used purely for precompilation (setup job in CI) +get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) + using Test using CairoMakie using Makie.FileIO diff --git a/GLMakie/test/runtests.jl b/GLMakie/test/runtests.jl index 47dfbc3de7b..f47d1edc424 100644 --- a/GLMakie/test/runtests.jl +++ b/GLMakie/test/runtests.jl @@ -1,5 +1,8 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" +# Allow Pkg.test to be used purely for precompilation (setup job in CI) +get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) + using Makie using GLMakie, Test using FileIO diff --git a/WGLMakie/test/runtests.jl b/WGLMakie/test/runtests.jl index 5f468350376..d24b3e94cc4 100644 --- a/WGLMakie/test/runtests.jl +++ b/WGLMakie/test/runtests.jl @@ -1,4 +1,8 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" + +# Allow Pkg.test to be used purely for precompilation (setup job in CI) +get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) + ENV["ELECTRON_LOG_FILE"] = joinpath(@__DIR__, "electron.log") ENV["ELECTRON_ENABLE_LOGGING"] = "true" From f186eef496f084ad972fef6eb3efbd53c3ea442f Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 11:41:01 +0200 Subject: [PATCH 08/33] ci: transfer precompiled depot via artifact instead of cache The julia-actions/cache post step runs too late to be available to dependent jobs in the same run. Instead, upload compiled/, packages/, and artifacts/ as an artifact from the setup job. Bucket jobs download and extract it before running tests. The julia-actions/cache is kept on the setup job for cross-run caching (subsequent pushes to the same PR). --- .github/workflows/_cairomakie.yml | 16 +++++++++++++--- .github/workflows/_glmakie.yml | 16 +++++++++++++--- .github/workflows/_wglmakie.yml | 16 +++++++++++++--- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 4ba9f39d05a..0962e7c94aa 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -30,6 +30,15 @@ jobs: env: PRECOMPILE_ONLY: 'true' run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' + - name: Upload Julia depot + uses: actions/upload-artifact@v7 + with: + name: julia-depot-cairomakie-${{ matrix.version }} + path: | + ~/.julia/compiled + ~/.julia/packages + ~/.julia/artifacts + retention-days: 1 test: name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 @@ -45,10 +54,11 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - uses: julia-actions/cache@v3 + - name: Download Julia depot + uses: actions/download-artifact@v8 with: - cache-name: julia-cache-cairomakie-${{ matrix.version }} - include-matrix: false + name: julia-depot-cairomakie-${{ matrix.version }} + path: ~/.julia - name: Install Julia dependencies shell: julia --project=monorepo {0} run: | diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index f051ac2849a..8b22c28b939 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -33,6 +33,15 @@ jobs: run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' + - name: Upload Julia depot + uses: actions/upload-artifact@v7 + with: + name: julia-depot-glmakie-${{ matrix.version }} + path: | + ~/.julia/compiled + ~/.julia/packages + ~/.julia/artifacts + retention-days: 1 test: name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 @@ -50,10 +59,11 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - uses: julia-actions/cache@v3 + - name: Download Julia depot + uses: actions/download-artifact@v8 with: - cache-name: julia-cache-glmakie-${{ matrix.version }} - include-matrix: false + name: julia-depot-glmakie-${{ matrix.version }} + path: ~/.julia - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Install Julia dependencies shell: julia --project=monorepo {0} diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 77cdd39c0f3..6a2fc667361 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -33,6 +33,15 @@ jobs: run: > DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' + - name: Upload Julia depot + uses: actions/upload-artifact@v7 + with: + name: julia-depot-wglmakie-${{ matrix.version }} + path: | + ~/.julia/compiled + ~/.julia/packages + ~/.julia/artifacts + retention-days: 1 test: name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 @@ -48,10 +57,11 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - uses: julia-actions/cache@v3 + - name: Download Julia depot + uses: actions/download-artifact@v8 with: - cache-name: julia-cache-wglmakie-${{ matrix.version }} - include-matrix: false + name: julia-depot-wglmakie-${{ matrix.version }} + path: ~/.julia - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Install Julia dependencies shell: julia --project=monorepo {0} From a6e20640a76a96d3a9cfa1c7d84ccdeadeb1b6a6 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 11:59:02 +0200 Subject: [PATCH 09/33] fix(ci): transfer Manifest.toml with depot, skip install in buckets The bucket jobs were re-running pkg"dev ..." which regenerated the Manifest with different state hashes, partially invalidating the compiled pkgimages from the setup job and causing segfaults. Fix: include monorepo/Manifest.toml in the depot artifact and skip the install step in bucket jobs entirely, so the environment is byte-identical to the setup job. --- .github/workflows/_cairomakie.yml | 17 ++++++++--------- .github/workflows/_glmakie.yml | 19 +++++++++---------- .github/workflows/_wglmakie.yml | 19 +++++++++---------- 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 0962e7c94aa..454feb3756c 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -30,7 +30,7 @@ jobs: env: PRECOMPILE_ONLY: 'true' run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - - name: Upload Julia depot + - name: Upload Julia depot and Manifest uses: actions/upload-artifact@v7 with: name: julia-depot-cairomakie-${{ matrix.version }} @@ -38,6 +38,8 @@ jobs: ~/.julia/compiled ~/.julia/packages ~/.julia/artifacts + ~/.julia/scratchspaces + monorepo/Manifest.toml retention-days: 1 test: @@ -54,18 +56,15 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - name: Download Julia depot + - name: Download Julia depot and Manifest uses: actions/download-artifact@v8 with: name: julia-depot-cairomakie-${{ matrix.version }} - path: ~/.julia - - name: Install Julia dependencies - shell: julia --project=monorepo {0} + path: . + - name: Restore depot to home run: | - using Pkg; - pkg"registry up" - Pkg.update() - pkg"dev ./Makie ./CairoMakie ./ReferenceTests ./ComputePipeline" + cp -r .julia/* ~/.julia/ + rm -rf .julia - name: Run the tests continue-on-error: true env: diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 8b22c28b939..171167f8070 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -33,7 +33,7 @@ jobs: run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' - - name: Upload Julia depot + - name: Upload Julia depot and Manifest uses: actions/upload-artifact@v7 with: name: julia-depot-glmakie-${{ matrix.version }} @@ -41,6 +41,8 @@ jobs: ~/.julia/compiled ~/.julia/packages ~/.julia/artifacts + ~/.julia/scratchspaces + monorepo/Manifest.toml retention-days: 1 test: @@ -59,19 +61,16 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - name: Download Julia depot + - name: Download Julia depot and Manifest uses: actions/download-artifact@v8 with: name: julia-depot-glmakie-${{ matrix.version }} - path: ~/.julia - - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - - name: Install Julia dependencies - shell: julia --project=monorepo {0} + path: . + - name: Restore depot to home run: | - using Pkg; - pkg"registry up" - Pkg.update() - pkg"dev ./Makie ./GLMakie ./ReferenceTests ./ComputePipeline" + cp -r .julia/* ~/.julia/ + rm -rf .julia + - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Run the tests id: referencetests continue-on-error: true diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 6a2fc667361..d56a3f673ce 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -33,7 +33,7 @@ jobs: run: > DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' - - name: Upload Julia depot + - name: Upload Julia depot and Manifest uses: actions/upload-artifact@v7 with: name: julia-depot-wglmakie-${{ matrix.version }} @@ -41,6 +41,8 @@ jobs: ~/.julia/compiled ~/.julia/packages ~/.julia/artifacts + ~/.julia/scratchspaces + monorepo/Manifest.toml retention-days: 1 test: @@ -57,19 +59,16 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - name: Download Julia depot + - name: Download Julia depot and Manifest uses: actions/download-artifact@v8 with: name: julia-depot-wglmakie-${{ matrix.version }} - path: ~/.julia - - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - - name: Install Julia dependencies - shell: julia --project=monorepo {0} + path: . + - name: Restore depot to home run: | - using Pkg; - pkg"registry up" - Pkg.update() - pkg"dev ./Makie ./WGLMakie ./ReferenceTests ./ComputePipeline" + cp -r .julia/* ~/.julia/ + rm -rf .julia + - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Run the tests continue-on-error: true env: From 297d1768d7de5b6044014ad217388cc9409fb552 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 12:12:28 +0200 Subject: [PATCH 10/33] fix(ci): create ~/.julia before restoring depot artifact --- .github/workflows/_cairomakie.yml | 1 + .github/workflows/_glmakie.yml | 1 + .github/workflows/_wglmakie.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 454feb3756c..84d75bc274a 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -63,6 +63,7 @@ jobs: path: . - name: Restore depot to home run: | + mkdir -p ~/.julia cp -r .julia/* ~/.julia/ rm -rf .julia - name: Run the tests diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 171167f8070..7109e56aff2 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -68,6 +68,7 @@ jobs: path: . - name: Restore depot to home run: | + mkdir -p ~/.julia cp -r .julia/* ~/.julia/ rm -rf .julia - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index d56a3f673ce..b60862a31cb 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -66,6 +66,7 @@ jobs: path: . - name: Restore depot to home run: | + mkdir -p ~/.julia cp -r .julia/* ~/.julia/ rm -rf .julia - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev From faaa76ea192bc3f9765411e476f2dc9ee9b84551 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 12:40:08 +0200 Subject: [PATCH 11/33] fix(ci): split depot and Manifest into separate artifacts Mixing ~/.julia/ paths and workspace paths in one artifact caused upload-artifact to use /home/runner/ as LCA, mangling the Manifest path on download. Split into two artifacts per backend: - julia-depot: ~/.julia/{compiled,packages,artifacts,scratchspaces} downloaded directly to ~/.julia - manifest: monorepo/Manifest.toml downloaded to monorepo/ --- .github/workflows/_cairomakie.yml | 23 ++++++++++++++--------- .github/workflows/_glmakie.yml | 23 ++++++++++++++--------- .github/workflows/_wglmakie.yml | 23 ++++++++++++++--------- 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 84d75bc274a..8f332508329 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -30,7 +30,7 @@ jobs: env: PRECOMPILE_ONLY: 'true' run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - - name: Upload Julia depot and Manifest + - name: Upload Julia depot uses: actions/upload-artifact@v7 with: name: julia-depot-cairomakie-${{ matrix.version }} @@ -39,7 +39,12 @@ jobs: ~/.julia/packages ~/.julia/artifacts ~/.julia/scratchspaces - monorepo/Manifest.toml + retention-days: 1 + - name: Upload Manifest + uses: actions/upload-artifact@v7 + with: + name: manifest-cairomakie-${{ matrix.version }} + path: monorepo/Manifest.toml retention-days: 1 test: @@ -56,16 +61,16 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - name: Download Julia depot and Manifest + - name: Download Julia depot uses: actions/download-artifact@v8 with: name: julia-depot-cairomakie-${{ matrix.version }} - path: . - - name: Restore depot to home - run: | - mkdir -p ~/.julia - cp -r .julia/* ~/.julia/ - rm -rf .julia + path: ~/.julia + - name: Download Manifest + uses: actions/download-artifact@v8 + with: + name: manifest-cairomakie-${{ matrix.version }} + path: monorepo - name: Run the tests continue-on-error: true env: diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 7109e56aff2..c4de5502661 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -33,7 +33,7 @@ jobs: run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' - - name: Upload Julia depot and Manifest + - name: Upload Julia depot uses: actions/upload-artifact@v7 with: name: julia-depot-glmakie-${{ matrix.version }} @@ -42,7 +42,12 @@ jobs: ~/.julia/packages ~/.julia/artifacts ~/.julia/scratchspaces - monorepo/Manifest.toml + retention-days: 1 + - name: Upload Manifest + uses: actions/upload-artifact@v7 + with: + name: manifest-glmakie-${{ matrix.version }} + path: monorepo/Manifest.toml retention-days: 1 test: @@ -61,16 +66,16 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - name: Download Julia depot and Manifest + - name: Download Julia depot uses: actions/download-artifact@v8 with: name: julia-depot-glmakie-${{ matrix.version }} - path: . - - name: Restore depot to home - run: | - mkdir -p ~/.julia - cp -r .julia/* ~/.julia/ - rm -rf .julia + path: ~/.julia + - name: Download Manifest + uses: actions/download-artifact@v8 + with: + name: manifest-glmakie-${{ matrix.version }} + path: monorepo - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Run the tests id: referencetests diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index b60862a31cb..17b5edfb615 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -33,7 +33,7 @@ jobs: run: > DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' - - name: Upload Julia depot and Manifest + - name: Upload Julia depot uses: actions/upload-artifact@v7 with: name: julia-depot-wglmakie-${{ matrix.version }} @@ -42,7 +42,12 @@ jobs: ~/.julia/packages ~/.julia/artifacts ~/.julia/scratchspaces - monorepo/Manifest.toml + retention-days: 1 + - name: Upload Manifest + uses: actions/upload-artifact@v7 + with: + name: manifest-wglmakie-${{ matrix.version }} + path: monorepo/Manifest.toml retention-days: 1 test: @@ -59,16 +64,16 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - - name: Download Julia depot and Manifest + - name: Download Julia depot uses: actions/download-artifact@v8 with: name: julia-depot-wglmakie-${{ matrix.version }} - path: . - - name: Restore depot to home - run: | - mkdir -p ~/.julia - cp -r .julia/* ~/.julia/ - rm -rf .julia + path: ~/.julia + - name: Download Manifest + uses: actions/download-artifact@v8 + with: + name: manifest-wglmakie-${{ matrix.version }} + path: monorepo - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Run the tests continue-on-error: true From 8ba48826f1a43a5e174f1d158d1c2321224cfb6b Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 13:04:55 +0200 Subject: [PATCH 12/33] revert: drop setup job, use shared caches only GitHub Actions artifacts don't preserve file permissions (executables lose +x) and Julia's compiled pkgimages segfault when loaded on a different runner instance. Both issues make the setup-job-with-artifact approach unviable for sharing precompilation state. Go back to the simpler design: shared cache keys across buckets of the same backend+version. First run precompiles in parallel (same wall-clock), subsequent runs all hit cache. Also remove the now-unused PRECOMPILE_ONLY guards from runtests. --- .github/workflows/_cairomakie.yml | 50 ++------------------------- .github/workflows/_glmakie.yml | 57 +++---------------------------- .github/workflows/_wglmakie.yml | 53 ++-------------------------- CairoMakie/test/runtests.jl | 3 -- GLMakie/test/runtests.jl | 3 -- WGLMakie/test/runtests.jl | 3 -- 6 files changed, 11 insertions(+), 158 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 8f332508329..f278f9552fd 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -3,13 +3,14 @@ on: workflow_call: jobs: - setup: - name: Setup CairoMakie Julia ${{ matrix.version }} + test: + name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 runs-on: ubuntu-latest strategy: fail-fast: false matrix: version: ['1.10', '1'] + bucket: [1, 2] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 @@ -26,51 +27,6 @@ jobs: pkg"registry up" Pkg.update() pkg"dev ./Makie ./CairoMakie ./ReferenceTests ./ComputePipeline" - - name: Precompile via Pkg.test - env: - PRECOMPILE_ONLY: 'true' - run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - - name: Upload Julia depot - uses: actions/upload-artifact@v7 - with: - name: julia-depot-cairomakie-${{ matrix.version }} - path: | - ~/.julia/compiled - ~/.julia/packages - ~/.julia/artifacts - ~/.julia/scratchspaces - retention-days: 1 - - name: Upload Manifest - uses: actions/upload-artifact@v7 - with: - name: manifest-cairomakie-${{ matrix.version }} - path: monorepo/Manifest.toml - retention-days: 1 - - test: - name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 - needs: setup - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: ['1.10', '1'] - bucket: [1, 2] - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ matrix.version }} - - name: Download Julia depot - uses: actions/download-artifact@v8 - with: - name: julia-depot-cairomakie-${{ matrix.version }} - path: ~/.julia - - name: Download Manifest - uses: actions/download-artifact@v8 - with: - name: manifest-cairomakie-${{ matrix.version }} - path: monorepo - name: Run the tests continue-on-error: true env: diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index c4de5502661..044e6f05d15 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -3,13 +3,16 @@ on: workflow_call: jobs: - setup: - name: Setup GLMakie Julia ${{ matrix.version }} + test: + name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 + env: + MODERNGL_DEBUGGING: "true" runs-on: ubuntu-latest strategy: fail-fast: false matrix: version: ['1.10', '1'] + bucket: [1, 2] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 @@ -27,56 +30,6 @@ jobs: pkg"registry up" Pkg.update() pkg"dev ./Makie ./GLMakie ./ReferenceTests ./ComputePipeline" - - name: Precompile via Pkg.test - env: - PRECOMPILE_ONLY: 'true' - run: > - DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' - - name: Upload Julia depot - uses: actions/upload-artifact@v7 - with: - name: julia-depot-glmakie-${{ matrix.version }} - path: | - ~/.julia/compiled - ~/.julia/packages - ~/.julia/artifacts - ~/.julia/scratchspaces - retention-days: 1 - - name: Upload Manifest - uses: actions/upload-artifact@v7 - with: - name: manifest-glmakie-${{ matrix.version }} - path: monorepo/Manifest.toml - retention-days: 1 - - test: - name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 - needs: setup - env: - MODERNGL_DEBUGGING: "true" - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: ['1.10', '1'] - bucket: [1, 2] - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ matrix.version }} - - name: Download Julia depot - uses: actions/download-artifact@v8 - with: - name: julia-depot-glmakie-${{ matrix.version }} - path: ~/.julia - - name: Download Manifest - uses: actions/download-artifact@v8 - with: - name: manifest-glmakie-${{ matrix.version }} - path: monorepo - - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Run the tests id: referencetests continue-on-error: true diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 17b5edfb615..e9edd181b15 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -3,13 +3,14 @@ on: workflow_call: jobs: - setup: - name: Setup WGLMakie Julia ${{ matrix.version }} + test: + name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 runs-on: ubuntu-latest strategy: fail-fast: false matrix: version: ['1.10', '1'] + bucket: [1, 2, 3, 4] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 @@ -27,54 +28,6 @@ jobs: pkg"registry up" Pkg.update() pkg"dev ./Makie ./WGLMakie ./ReferenceTests ./ComputePipeline" - - name: Precompile via Pkg.test - env: - PRECOMPILE_ONLY: 'true' - run: > - DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' - - name: Upload Julia depot - uses: actions/upload-artifact@v7 - with: - name: julia-depot-wglmakie-${{ matrix.version }} - path: | - ~/.julia/compiled - ~/.julia/packages - ~/.julia/artifacts - ~/.julia/scratchspaces - retention-days: 1 - - name: Upload Manifest - uses: actions/upload-artifact@v7 - with: - name: manifest-wglmakie-${{ matrix.version }} - path: monorepo/Manifest.toml - retention-days: 1 - - test: - name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 - needs: setup - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: ['1.10', '1'] - bucket: [1, 2, 3, 4] - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ matrix.version }} - - name: Download Julia depot - uses: actions/download-artifact@v8 - with: - name: julia-depot-wglmakie-${{ matrix.version }} - path: ~/.julia - - name: Download Manifest - uses: actions/download-artifact@v8 - with: - name: manifest-wglmakie-${{ matrix.version }} - path: monorepo - - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Run the tests continue-on-error: true env: diff --git a/CairoMakie/test/runtests.jl b/CairoMakie/test/runtests.jl index bf38203cb11..7d2d2e7d2e4 100644 --- a/CairoMakie/test/runtests.jl +++ b/CairoMakie/test/runtests.jl @@ -1,8 +1,5 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" -# Allow Pkg.test to be used purely for precompilation (setup job in CI) -get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) - using Test using CairoMakie using Makie.FileIO diff --git a/GLMakie/test/runtests.jl b/GLMakie/test/runtests.jl index f47d1edc424..47dfbc3de7b 100644 --- a/GLMakie/test/runtests.jl +++ b/GLMakie/test/runtests.jl @@ -1,8 +1,5 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" -# Allow Pkg.test to be used purely for precompilation (setup job in CI) -get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) - using Makie using GLMakie, Test using FileIO diff --git a/WGLMakie/test/runtests.jl b/WGLMakie/test/runtests.jl index d24b3e94cc4..fd648806183 100644 --- a/WGLMakie/test/runtests.jl +++ b/WGLMakie/test/runtests.jl @@ -1,8 +1,5 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" -# Allow Pkg.test to be used purely for precompilation (setup job in CI) -get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) - ENV["ELECTRON_LOG_FILE"] = joinpath(@__DIR__, "electron.log") ENV["ELECTRON_ENABLE_LOGGING"] = "true" From bbb5b252a74bedc2fe358d819277008af674c45b Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 13:09:34 +0200 Subject: [PATCH 13/33] ci: use tar-based depot artifact to preserve file permissions upload-artifact uses zip which strips Unix permissions (executable bits), breaking compiled pkgimages and binaries like Electron. Fix: tar the depot ourselves before uploading, preserving all permissions. Bucket jobs extract with tar, getting a byte-identical depot including correct executable bits on .so files and binaries. --- .github/workflows/_cairomakie.yml | 38 +++++++++++++++++++++++--- .github/workflows/_glmakie.yml | 45 +++++++++++++++++++++++++++---- .github/workflows/_wglmakie.yml | 41 +++++++++++++++++++++++++--- CairoMakie/test/runtests.jl | 3 +++ GLMakie/test/runtests.jl | 3 +++ WGLMakie/test/runtests.jl | 3 +++ 6 files changed, 122 insertions(+), 11 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index f278f9552fd..f3f43e7fcd5 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -3,14 +3,13 @@ on: workflow_call: jobs: - test: - name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 + setup: + name: Setup CairoMakie Julia ${{ matrix.version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: version: ['1.10', '1'] - bucket: [1, 2] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 @@ -27,6 +26,39 @@ jobs: pkg"registry up" Pkg.update() pkg"dev ./Makie ./CairoMakie ./ReferenceTests ./ComputePipeline" + - name: Precompile via Pkg.test + env: + PRECOMPILE_ONLY: 'true' + run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' + - name: Package depot and Manifest + run: tar -cf /tmp/depot.tar -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces && tar -rf /tmp/depot.tar monorepo/Manifest.toml + - name: Upload depot tarball + uses: actions/upload-artifact@v7 + with: + name: julia-depot-cairomakie-${{ matrix.version }} + path: /tmp/depot.tar + retention-days: 1 + + test: + name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 + needs: setup + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: ['1.10', '1'] + bucket: [1, 2] + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - name: Download depot tarball + uses: actions/download-artifact@v8 + with: + name: julia-depot-cairomakie-${{ matrix.version }} + - name: Extract depot and Manifest + run: tar -xf depot.tar -C ~ && tar -xf depot.tar monorepo/Manifest.toml - name: Run the tests continue-on-error: true env: diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 044e6f05d15..d97cc02fbe3 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -3,16 +3,13 @@ on: workflow_call: jobs: - test: - name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 - env: - MODERNGL_DEBUGGING: "true" + setup: + name: Setup GLMakie Julia ${{ matrix.version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: version: ['1.10', '1'] - bucket: [1, 2] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 @@ -30,6 +27,44 @@ jobs: pkg"registry up" Pkg.update() pkg"dev ./Makie ./GLMakie ./ReferenceTests ./ComputePipeline" + - name: Precompile via Pkg.test + env: + PRECOMPILE_ONLY: 'true' + run: > + DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' + - name: Package depot and Manifest + run: tar -cf /tmp/depot.tar -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces && tar -rf /tmp/depot.tar monorepo/Manifest.toml + - name: Upload depot tarball + uses: actions/upload-artifact@v7 + with: + name: julia-depot-glmakie-${{ matrix.version }} + path: /tmp/depot.tar + retention-days: 1 + + test: + name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 + needs: setup + env: + MODERNGL_DEBUGGING: "true" + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: ['1.10', '1'] + bucket: [1, 2] + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - name: Download depot tarball + uses: actions/download-artifact@v8 + with: + name: julia-depot-glmakie-${{ matrix.version }} + - name: Extract depot and Manifest + run: tar -xf depot.tar -C ~ && tar -xf depot.tar monorepo/Manifest.toml + - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Run the tests id: referencetests continue-on-error: true diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index e9edd181b15..e3fa8582900 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -3,14 +3,13 @@ on: workflow_call: jobs: - test: - name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 + setup: + name: Setup WGLMakie Julia ${{ matrix.version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: version: ['1.10', '1'] - bucket: [1, 2, 3, 4] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 @@ -28,6 +27,42 @@ jobs: pkg"registry up" Pkg.update() pkg"dev ./Makie ./WGLMakie ./ReferenceTests ./ComputePipeline" + - name: Precompile via Pkg.test + env: + PRECOMPILE_ONLY: 'true' + run: > + DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' + - name: Package depot and Manifest + run: tar -cf /tmp/depot.tar -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces && tar -rf /tmp/depot.tar monorepo/Manifest.toml + - name: Upload depot tarball + uses: actions/upload-artifact@v7 + with: + name: julia-depot-wglmakie-${{ matrix.version }} + path: /tmp/depot.tar + retention-days: 1 + + test: + name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 + needs: setup + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: ['1.10', '1'] + bucket: [1, 2, 3, 4] + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - name: Download depot tarball + uses: actions/download-artifact@v8 + with: + name: julia-depot-wglmakie-${{ matrix.version }} + - name: Extract depot and Manifest + run: tar -xf depot.tar -C ~ && tar -xf depot.tar monorepo/Manifest.toml + - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Run the tests continue-on-error: true env: diff --git a/CairoMakie/test/runtests.jl b/CairoMakie/test/runtests.jl index 7d2d2e7d2e4..bf38203cb11 100644 --- a/CairoMakie/test/runtests.jl +++ b/CairoMakie/test/runtests.jl @@ -1,5 +1,8 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" +# Allow Pkg.test to be used purely for precompilation (setup job in CI) +get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) + using Test using CairoMakie using Makie.FileIO diff --git a/GLMakie/test/runtests.jl b/GLMakie/test/runtests.jl index 47dfbc3de7b..f47d1edc424 100644 --- a/GLMakie/test/runtests.jl +++ b/GLMakie/test/runtests.jl @@ -1,5 +1,8 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" +# Allow Pkg.test to be used purely for precompilation (setup job in CI) +get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) + using Makie using GLMakie, Test using FileIO diff --git a/WGLMakie/test/runtests.jl b/WGLMakie/test/runtests.jl index fd648806183..d24b3e94cc4 100644 --- a/WGLMakie/test/runtests.jl +++ b/WGLMakie/test/runtests.jl @@ -1,5 +1,8 @@ ENV["ENABLE_COMPUTE_CHECKS"] = "true" +# Allow Pkg.test to be used purely for precompilation (setup job in CI) +get(ENV, "PRECOMPILE_ONLY", nothing) == "true" && exit(0) + ENV["ELECTRON_LOG_FILE"] = joinpath(@__DIR__, "electron.log") ENV["ELECTRON_ENABLE_LOGGING"] = "true" From 4dc850c8b388f2fdeb8066da25a8e99383c5ab5b Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 13:33:13 +0200 Subject: [PATCH 14/33] refactor: replace counting pass with regex-based test count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dry-run counting pass (include files with COUNT_ONLY=true) caused method override warnings from double-including the test files. Replace with a simple regex count of @reference_test occurrences, recursively following include("...") directives. If the count is slightly off (e.g. a test uses a loop), the last bucket just gets a few more tests — no correctness issue. --- ReferenceTests/src/database.jl | 42 ++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/ReferenceTests/src/database.jl b/ReferenceTests/src/database.jl index f037d433318..45ebd279492 100644 --- a/ReferenceTests/src/database.jl +++ b/ReferenceTests/src/database.jl @@ -23,9 +23,33 @@ const SKIP_FUNCTIONS = Set{Symbol}() const COUNTER = Ref(0) const TOTAL_COUNTER = Ref(0) # counts all @reference_test invocations, used for bucket assignment const TOTAL_TESTS = Ref(0) # total number of tests across all files, set before running for chunked bucketing -const COUNT_ONLY = Ref(false) # when true, @reference_test only counts without running const SKIPPED_NAMES = Set{String}() # names skipped due to title exclusion or function exclusion +""" + count_reference_tests(paths) + +Count `@reference_test` occurrences by reading files as text, recursively +following `include("...")` directives relative to each file's directory. +""" +function count_reference_tests(paths) + n = 0 + for path in paths + n += _count_in_file(path) + end + return n +end + +function _count_in_file(path) + text = read(path, String) + n = count(r"@reference_test\b", text) + dir = dirname(path) + for m in eachmatch(r"include\(\"([^\"]+)\"\)", text) + child = joinpath(dir, m.captures[1]) + isfile(child) && (n += _count_in_file(child)) + end + return n +end + """ should_run_in_bucket(test_index::Int) @@ -62,9 +86,7 @@ macro reference_test(name, code) skip = (title in SKIP_TITLES) || any(x -> x in funcs, SKIP_FUNCTIONS) return quote ReferenceTests.TOTAL_COUNTER[] += 1 - if ReferenceTests.COUNT_ONLY[] - # Counting pass, don't run anything - elseif !ReferenceTests.should_run_in_bucket(ReferenceTests.TOTAL_COUNTER[]) + if !ReferenceTests.should_run_in_bucket(ReferenceTests.TOTAL_COUNTER[]) # Not in this bucket, skip entirely else @testset $(title) begin @@ -150,16 +172,8 @@ macro include_reference_tests(backend::Symbol, path, paths...) ReferenceTests.RECORDING_DIR[] = joinpath(recording_dir, "recorded", $(string(backend))) mkpath(ReferenceTests.RECORDING_DIR[]) - # Count total tests via a dry-run pass (test files are already - # compiled so the second include is essentially free) - ReferenceTests.COUNT_ONLY[] = true - ReferenceTests.TOTAL_COUNTER[] = 0 - for include_path in include_paths - include(include_path) - end - ReferenceTests.TOTAL_TESTS[] = ReferenceTests.TOTAL_COUNTER[] - ReferenceTests.COUNT_ONLY[] = false - ReferenceTests.TOTAL_COUNTER[] = 0 + # Count total @reference_test occurrences for chunked bucket assignment + ReferenceTests.TOTAL_TESTS[] = ReferenceTests.count_reference_tests(include_paths) # Log bucket configuration let From b6a78c1681bd6068df515a0306e9261126750d06 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 14:34:31 +0200 Subject: [PATCH 15/33] fix(wglmakie): reset Electron window size before each screenshot The resize_to EScreenshot tests measure DOM bounding boxes to determine screenshot size. If the Electron window starts at a different size (depending on what previous tests left behind), the layout engine produces different bounding boxes, leading to screenshots of the wrong size ("images don't have the same size, difference will be Inf"). Reset the window to 1200x900 before each display() call so the layout starts from a deterministic state. --- WGLMakie/test/html_widgets_refimages.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WGLMakie/test/html_widgets_refimages.jl b/WGLMakie/test/html_widgets_refimages.jl index d19ec88b6ee..698a1e43e45 100644 --- a/WGLMakie/test/html_widgets_refimages.jl +++ b/WGLMakie/test/html_widgets_refimages.jl @@ -17,6 +17,9 @@ EScreenshot(display, app::Bonito.App) = EScreenshot(display, app, true) # Defau function snapshot_figure(edisplay, app, path; capture_full_page = false) rm(path; force = true) + # Reset window to a known size before displaying so layout starts from + # a deterministic state regardless of what previous tests left behind + Electron.ElectronAPI.setContentSize(edisplay.window.window, 1200, 900) display(edisplay, app) win = edisplay.window.window Bonito.wait_for_ready(app) From e3d32a73d0614246e3c1e78a4547eecb07706fc9 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 17 Apr 2026 19:34:36 +0200 Subject: [PATCH 16/33] fix(wglmakie): normalize EScreenshot size to logical content dimensions capturePage() captures at the device pixel ratio, which can differ between CI runs depending on Electron window state. Resize the captured image to the logical content size (win_size) before saving, so screenshots have deterministic pixel dimensions regardless of DPR. --- WGLMakie/test/html_widgets_refimages.jl | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/WGLMakie/test/html_widgets_refimages.jl b/WGLMakie/test/html_widgets_refimages.jl index 698a1e43e45..7b564892b7e 100644 --- a/WGLMakie/test/html_widgets_refimages.jl +++ b/WGLMakie/test/html_widgets_refimages.jl @@ -17,11 +17,13 @@ EScreenshot(display, app::Bonito.App) = EScreenshot(display, app, true) # Defau function snapshot_figure(edisplay, app, path; capture_full_page = false) rm(path; force = true) - # Reset window to a known size before displaying so layout starts from - # a deterministic state regardless of what previous tests left behind - Electron.ElectronAPI.setContentSize(edisplay.window.window, 1200, 900) - display(edisplay, app) win = edisplay.window.window + # Reset window to a known size and force device scale factor to 1 + # so screenshots have deterministic pixel dimensions regardless of + # what previous tests left behind or the host's DPI setting + Electron.ElectronAPI.setContentSize(win, 1200, 900) + run(win, "window.devicePixelRatio = 1") + display(edisplay, app) Bonito.wait_for_ready(app) sleep(1) win_size = run( @@ -66,6 +68,7 @@ function snapshot_figure(edisplay, app, path; capture_full_page = false) ) Electron.ElectronAPI.setContentSize(win, win_size...) winid = win.id + target_w, target_h = win_size sleep(1) # do we need time for resize and relayouting? And is there an event we could wait for? # Normalize path for JavaScript (replace backslashes with forward slashes on Windows) js_path = replace(path, '\\' => '/') @@ -74,8 +77,11 @@ function snapshot_figure(edisplay, app, path; capture_full_page = false) """ const win = BrowserWindow.fromId($winid) win.webContents.capturePage().then(image => { + // Resize to the logical content size to normalize out devicePixelRatio + // differences (e.g. Retina 2x vs CI xvfb 1x) + const resized = image.resize({ width: $target_w, height: $target_h }) const screenshotPath = '$(js_path)'; - require('fs').writeFileSync(screenshotPath, image.toPNG()); + require('fs').writeFileSync(screenshotPath, resized.toPNG()); console.log('Screenshot saved to', screenshotPath); }).catch(err => { console.error('Screenshot error:', err); From 15a8ac8db170a9190368bbc27a6276dc2ea26b8a Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 09:13:12 +0200 Subject: [PATCH 17/33] fix(wglmakie): revert snapshot_figure changes, remove wrong activate! calls set_theme!() in @reference_test resets CURRENT_DEFAULT_THEME completely, including WGLMakie screen config to px_per_unit=1, scalefactor=1. So the resize_to tests' references were generated with those defaults, not with px_per_unit=2 from the preceding test's activate! call. Remove the activate!(px_per_unit=2) calls from resize_to tests - they were incorrectly overriding what set_theme! establishes. Also revert the snapshot_figure window reset and image resize changes which were workarounds for this misdiagnosis. --- WGLMakie/test/html_widgets_refimages.jl | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/WGLMakie/test/html_widgets_refimages.jl b/WGLMakie/test/html_widgets_refimages.jl index 7b564892b7e..d12a3b6bf60 100644 --- a/WGLMakie/test/html_widgets_refimages.jl +++ b/WGLMakie/test/html_widgets_refimages.jl @@ -17,13 +17,8 @@ EScreenshot(display, app::Bonito.App) = EScreenshot(display, app, true) # Defau function snapshot_figure(edisplay, app, path; capture_full_page = false) rm(path; force = true) - win = edisplay.window.window - # Reset window to a known size and force device scale factor to 1 - # so screenshots have deterministic pixel dimensions regardless of - # what previous tests left behind or the host's DPI setting - Electron.ElectronAPI.setContentSize(win, 1200, 900) - run(win, "window.devicePixelRatio = 1") display(edisplay, app) + win = edisplay.window.window Bonito.wait_for_ready(app) sleep(1) win_size = run( @@ -68,7 +63,6 @@ function snapshot_figure(edisplay, app, path; capture_full_page = false) ) Electron.ElectronAPI.setContentSize(win, win_size...) winid = win.id - target_w, target_h = win_size sleep(1) # do we need time for resize and relayouting? And is there an event we could wait for? # Normalize path for JavaScript (replace backslashes with forward slashes on Windows) js_path = replace(path, '\\' => '/') @@ -77,11 +71,8 @@ function snapshot_figure(edisplay, app, path; capture_full_page = false) """ const win = BrowserWindow.fromId($winid) win.webContents.capturePage().then(image => { - // Resize to the logical content size to normalize out devicePixelRatio - // differences (e.g. Retina 2x vs CI xvfb 1x) - const resized = image.resize({ width: $target_w, height: $target_h }) const screenshotPath = '$(js_path)'; - require('fs').writeFileSync(screenshotPath, resized.toPNG()); + require('fs').writeFileSync(screenshotPath, image.toPNG()); console.log('Screenshot saved to', screenshotPath); }).catch(err => { console.error('Screenshot error:', err); @@ -292,7 +283,6 @@ end end @reference_test "resize_to parent with fixed size div" begin - WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = App() do fig = create_test_figure() DOM.div( @@ -307,7 +297,6 @@ end end @reference_test "resize_to parent with ResizableCard" begin - WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = App() do fig = create_test_figure() card = TestResizableCard(WGLMakie.WithConfig(fig; use_html_widgets = true, resize_to = :parent)) @@ -320,7 +309,6 @@ end end @reference_test "resize_to parent nested in styled container" begin - WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = App() do fig = create_test_figure() DOM.div( @@ -338,7 +326,6 @@ end end @reference_test "resize_to parent with multiple figures side by side" begin - WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = App() do fig1 = Figure(; size = (600, 400)) ax1 = Axis(fig1[1, 1]; title = "Left Plot") @@ -369,7 +356,6 @@ end end @reference_test "resize_to body baseline" begin - WGLMakie.activate!(; use_html_widgets = true, px_per_unit = 2, scalefactor = 2) app = Bonito.App() do fig = create_test_figure() DOM.div( From 8e739d4586d6eed894a24cf6672de7eb9ca79ede Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 10:10:05 +0200 Subject: [PATCH 18/33] ci: make benchmark comment-triggered with /benchmark command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change from running on every PR to only when a collaborator comments /benchmark on a PR. This saves CI resources for PRs that don't need benchmarking. Also triple the sample count (20 → 60) since benchmarks now run on demand rather than on every push. --- .github/workflows/compilation-benchmark.yaml | 52 ++++++++++++++------ 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/.github/workflows/compilation-benchmark.yaml b/.github/workflows/compilation-benchmark.yaml index aa0dde4e33c..86b2375cb9b 100644 --- a/.github/workflows/compilation-benchmark.yaml +++ b/.github/workflows/compilation-benchmark.yaml @@ -1,19 +1,21 @@ name: Benchmark on: - pull_request: - paths-ignore: - - 'docs/**' - - '*.md' - branches: - - master + issue_comment: + types: [created] concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.event.issue.number }} cancel-in-progress: true jobs: benchmark: name: ${{ matrix.package }} + if: > + github.event.issue.pull_request && + contains(github.event.comment.body, '/benchmark') && + (github.event.comment.author_association == 'MEMBER' || + github.event.comment.author_association == 'OWNER' || + github.event.comment.author_association == 'COLLABORATOR') runs-on: ubuntu-latest strategy: fail-fast: false @@ -23,8 +25,19 @@ jobs: - GLMakie - WGLMakie steps: + - name: Get PR head ref + id: pr + env: + GH_TOKEN: ${{ github.token }} + run: | + pr_data=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}) + echo "ref=$(echo $pr_data | jq -r .head.ref)" >> $GITHUB_OUTPUT + echo "sha=$(echo $pr_data | jq -r .head.sha)" >> $GITHUB_OUTPUT + echo "base_ref=$(echo $pr_data | jq -r .base.ref)" >> $GITHUB_OUTPUT - name: Checkout uses: actions/checkout@v6 + with: + ref: ${{ steps.pr.outputs.ref }} - name: Install xvfb run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - uses: julia-actions/setup-julia@v2 @@ -35,9 +48,9 @@ jobs: - name: Benchmark env: GITHUB_TOKEN: ${{ secrets.BENCHMARK_KEY }} - PR_NUMBER: ${{ github.event.number }} + PR_NUMBER: ${{ github.event.issue.number }} run: > - DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=./metrics/ttfp/ ./metrics/ttfp/run-benchmark.jl ${{ matrix.package }} 20 ${{ github.event.pull_request.base.ref }} + DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --project=./metrics/ttfp/ ./metrics/ttfp/run-benchmark.jl ${{ matrix.package }} 60 ${{ steps.pr.outputs.base_ref }} - name: Upload plots as artifact uses: actions/upload-artifact@v7 with: @@ -45,11 +58,19 @@ jobs: path: ./benchmark_results post-gist: name: Post Benchmark Gist - needs: benchmark # Wait for all benchmark jobs to complete + needs: benchmark runs-on: ubuntu-latest permissions: - statuses: write # Permission to post workflow status + statuses: write steps: + - name: Get PR head SHA + id: pr + env: + GH_TOKEN: ${{ github.token }} + run: | + sha=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} --jq .head.sha) + echo "sha=$sha" >> $GITHUB_OUTPUT + - name: Check token validity id: check_token env: @@ -57,7 +78,6 @@ jobs: run: | if [ -z "$BENCHMARK_KEY" ]; then echo "Benchmark key missing — skipping benchmark upload." - echo "NOTE: Benchmark key is not accessible for outside contributors" echo "has_token=false" >> $GITHUB_OUTPUT else echo "has_token=true" >> $GITHUB_OUTPUT @@ -93,7 +113,7 @@ jobs: --method POST \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - /repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \ + /repos/${{ github.repository }}/statuses/${{ steps.pr.outputs.sha }} \ -f "state=success" \ -f "context=Benchmark Results" \ -f "description=Plots are available under Details" \ @@ -104,11 +124,12 @@ jobs: uses: thollander/actions-comment-pull-request@v3 with: github-token: ${{ secrets.BENCHMARK_KEY }} - comment-tag: benchmark # this allows to update the same post with new data + pr-number: ${{ github.event.issue.number }} + comment-tag: benchmark message: | # Benchmark Results - SHA: [${{ github.event.pull_request.head.sha }}](https://github.com/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}) + SHA: [${{ steps.pr.outputs.sha }}](https://github.com/${{ github.repository }}/commit/${{ steps.pr.outputs.sha }}) > [!WARNING] > These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking. @@ -116,4 +137,3 @@ jobs: ![GLMakie](${{ env.GIST_URL_USERCONTENT }}/raw/GLMakie.svg) ![CairoMakie](${{ env.GIST_URL_USERCONTENT }}/raw/CairoMakie.svg) ![WGLMakie](${{ env.GIST_URL_USERCONTENT }}/raw/WGLMakie.svg) - From 2692ac897728b2ef987718f9cbe15b1e9185ec8c Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 10:22:04 +0200 Subject: [PATCH 19/33] ci: compress depot tarball with zstd to speed up upload/download --- .github/workflows/_cairomakie.yml | 6 +++--- .github/workflows/_glmakie.yml | 6 +++--- .github/workflows/_wglmakie.yml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index f3f43e7fcd5..4b8057b6cc6 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -31,12 +31,12 @@ jobs: PRECOMPILE_ONLY: 'true' run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - name: Package depot and Manifest - run: tar -cf /tmp/depot.tar -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces && tar -rf /tmp/depot.tar monorepo/Manifest.toml + run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball uses: actions/upload-artifact@v7 with: name: julia-depot-cairomakie-${{ matrix.version }} - path: /tmp/depot.tar + path: /tmp/depot.tar.zst retention-days: 1 test: @@ -58,7 +58,7 @@ jobs: with: name: julia-depot-cairomakie-${{ matrix.version }} - name: Extract depot and Manifest - run: tar -xf depot.tar -C ~ && tar -xf depot.tar monorepo/Manifest.toml + run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - name: Run the tests continue-on-error: true env: diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index d97cc02fbe3..4def8b1e312 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -34,12 +34,12 @@ jobs: DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' - name: Package depot and Manifest - run: tar -cf /tmp/depot.tar -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces && tar -rf /tmp/depot.tar monorepo/Manifest.toml + run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball uses: actions/upload-artifact@v7 with: name: julia-depot-glmakie-${{ matrix.version }} - path: /tmp/depot.tar + path: /tmp/depot.tar.zst retention-days: 1 test: @@ -63,7 +63,7 @@ jobs: with: name: julia-depot-glmakie-${{ matrix.version }} - name: Extract depot and Manifest - run: tar -xf depot.tar -C ~ && tar -xf depot.tar monorepo/Manifest.toml + run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Run the tests id: referencetests diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index e3fa8582900..40ecd735363 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -34,12 +34,12 @@ jobs: DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' - name: Package depot and Manifest - run: tar -cf /tmp/depot.tar -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces && tar -rf /tmp/depot.tar monorepo/Manifest.toml + run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball uses: actions/upload-artifact@v7 with: name: julia-depot-wglmakie-${{ matrix.version }} - path: /tmp/depot.tar + path: /tmp/depot.tar.zst retention-days: 1 test: @@ -61,7 +61,7 @@ jobs: with: name: julia-depot-wglmakie-${{ matrix.version }} - name: Extract depot and Manifest - run: tar -xf depot.tar -C ~ && tar -xf depot.tar monorepo/Manifest.toml + run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Run the tests continue-on-error: true From d932aaa5978b80a7d6521aa36e7d86113f302419 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 19:06:59 +0200 Subject: [PATCH 20/33] fix(ci): create monorepo/ dir before extracting Manifest --- .github/workflows/_cairomakie.yml | 2 +- .github/workflows/_glmakie.yml | 2 +- .github/workflows/_wglmakie.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 4b8057b6cc6..4b17a96852f 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -58,7 +58,7 @@ jobs: with: name: julia-depot-cairomakie-${{ matrix.version }} - name: Extract depot and Manifest - run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml + run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - name: Run the tests continue-on-error: true env: diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 4def8b1e312..8051a3ac638 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -63,7 +63,7 @@ jobs: with: name: julia-depot-glmakie-${{ matrix.version }} - name: Extract depot and Manifest - run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml + run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Run the tests id: referencetests diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 40ecd735363..71fefeb209c 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -61,7 +61,7 @@ jobs: with: name: julia-depot-wglmakie-${{ matrix.version }} - name: Extract depot and Manifest - run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml + run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Run the tests continue-on-error: true From 6ded86055a5445caa5180c3a4d91739ac0d1679c Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 19:18:10 +0200 Subject: [PATCH 21/33] ci: disable auto-precompilation during pkg dev step Set JULIA_PKG_PRECOMPILE_AUTO=0 on the install step so pkg"dev ..." doesn't trigger precompilation. Precompilation happens once during Pkg.test() which resolves the full test environment including test deps. Without this, dev triggers a precompile pass against the monorepo env, then Pkg.test resolves the test env and precompiles again. --- .github/workflows/_cairomakie.yml | 2 ++ .github/workflows/_glmakie.yml | 2 ++ .github/workflows/_rprmakie.yml | 2 ++ .github/workflows/_wglmakie.yml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 4b17a96852f..2bbb2bc2014 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -21,6 +21,8 @@ jobs: include-matrix: false - name: Install Julia dependencies shell: julia --project=monorepo {0} + env: + JULIA_PKG_PRECOMPILE_AUTO: '0' run: | using Pkg; pkg"registry up" diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 8051a3ac638..056c77cf85c 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -22,6 +22,8 @@ jobs: - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Install Julia dependencies shell: julia --project=monorepo {0} + env: + JULIA_PKG_PRECOMPILE_AUTO: '0' run: | using Pkg; pkg"registry up" diff --git a/.github/workflows/_rprmakie.yml b/.github/workflows/_rprmakie.yml index 2fd252a6720..7370eac3905 100644 --- a/.github/workflows/_rprmakie.yml +++ b/.github/workflows/_rprmakie.yml @@ -25,6 +25,8 @@ jobs: - uses: julia-actions/cache@v3 - name: Install Julia dependencies shell: julia --project=monorepo {0} + env: + JULIA_PKG_PRECOMPILE_AUTO: '0' run: | using Pkg; pkg"registry up" diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 71fefeb209c..a3b160f6a77 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -22,6 +22,8 @@ jobs: - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Install Julia dependencies shell: julia --project=monorepo {0} + env: + JULIA_PKG_PRECOMPILE_AUTO: '0' run: | using Pkg; pkg"registry up" From 36ef14ecb2907a70a8fefcd593fea406249112fe Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 19:19:52 +0200 Subject: [PATCH 22/33] ci: disable auto-precompile in compute-pipeline and makie workflows too --- .github/workflows/_compute-pipeline.yml | 2 ++ .github/workflows/_makie.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/_compute-pipeline.yml b/.github/workflows/_compute-pipeline.yml index 93d2830665c..d923db80995 100644 --- a/.github/workflows/_compute-pipeline.yml +++ b/.github/workflows/_compute-pipeline.yml @@ -26,6 +26,8 @@ jobs: - uses: julia-actions/cache@v3 - name: Develop and test ComputePipeline shell: julia --project=monorepo {0} + env: + JULIA_PKG_PRECOMPILE_AUTO: '0' run: | using Pkg # dev mono repo versions diff --git a/.github/workflows/_makie.yml b/.github/workflows/_makie.yml index 1a488243aaa..df9d7a8e20c 100644 --- a/.github/workflows/_makie.yml +++ b/.github/workflows/_makie.yml @@ -26,6 +26,8 @@ jobs: - uses: julia-actions/cache@v3 - name: Develop and test Makie shell: julia --project=monorepo {0} + env: + JULIA_PKG_PRECOMPILE_AUTO: '0' run: | using Pkg # dev mono repo versions From d2b96429477c39e985015d41105568ba9c4a4737 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 19:33:26 +0200 Subject: [PATCH 23/33] ci: decouple Julia versions so bucket jobs don't wait across versions Backend workflows now take julia-version as an input instead of using a version matrix. _reference-tests.yml calls each backend twice (once per version). This means Julia 1.10 bucket jobs start as soon as the 1.10 setup finishes, without waiting for the Julia 1 setup (or vice versa). --- .github/workflows/_cairomakie.yml | 25 ++++++++++++------------ .github/workflows/_glmakie.yml | 25 ++++++++++++------------ .github/workflows/_reference-tests.yml | 15 ++++++++++++++ .github/workflows/_wglmakie.yml | 27 +++++++++++++------------- 4 files changed, 52 insertions(+), 40 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 2bbb2bc2014..b0fa972bb54 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -1,23 +1,23 @@ name: CairoMakie on: workflow_call: + inputs: + julia-version: + required: true + type: string jobs: setup: - name: Setup CairoMakie Julia ${{ matrix.version }} + name: Setup CairoMakie Julia ${{ inputs.julia-version }} runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: ['1.10', '1'] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: - version: ${{ matrix.version }} + version: ${{ inputs.julia-version }} - uses: julia-actions/cache@v3 with: - cache-name: julia-cache-cairomakie-${{ matrix.version }} + cache-name: julia-cache-cairomakie-${{ inputs.julia-version }} include-matrix: false - name: Install Julia dependencies shell: julia --project=monorepo {0} @@ -37,28 +37,27 @@ jobs: - name: Upload depot tarball uses: actions/upload-artifact@v7 with: - name: julia-depot-cairomakie-${{ matrix.version }} + name: julia-depot-cairomakie-${{ inputs.julia-version }} path: /tmp/depot.tar.zst retention-days: 1 test: - name: CairoMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 + name: CairoMakie Julia ${{ inputs.julia-version }} bucket ${{ matrix.bucket }}/2 needs: setup runs-on: ubuntu-latest strategy: fail-fast: false matrix: - version: ['1.10', '1'] bucket: [1, 2] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: - version: ${{ matrix.version }} + version: ${{ inputs.julia-version }} - name: Download depot tarball uses: actions/download-artifact@v8 with: - name: julia-depot-cairomakie-${{ matrix.version }} + name: julia-depot-cairomakie-${{ inputs.julia-version }} - name: Extract depot and Manifest run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - name: Run the tests @@ -72,7 +71,7 @@ jobs: - name: Upload test Artifacts uses: actions/upload-artifact@v7 with: - name: ReferenceImages_CairoMakie_${{ matrix.version }}_${{ matrix.bucket }} + name: ReferenceImages_CairoMakie_${{ inputs.julia-version }}_${{ matrix.bucket }} path: ./CairoMakie/test/reference_images/ - name: Fail after artifacts if tests failed if: ${{ env.TESTS_SUCCESSFUL != 'true' }} diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 056c77cf85c..321d599a039 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -1,23 +1,23 @@ name: GLMakie on: workflow_call: + inputs: + julia-version: + required: true + type: string jobs: setup: - name: Setup GLMakie Julia ${{ matrix.version }} + name: Setup GLMakie Julia ${{ inputs.julia-version }} runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: ['1.10', '1'] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: - version: ${{ matrix.version }} + version: ${{ inputs.julia-version }} - uses: julia-actions/cache@v3 with: - cache-name: julia-cache-glmakie-${{ matrix.version }} + cache-name: julia-cache-glmakie-${{ inputs.julia-version }} include-matrix: false - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - name: Install Julia dependencies @@ -40,12 +40,12 @@ jobs: - name: Upload depot tarball uses: actions/upload-artifact@v7 with: - name: julia-depot-glmakie-${{ matrix.version }} + name: julia-depot-glmakie-${{ inputs.julia-version }} path: /tmp/depot.tar.zst retention-days: 1 test: - name: GLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/2 + name: GLMakie Julia ${{ inputs.julia-version }} bucket ${{ matrix.bucket }}/2 needs: setup env: MODERNGL_DEBUGGING: "true" @@ -53,17 +53,16 @@ jobs: strategy: fail-fast: false matrix: - version: ['1.10', '1'] bucket: [1, 2] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: - version: ${{ matrix.version }} + version: ${{ inputs.julia-version }} - name: Download depot tarball uses: actions/download-artifact@v8 with: - name: julia-depot-glmakie-${{ matrix.version }} + name: julia-depot-glmakie-${{ inputs.julia-version }} - name: Extract depot and Manifest run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils @@ -79,7 +78,7 @@ jobs: - name: Upload test Artifacts uses: actions/upload-artifact@v7 with: - name: ReferenceImages_GLMakie_${{ matrix.version }}_${{ matrix.bucket }} + name: ReferenceImages_GLMakie_${{ inputs.julia-version }}_${{ matrix.bucket }} path: | ./GLMakie/test/reference_images/ - name: Fail after artifacts if tests failed diff --git a/.github/workflows/_reference-tests.yml b/.github/workflows/_reference-tests.yml index d3326e179ec..be8967fc25e 100644 --- a/.github/workflows/_reference-tests.yml +++ b/.github/workflows/_reference-tests.yml @@ -4,13 +4,28 @@ on: jobs: cairomakie: + strategy: + matrix: + julia-version: ['1.10', '1'] uses: ./.github/workflows/_cairomakie.yml + with: + julia-version: ${{ matrix.julia-version }} glmakie: + strategy: + matrix: + julia-version: ['1.10', '1'] uses: ./.github/workflows/_glmakie.yml + with: + julia-version: ${{ matrix.julia-version }} wglmakie: + strategy: + matrix: + julia-version: ['1.10', '1'] uses: ./.github/workflows/_wglmakie.yml + with: + julia-version: ${{ matrix.julia-version }} consolidation: name: Merge artifacts diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index a3b160f6a77..06e511caa09 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -1,23 +1,23 @@ name: WGLMakie on: workflow_call: + inputs: + julia-version: + required: true + type: string jobs: setup: - name: Setup WGLMakie Julia ${{ matrix.version }} + name: Setup WGLMakie Julia ${{ inputs.julia-version }} runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: ['1.10', '1'] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: - version: ${{ matrix.version }} + version: ${{ inputs.julia-version }} - uses: julia-actions/cache@v3 with: - cache-name: julia-cache-wglmakie-${{ matrix.version }} + cache-name: julia-cache-wglmakie-${{ inputs.julia-version }} include-matrix: false - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - name: Install Julia dependencies @@ -40,28 +40,27 @@ jobs: - name: Upload depot tarball uses: actions/upload-artifact@v7 with: - name: julia-depot-wglmakie-${{ matrix.version }} + name: julia-depot-wglmakie-${{ inputs.julia-version }} path: /tmp/depot.tar.zst retention-days: 1 test: - name: WGLMakie Julia ${{ matrix.version }} bucket ${{ matrix.bucket }}/4 + name: WGLMakie Julia ${{ inputs.julia-version }} bucket ${{ matrix.bucket }}/4 needs: setup runs-on: ubuntu-latest strategy: fail-fast: false matrix: - version: ['1.10', '1'] bucket: [1, 2, 3, 4] steps: - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: - version: ${{ matrix.version }} + version: ${{ inputs.julia-version }} - name: Download depot tarball uses: actions/download-artifact@v8 with: - name: julia-depot-wglmakie-${{ matrix.version }} + name: julia-depot-wglmakie-${{ inputs.julia-version }} - name: Extract depot and Manifest run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev @@ -76,12 +75,12 @@ jobs: - name: Upload test Artifacts uses: actions/upload-artifact@v7 with: - name: ReferenceImages_WGLMakie_${{ matrix.version }}_${{ matrix.bucket }} + name: ReferenceImages_WGLMakie_${{ inputs.julia-version }}_${{ matrix.bucket }} path: ./WGLMakie/test/reference_images/ - name: Upload test Electron logs uses: actions/upload-artifact@v7 with: - name: Electron_Logs_WGLMakie_${{ matrix.version }}_${{ matrix.bucket }} + name: Electron_Logs_WGLMakie_${{ inputs.julia-version }}_${{ matrix.bucket }} path: ./WGLMakie/test/electron.log - name: Fail after artifacts if tests failed if: ${{ env.TESTS_SUCCESSFUL != 'true' }} From 77e6aae635241754f35d508347aba2bef4740f54 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 19:58:59 +0200 Subject: [PATCH 24/33] debug: add JULIA_DEBUG=loading to CairoMakie bucket 1 to diagnose 1.10 recompilation --- .github/workflows/_cairomakie.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index b0fa972bb54..1a11175d5db 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -65,6 +65,7 @@ jobs: env: REFTEST_BUCKET: ${{ matrix.bucket }} REFTEST_NBUCKETS: '2' + JULIA_DEBUG: ${{ matrix.bucket == 1 && 'loading' || '' }} run: > julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie", coverage=true)' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV From 1fc0cd93fa9f0dab4af8d5748597f984fa9b75e9 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 20:34:52 +0200 Subject: [PATCH 25/33] fix(ci): match coverage=true in setup precompile to avoid flag mismatch On Julia 1.10, coverage=true causes Pkg.test to spawn the subprocess with use_pkgimages=false. The setup job was precompiling without coverage (use_pkgimages=true), so the bucket jobs rejected all cached .ji files due to the flag mismatch. Pass coverage=true in the setup job's Pkg.test call so precompilation uses identical flags. Also removes the JULIA_DEBUG=loading diagnostic from the previous commit. --- .github/workflows/_cairomakie.yml | 3 +-- .github/workflows/_glmakie.yml | 2 +- .github/workflows/_wglmakie.yml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 1a11175d5db..a4c593f0ad4 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -31,7 +31,7 @@ jobs: - name: Precompile via Pkg.test env: PRECOMPILE_ONLY: 'true' - run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' + run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie", coverage=true)' - name: Package depot and Manifest run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball @@ -65,7 +65,6 @@ jobs: env: REFTEST_BUCKET: ${{ matrix.bucket }} REFTEST_NBUCKETS: '2' - JULIA_DEBUG: ${{ matrix.bucket == 1 && 'loading' || '' }} run: > julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie", coverage=true)' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 321d599a039..096ff8e8b30 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -34,7 +34,7 @@ jobs: PRECOMPILE_ONLY: 'true' run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie", coverage=true)' - name: Package depot and Manifest run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 06e511caa09..d72af303d9b 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -34,7 +34,7 @@ jobs: PRECOMPILE_ONLY: 'true' run: > DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie", coverage=true)' - name: Package depot and Manifest run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball From 062759e15e3ec90da67d154be1cd1bdf538bd24c Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sat, 18 Apr 2026 20:37:55 +0200 Subject: [PATCH 26/33] ci: remove unused coverage from backend test workflows Coverage was configured with everything disabled (.codecov.yml has project: false, patch: false, annotations: false). Removing it lets Julia 1.10 use pkgimages (coverage=true forces use_pkgimages=false on 1.10), significantly speeding up package loading in bucket jobs. --- .codecov.yml | 7 ------- .github/workflows/_cairomakie.yml | 8 +------- .github/workflows/_glmakie.yml | 8 +------- .github/workflows/_wglmakie.yml | 8 +------- 4 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 6adca0c9580..00000000000 --- a/.codecov.yml +++ /dev/null @@ -1,7 +0,0 @@ -comment: false -coverage: - status: - project: false - patch: false -github_checks: - annotations: false diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index a4c593f0ad4..e1df8b57561 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -31,7 +31,7 @@ jobs: - name: Precompile via Pkg.test env: PRECOMPILE_ONLY: 'true' - run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie", coverage=true)' + run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - name: Package depot and Manifest run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball @@ -76,9 +76,3 @@ jobs: - name: Fail after artifacts if tests failed if: ${{ env.TESTS_SUCCESSFUL != 'true' }} run: exit 1 - - uses: julia-actions/julia-processcoverage@v1 - with: - directories: Makie/src - - uses: codecov/codecov-action@v6 - with: - file: lcov.info diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 096ff8e8b30..66708a85e17 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -34,7 +34,7 @@ jobs: PRECOMPILE_ONLY: 'true' run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie", coverage=true)' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' - name: Package depot and Manifest run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball @@ -84,9 +84,3 @@ jobs: - name: Fail after artifacts if tests failed if: ${{ env.TESTS_SUCCESSFUL != 'true' }} run: exit 1 - - uses: julia-actions/julia-processcoverage@v1 - with: - directories: Makie/src - - uses: codecov/codecov-action@v6 - with: - file: lcov.info diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index d72af303d9b..30fab287f2c 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -34,7 +34,7 @@ jobs: PRECOMPILE_ONLY: 'true' run: > DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie", coverage=true)' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' - name: Package depot and Manifest run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - name: Upload depot tarball @@ -85,9 +85,3 @@ jobs: - name: Fail after artifacts if tests failed if: ${{ env.TESTS_SUCCESSFUL != 'true' }} run: exit 1 - - uses: julia-actions/julia-processcoverage@v1 - with: - directories: Makie/src - - uses: codecov/codecov-action@v6 - with: - file: lcov.info From f5e13aeac85f7d185084ae4436f81dc33c697c36 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sun, 19 Apr 2026 21:43:56 +0200 Subject: [PATCH 27/33] debug: add JULIA_DEBUG=loading to all setup jobs --- .github/workflows/_cairomakie.yml | 1 + .github/workflows/_glmakie.yml | 1 + .github/workflows/_wglmakie.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index e1df8b57561..18c1b370c8b 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -31,6 +31,7 @@ jobs: - name: Precompile via Pkg.test env: PRECOMPILE_ONLY: 'true' + JULIA_DEBUG: loading run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - name: Package depot and Manifest run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 66708a85e17..236618d00d0 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -32,6 +32,7 @@ jobs: - name: Precompile via Pkg.test env: PRECOMPILE_ONLY: 'true' + JULIA_DEBUG: loading run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 30fab287f2c..70723e16419 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -32,6 +32,7 @@ jobs: - name: Precompile via Pkg.test env: PRECOMPILE_ONLY: 'true' + JULIA_DEBUG: loading run: > DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' From b366a3cd250c5e01bf07a093762debcd2caf11b7 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Sun, 19 Apr 2026 21:54:49 +0200 Subject: [PATCH 28/33] ci: set JULIA_CPU_TARGET for portable pkgimages across runner fleet GitHub Actions runners are heterogeneous (mix of AMD Zen3, Intel Haswell, etc.). Pkgimages compiled for znver3 are rejected on Intel runners ("runtime-disabled features"). Use the same multi-target string as Julia's official binaries so pkgimages work on any x86_64 runner. Also removes remaining coverage=true from WGLMakie/GLMakie bucket jobs that were missed in the previous commit. --- .github/workflows/_cairomakie.yml | 4 +++- .github/workflows/_glmakie.yml | 4 +++- .github/workflows/_wglmakie.yml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml index 18c1b370c8b..b8b2b5d318e 100644 --- a/.github/workflows/_cairomakie.yml +++ b/.github/workflows/_cairomakie.yml @@ -32,6 +32,7 @@ jobs: env: PRECOMPILE_ONLY: 'true' JULIA_DEBUG: loading + JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - name: Package depot and Manifest run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml @@ -66,8 +67,9 @@ jobs: env: REFTEST_BUCKET: ${{ matrix.bucket }} REFTEST_NBUCKETS: '2' + JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' run: > - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie", coverage=true)' + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - name: Upload test Artifacts uses: actions/upload-artifact@v7 diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml index 236618d00d0..4a70da16e99 100644 --- a/.github/workflows/_glmakie.yml +++ b/.github/workflows/_glmakie.yml @@ -33,6 +33,7 @@ jobs: env: PRECOMPILE_ONLY: 'true' JULIA_DEBUG: loading + JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' run: > DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' @@ -73,8 +74,9 @@ jobs: env: REFTEST_BUCKET: ${{ matrix.bucket }} REFTEST_NBUCKETS: '2' + JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' run: > - DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie", coverage=true)' + DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - name: Upload test Artifacts uses: actions/upload-artifact@v7 diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml index 70723e16419..ee0abaa81d3 100644 --- a/.github/workflows/_wglmakie.yml +++ b/.github/workflows/_wglmakie.yml @@ -33,6 +33,7 @@ jobs: env: PRECOMPILE_ONLY: 'true' JULIA_DEBUG: loading + JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' run: > DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' @@ -70,8 +71,9 @@ jobs: env: REFTEST_BUCKET: ${{ matrix.bucket }} REFTEST_NBUCKETS: '4' + JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' run: > - DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie", coverage=true)' + DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - name: Upload test Artifacts uses: actions/upload-artifact@v7 From 1a4de460c26314ddf5728a8e67be0bb21ec78d43 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Mon, 20 Apr 2026 09:51:18 +0200 Subject: [PATCH 29/33] ci: unify backend workflows into single parameterized _backend-tests.yml Replace the three near-identical _cairomakie.yml, _glmakie.yml, _wglmakie.yml with a single _backend-tests.yml that takes inputs for backend name, Julia version, bucket count, system packages, and shell. The bucket list is auto-generated from nbuckets via seq|jq in the setup job, eliminating the redundant bucket-list input. The shell input allows callers to wrap test execution in xvfb-run for display-dependent backends. --- .github/workflows/_backend-tests.yml | 114 +++++++++++++++++++++++++ .github/workflows/_cairomakie.yml | 81 ------------------ .github/workflows/_glmakie.yml | 89 ------------------- .github/workflows/_reference-tests.yml | 14 ++- .github/workflows/_wglmakie.yml | 90 ------------------- 5 files changed, 125 insertions(+), 263 deletions(-) create mode 100644 .github/workflows/_backend-tests.yml delete mode 100644 .github/workflows/_cairomakie.yml delete mode 100644 .github/workflows/_glmakie.yml delete mode 100644 .github/workflows/_wglmakie.yml diff --git a/.github/workflows/_backend-tests.yml b/.github/workflows/_backend-tests.yml new file mode 100644 index 00000000000..7c79b6c6165 --- /dev/null +++ b/.github/workflows/_backend-tests.yml @@ -0,0 +1,114 @@ +name: Backend tests +on: + workflow_call: + inputs: + julia-version: + required: true + type: string + backend: + required: true + type: string + description: 'Backend name, e.g. CairoMakie, GLMakie, WGLMakie' + nbuckets: + required: false + type: number + default: 2 + system-packages: + required: false + type: string + default: '' + description: 'apt packages to install (space-separated)' + shell: + required: false + type: string + default: 'bash -eo pipefail {0}' + description: 'Shell for test steps. Use e.g. DISPLAY=:0 xvfb-run ... bash -eo pipefail {0} for display-dependent backends.' + +jobs: + setup: + name: Setup ${{ inputs.backend }} Julia ${{ inputs.julia-version }} + runs-on: ubuntu-latest + outputs: + bucket-list: ${{ steps.buckets.outputs.list }} + steps: + - id: buckets + run: echo "list=$(seq 1 ${{ inputs.nbuckets }} | jq -s .)" >> $GITHUB_OUTPUT + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ inputs.julia-version }} + - uses: julia-actions/cache@v3 + with: + cache-name: julia-cache-${{ inputs.backend }}-${{ inputs.julia-version }} + include-matrix: false + - name: Install system dependencies + if: inputs.system-packages != '' + run: sudo apt-get update && sudo apt-get install -y ${{ inputs.system-packages }} + - name: Install Julia dependencies + shell: julia --project=monorepo {0} + env: + JULIA_PKG_PRECOMPILE_AUTO: '0' + run: | + using Pkg; + pkg"registry up" + Pkg.update() + pkg"dev ./Makie ./${{ inputs.backend }} ./ReferenceTests ./ComputePipeline" + - name: Precompile via Pkg.test + shell: ${{ inputs.shell }} + env: + PRECOMPILE_ONLY: 'true' + JULIA_DEBUG: loading + JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' + run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("${{ inputs.backend }}")' + - name: Package depot and Manifest + run: > + cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && + tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ + .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml + - name: Upload depot tarball + uses: actions/upload-artifact@v7 + with: + name: julia-depot-${{ inputs.backend }}-${{ inputs.julia-version }} + path: /tmp/depot.tar.zst + retention-days: 1 + + test: + name: ${{ inputs.backend }} Julia ${{ inputs.julia-version }} bucket ${{ matrix.bucket }}/${{ inputs.nbuckets }} + needs: setup + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + bucket: ${{ fromJSON(needs.setup.outputs.bucket-list) }} + steps: + - uses: actions/checkout@v6 + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ inputs.julia-version }} + - name: Download depot tarball + uses: actions/download-artifact@v8 + with: + name: julia-depot-${{ inputs.backend }}-${{ inputs.julia-version }} + - name: Extract depot and Manifest + run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml + - name: Install system dependencies + if: inputs.system-packages != '' + run: sudo apt-get update && sudo apt-get install -y ${{ inputs.system-packages }} + - name: Run the tests + shell: ${{ inputs.shell }} + continue-on-error: true + env: + REFTEST_BUCKET: ${{ matrix.bucket }} + REFTEST_NBUCKETS: ${{ inputs.nbuckets }} + JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' + run: | + julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("${{ inputs.backend }}")' + echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV + - name: Upload test Artifacts + uses: actions/upload-artifact@v7 + with: + name: ReferenceImages_${{ inputs.backend }}_${{ inputs.julia-version }}_${{ matrix.bucket }} + path: ./${{ inputs.backend }}/test/reference_images/ + - name: Fail after artifacts if tests failed + if: ${{ env.TESTS_SUCCESSFUL != 'true' }} + run: exit 1 diff --git a/.github/workflows/_cairomakie.yml b/.github/workflows/_cairomakie.yml deleted file mode 100644 index b8b2b5d318e..00000000000 --- a/.github/workflows/_cairomakie.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: CairoMakie -on: - workflow_call: - inputs: - julia-version: - required: true - type: string - -jobs: - setup: - name: Setup CairoMakie Julia ${{ inputs.julia-version }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ inputs.julia-version }} - - uses: julia-actions/cache@v3 - with: - cache-name: julia-cache-cairomakie-${{ inputs.julia-version }} - include-matrix: false - - name: Install Julia dependencies - shell: julia --project=monorepo {0} - env: - JULIA_PKG_PRECOMPILE_AUTO: '0' - run: | - using Pkg; - pkg"registry up" - Pkg.update() - pkg"dev ./Makie ./CairoMakie ./ReferenceTests ./ComputePipeline" - - name: Precompile via Pkg.test - env: - PRECOMPILE_ONLY: 'true' - JULIA_DEBUG: loading - JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' - run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - - name: Package depot and Manifest - run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - - name: Upload depot tarball - uses: actions/upload-artifact@v7 - with: - name: julia-depot-cairomakie-${{ inputs.julia-version }} - path: /tmp/depot.tar.zst - retention-days: 1 - - test: - name: CairoMakie Julia ${{ inputs.julia-version }} bucket ${{ matrix.bucket }}/2 - needs: setup - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - bucket: [1, 2] - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ inputs.julia-version }} - - name: Download depot tarball - uses: actions/download-artifact@v8 - with: - name: julia-depot-cairomakie-${{ inputs.julia-version }} - - name: Extract depot and Manifest - run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - - name: Run the tests - continue-on-error: true - env: - REFTEST_BUCKET: ${{ matrix.bucket }} - REFTEST_NBUCKETS: '2' - JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' - run: > - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("CairoMakie")' - && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - - name: Upload test Artifacts - uses: actions/upload-artifact@v7 - with: - name: ReferenceImages_CairoMakie_${{ inputs.julia-version }}_${{ matrix.bucket }} - path: ./CairoMakie/test/reference_images/ - - name: Fail after artifacts if tests failed - if: ${{ env.TESTS_SUCCESSFUL != 'true' }} - run: exit 1 diff --git a/.github/workflows/_glmakie.yml b/.github/workflows/_glmakie.yml deleted file mode 100644 index 4a70da16e99..00000000000 --- a/.github/workflows/_glmakie.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: GLMakie -on: - workflow_call: - inputs: - julia-version: - required: true - type: string - -jobs: - setup: - name: Setup GLMakie Julia ${{ inputs.julia-version }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ inputs.julia-version }} - - uses: julia-actions/cache@v3 - with: - cache-name: julia-cache-glmakie-${{ inputs.julia-version }} - include-matrix: false - - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - - name: Install Julia dependencies - shell: julia --project=monorepo {0} - env: - JULIA_PKG_PRECOMPILE_AUTO: '0' - run: | - using Pkg; - pkg"registry up" - Pkg.update() - pkg"dev ./Makie ./GLMakie ./ReferenceTests ./ComputePipeline" - - name: Precompile via Pkg.test - env: - PRECOMPILE_ONLY: 'true' - JULIA_DEBUG: loading - JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' - run: > - DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' - - name: Package depot and Manifest - run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - - name: Upload depot tarball - uses: actions/upload-artifact@v7 - with: - name: julia-depot-glmakie-${{ inputs.julia-version }} - path: /tmp/depot.tar.zst - retention-days: 1 - - test: - name: GLMakie Julia ${{ inputs.julia-version }} bucket ${{ matrix.bucket }}/2 - needs: setup - env: - MODERNGL_DEBUGGING: "true" - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - bucket: [1, 2] - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ inputs.julia-version }} - - name: Download depot tarball - uses: actions/download-artifact@v8 - with: - name: julia-depot-glmakie-${{ inputs.julia-version }} - - name: Extract depot and Manifest - run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - - run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - - name: Run the tests - id: referencetests - continue-on-error: true - env: - REFTEST_BUCKET: ${{ matrix.bucket }} - REFTEST_NBUCKETS: '2' - JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' - run: > - DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("GLMakie")' - && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - - name: Upload test Artifacts - uses: actions/upload-artifact@v7 - with: - name: ReferenceImages_GLMakie_${{ inputs.julia-version }}_${{ matrix.bucket }} - path: | - ./GLMakie/test/reference_images/ - - name: Fail after artifacts if tests failed - if: ${{ env.TESTS_SUCCESSFUL != 'true' }} - run: exit 1 diff --git a/.github/workflows/_reference-tests.yml b/.github/workflows/_reference-tests.yml index be8967fc25e..71e5a161380 100644 --- a/.github/workflows/_reference-tests.yml +++ b/.github/workflows/_reference-tests.yml @@ -7,25 +7,33 @@ jobs: strategy: matrix: julia-version: ['1.10', '1'] - uses: ./.github/workflows/_cairomakie.yml + uses: ./.github/workflows/_backend-tests.yml with: julia-version: ${{ matrix.julia-version }} + backend: CairoMakie glmakie: strategy: matrix: julia-version: ['1.10', '1'] - uses: ./.github/workflows/_glmakie.yml + uses: ./.github/workflows/_backend-tests.yml with: julia-version: ${{ matrix.julia-version }} + backend: GLMakie + system-packages: xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils + shell: 'DISPLAY=:0 xvfb-run -s "-screen 0 1024x768x24" bash -eo pipefail {0}' wglmakie: strategy: matrix: julia-version: ['1.10', '1'] - uses: ./.github/workflows/_wglmakie.yml + uses: ./.github/workflows/_backend-tests.yml with: julia-version: ${{ matrix.julia-version }} + backend: WGLMakie + nbuckets: 4 + system-packages: xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev + shell: 'DISPLAY=:0 xvfb-run -s "-screen 0 2048x2048x24" bash -eo pipefail {0}' consolidation: name: Merge artifacts diff --git a/.github/workflows/_wglmakie.yml b/.github/workflows/_wglmakie.yml deleted file mode 100644 index ee0abaa81d3..00000000000 --- a/.github/workflows/_wglmakie.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: WGLMakie -on: - workflow_call: - inputs: - julia-version: - required: true - type: string - -jobs: - setup: - name: Setup WGLMakie Julia ${{ inputs.julia-version }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ inputs.julia-version }} - - uses: julia-actions/cache@v3 - with: - cache-name: julia-cache-wglmakie-${{ inputs.julia-version }} - include-matrix: false - - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - - name: Install Julia dependencies - shell: julia --project=monorepo {0} - env: - JULIA_PKG_PRECOMPILE_AUTO: '0' - run: | - using Pkg; - pkg"registry up" - Pkg.update() - pkg"dev ./Makie ./WGLMakie ./ReferenceTests ./ComputePipeline" - - name: Precompile via Pkg.test - env: - PRECOMPILE_ONLY: 'true' - JULIA_DEBUG: loading - JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' - run: > - DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' - julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' - - name: Package depot and Manifest - run: cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && tar -cf /tmp/depot.tar.zst --use-compress-program zstdmt -C ~ .julia/compiled .julia/packages .julia/artifacts .julia/scratchspaces .julia/monorepo-Manifest.toml - - name: Upload depot tarball - uses: actions/upload-artifact@v7 - with: - name: julia-depot-wglmakie-${{ inputs.julia-version }} - path: /tmp/depot.tar.zst - retention-days: 1 - - test: - name: WGLMakie Julia ${{ inputs.julia-version }} bucket ${{ matrix.bucket }}/4 - needs: setup - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - bucket: [1, 2, 3, 4] - steps: - - uses: actions/checkout@v6 - - uses: julia-actions/setup-julia@v2 - with: - version: ${{ inputs.julia-version }} - - name: Download depot tarball - uses: actions/download-artifact@v8 - with: - name: julia-depot-wglmakie-${{ inputs.julia-version }} - - name: Extract depot and Manifest - run: tar -xf depot.tar.zst --use-compress-program unzstd -C ~ && mkdir -p monorepo && cp ~/.julia/monorepo-Manifest.toml monorepo/Manifest.toml - - run: sudo apt-get update && sudo apt-get install -y xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - - name: Run the tests - continue-on-error: true - env: - REFTEST_BUCKET: ${{ matrix.bucket }} - REFTEST_NBUCKETS: '4' - JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' - run: > - DISPLAY=:0 xvfb-run -s '-screen 0 2048x2048x24' julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("WGLMakie")' - && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - - name: Upload test Artifacts - uses: actions/upload-artifact@v7 - with: - name: ReferenceImages_WGLMakie_${{ inputs.julia-version }}_${{ matrix.bucket }} - path: ./WGLMakie/test/reference_images/ - - name: Upload test Electron logs - uses: actions/upload-artifact@v7 - with: - name: Electron_Logs_WGLMakie_${{ inputs.julia-version }}_${{ matrix.bucket }} - path: ./WGLMakie/test/electron.log - - name: Fail after artifacts if tests failed - if: ${{ env.TESTS_SUCCESSFUL != 'true' }} - run: exit 1 From 97d0a18821f22a2cea10b1a4086a041d6dd626f4 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Mon, 20 Apr 2026 09:56:41 +0200 Subject: [PATCH 30/33] fix(ci): replace shell input with test-prefix (shell doesn't support expressions) --- .github/workflows/_backend-tests.yml | 15 +++++++-------- .github/workflows/_reference-tests.yml | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/_backend-tests.yml b/.github/workflows/_backend-tests.yml index 7c79b6c6165..64f555a2e9b 100644 --- a/.github/workflows/_backend-tests.yml +++ b/.github/workflows/_backend-tests.yml @@ -18,11 +18,11 @@ on: type: string default: '' description: 'apt packages to install (space-separated)' - shell: + test-prefix: required: false type: string - default: 'bash -eo pipefail {0}' - description: 'Shell for test steps. Use e.g. DISPLAY=:0 xvfb-run ... bash -eo pipefail {0} for display-dependent backends.' + default: '' + description: 'Command prefix for test execution, e.g. "DISPLAY=:0 xvfb-run -s \"-screen 0 1024x768x24\""' jobs: setup: @@ -54,12 +54,11 @@ jobs: Pkg.update() pkg"dev ./Makie ./${{ inputs.backend }} ./ReferenceTests ./ComputePipeline" - name: Precompile via Pkg.test - shell: ${{ inputs.shell }} env: PRECOMPILE_ONLY: 'true' JULIA_DEBUG: loading JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' - run: julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("${{ inputs.backend }}")' + run: ${{ inputs.test-prefix }} julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("${{ inputs.backend }}")' - name: Package depot and Manifest run: > cp monorepo/Manifest.toml ~/.julia/monorepo-Manifest.toml && @@ -95,15 +94,15 @@ jobs: if: inputs.system-packages != '' run: sudo apt-get update && sudo apt-get install -y ${{ inputs.system-packages }} - name: Run the tests - shell: ${{ inputs.shell }} continue-on-error: true env: REFTEST_BUCKET: ${{ matrix.bucket }} REFTEST_NBUCKETS: ${{ inputs.nbuckets }} JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' - run: | + run: > + ${{ inputs.test-prefix }} julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("${{ inputs.backend }}")' - echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV + && echo "TESTS_SUCCESSFUL=true" >> $GITHUB_ENV - name: Upload test Artifacts uses: actions/upload-artifact@v7 with: diff --git a/.github/workflows/_reference-tests.yml b/.github/workflows/_reference-tests.yml index 71e5a161380..80ca90ee547 100644 --- a/.github/workflows/_reference-tests.yml +++ b/.github/workflows/_reference-tests.yml @@ -21,7 +21,7 @@ jobs: julia-version: ${{ matrix.julia-version }} backend: GLMakie system-packages: xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev xsettingsd x11-xserver-utils - shell: 'DISPLAY=:0 xvfb-run -s "-screen 0 1024x768x24" bash -eo pipefail {0}' + test-prefix: 'DISPLAY=:0 xvfb-run -s "-screen 0 1024x768x24"' wglmakie: strategy: @@ -33,7 +33,7 @@ jobs: backend: WGLMakie nbuckets: 4 system-packages: xorg-dev libosmesa6 libgl1-mesa-dri mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev - shell: 'DISPLAY=:0 xvfb-run -s "-screen 0 2048x2048x24" bash -eo pipefail {0}' + test-prefix: 'DISPLAY=:0 xvfb-run -s "-screen 0 2048x2048x24"' consolidation: name: Merge artifacts From 573e609a18fa6fa3612082b67f4cad484f7535f7 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Mon, 20 Apr 2026 10:01:06 +0200 Subject: [PATCH 31/33] fix(ci): use compact jq output for bucket list --- .github/workflows/_backend-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_backend-tests.yml b/.github/workflows/_backend-tests.yml index 64f555a2e9b..ccd2d9f4073 100644 --- a/.github/workflows/_backend-tests.yml +++ b/.github/workflows/_backend-tests.yml @@ -32,7 +32,7 @@ jobs: bucket-list: ${{ steps.buckets.outputs.list }} steps: - id: buckets - run: echo "list=$(seq 1 ${{ inputs.nbuckets }} | jq -s .)" >> $GITHUB_OUTPUT + run: echo "list=$(seq 1 ${{ inputs.nbuckets }} | jq -cs .)" >> $GITHUB_OUTPUT - uses: actions/checkout@v6 - uses: julia-actions/setup-julia@v2 with: From a2f00766b0672f781e03064d0207d327c9a56917 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Mon, 20 Apr 2026 12:19:39 +0200 Subject: [PATCH 32/33] ci: remove JULIA_DEBUG=loading from setup jobs --- .github/workflows/_backend-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/_backend-tests.yml b/.github/workflows/_backend-tests.yml index ccd2d9f4073..ff764a0465f 100644 --- a/.github/workflows/_backend-tests.yml +++ b/.github/workflows/_backend-tests.yml @@ -56,7 +56,6 @@ jobs: - name: Precompile via Pkg.test env: PRECOMPILE_ONLY: 'true' - JULIA_DEBUG: loading JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' run: ${{ inputs.test-prefix }} julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("${{ inputs.backend }}")' - name: Package depot and Manifest From 23ac427c038a770f8c62190b27486a1b6bdfabb7 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Mon, 20 Apr 2026 12:26:25 +0200 Subject: [PATCH 33/33] ci: add comments about pkgimage cache mismatches and coverage --- .github/workflows/_backend-tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/_backend-tests.yml b/.github/workflows/_backend-tests.yml index ff764a0465f..b7f49164916 100644 --- a/.github/workflows/_backend-tests.yml +++ b/.github/workflows/_backend-tests.yml @@ -47,6 +47,8 @@ jobs: - name: Install Julia dependencies shell: julia --project=monorepo {0} env: + # Don't precompile here; Pkg.test below handles it with the correct + # test environment and flags. JULIA_PKG_PRECOMPILE_AUTO: '0' run: | using Pkg; @@ -56,7 +58,13 @@ jobs: - name: Precompile via Pkg.test env: PRECOMPILE_ONLY: 'true' + # Portable CPU target so pkgimages work across GitHub's heterogeneous + # runner fleet (mix of AMD Zen3, Intel Haswell, etc.). JULIA_CPU_TARGET: 'generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)' + # NOTE: coverage is intentionally omitted. On Julia 1.10, coverage=true + # disables pkgimages (use_pkgimages=false), causing cache flag mismatches + # between setup and bucket jobs. If coverage is re-enabled, this must be + # set identically here and in the bucket test step. run: ${{ inputs.test-prefix }} julia --color=yes --project=monorepo -e 'using Pkg; Pkg.test("${{ inputs.backend }}")' - name: Package depot and Manifest run: >