From 1b56a123dc92c51826aa51a517be288ca7d6083b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 21 Nov 2024 18:01:20 +0100 Subject: [PATCH 01/27] Add GAP distro tests --- .github/workflows/CI-distro.yml | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/CI-distro.yml diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml new file mode 100644 index 00000000..643a8499 --- /dev/null +++ b/.github/workflows/CI-distro.yml @@ -0,0 +1,58 @@ +name: Test GAP package distro + +on: + push: + branches: + - 'master' + - 'release-*' + tags: '*' + pull_request: + schedule: + # Every Monday at 3:08 AM UTC + - cron: '8 3 * * 1' + workflow_dispatch: + +concurrency: + # group by workflow and ref; the last slightly strange component ensures that for pull + # requests, we limit to 1 concurrent job, but for the default repository branch we don't + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref_name != github.event.repository.default_branch || github.run_number }} + # Cancel intermediate builds, but only if it is a pull request build. + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + +jobs: + test: + name: ${{ matrix.gap-package }} + runs-on: ${{ matrix.os }} + timeout-minutes: 20 + continue-on-error: ${{ matrix.julia-version == 'nightly' }} + strategy: + fail-fast: false + matrix: + julia-version: + - '1' + julia-arch: + - x64 + os: + - ubuntu-latest + gap-package: + - 'ferret' + + steps: + - uses: actions/checkout@v4 + with: + # For Codecov, we must also fetch the parent of the HEAD commit to + # be able to properly deal with PRs / merges + fetch-depth: 2 + - name: "Set up Julia" + uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.julia-version }} + arch: ${{ matrix.julia-arch }} + - name: "Cache artifacts" + uses: julia-actions/cache@v2 + with: + cache-scratchspaces: false + - name: "Build package" + uses: julia-actions/julia-buildpkg@v1 + - name: "Run GAP package tests" + run: julia --color=yes --project=. -e 'using GAP; GAP.Globals.TestPackage(GAP.Obj("${{ matrix.gap-package }}"))' From ad118abb4e0640a74b3a8794329a49c2ad713884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 21 Nov 2024 18:37:08 +0100 Subject: [PATCH 02/27] Try with matrix --- .github/workflows/CI-distro.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 643a8499..704c1549 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -20,8 +20,33 @@ concurrency: cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: + generate-matrix: + runs-on: ubuntu-latest + outputs: + gap-packages: ${{ steps.set-matrix.outputs.gap-packages }} + steps: + - uses: actions/checkout@v4 + - name: "Set up Julia" + uses: julia-actions/setup-julia@v2 + with: + version: '1' + - name: "Cache artifacts" + uses: julia-actions/cache@v2 + - name: "Build package" + uses: julia-actions/julia-buildpkg@v1 + - name: Get list of GAP packages + id: set-matrix + run: julia --project=. -e ' + using Artifacts; + output = sprint(print, "gap-packages=", readdir(artifact"gap_packages")); + println(output); + open(ENV["GITHUB_OUTPUT"], "a") do io; + println(io, output); + end;' + test: name: ${{ matrix.gap-package }} + needs: generate-matrix runs-on: ${{ matrix.os }} timeout-minutes: 20 continue-on-error: ${{ matrix.julia-version == 'nightly' }} @@ -34,15 +59,10 @@ jobs: - x64 os: - ubuntu-latest - gap-package: - - 'ferret' + gap-package: ${{fromJSON(needs.generate-matrix.outputs.gap-packages)}} steps: - uses: actions/checkout@v4 - with: - # For Codecov, we must also fetch the parent of the HEAD commit to - # be able to properly deal with PRs / merges - fetch-depth: 2 - name: "Set up Julia" uses: julia-actions/setup-julia@v2 with: From 4d2e0916edff941db9663f4403e89358ea35c595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 13 Dec 2024 11:15:11 +0100 Subject: [PATCH 03/27] Fix retrieval of GAP packages list --- .github/workflows/CI-distro.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 704c1549..55e19fe2 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -37,8 +37,8 @@ jobs: - name: Get list of GAP packages id: set-matrix run: julia --project=. -e ' - using Artifacts; - output = sprint(print, "gap-packages=", readdir(artifact"gap_packages")); + using Artifacts, TOML; + output = sprint(print, "gap-packages=", map(name -> name[9:end], sort!(collect(filter(startswith("GAP_pkg_"), keys(TOML.parsefile(find_artifacts_toml(Base.active_project())))))))); println(output); open(ENV["GITHUB_OUTPUT"], "a") do io; println(io, output); From 8aefe07c6d868fea54ff78cea80da096c87ed71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 21 Nov 2024 20:01:56 +0100 Subject: [PATCH 04/27] Add `GAP.Packages.test` Co-authored-by: Max Horn --- .github/workflows/CI-distro.yml | 2 +- Project.toml | 2 ++ docs/src/packages.md | 1 + src/packages.jl | 64 ++++++++++++++++++++++++++++++++- 4 files changed, 67 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 55e19fe2..3eb023d1 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -75,4 +75,4 @@ jobs: - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" - run: julia --color=yes --project=. -e 'using GAP; GAP.Globals.TestPackage(GAP.Obj("${{ matrix.gap-package }}"))' + run: julia --color=yes --project=. -e 'using GAP, Test; GAP.Packages.test("${{ matrix.gap-package }}")' diff --git a/Project.toml b/Project.toml index 38864cb8..5d4d3ab9 100644 --- a/Project.toml +++ b/Project.toml @@ -48,6 +48,7 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Scratch = "6c6a2e73-6563-6170-7368-637461726353" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" nauty_jll = "55c6dc9b-343a-50ca-8ff2-b71adb3733d5" @@ -96,6 +97,7 @@ Pkg = "1.6" REPL = "1.6" Random = "1.6" Scratch = "1.1" +Test = "1.6" TOML = "<0.0.1, 1" julia = "1.6" nauty_jll = "2.6.13" diff --git a/docs/src/packages.md b/docs/src/packages.md index 7887a84c..594db88e 100644 --- a/docs/src/packages.md +++ b/docs/src/packages.md @@ -14,6 +14,7 @@ GAP.Packages.install GAP.Packages.update GAP.Packages.remove GAP.Packages.build +GAP.Packages.test GAP.Packages.locate_package ``` diff --git a/src/packages.jl b/src/packages.jl index 7eaf126e..ce17b6e0 100644 --- a/src/packages.jl +++ b/src/packages.jl @@ -3,7 +3,8 @@ module Packages import Downloads import Pidfile -import ...GAP: Globals, GapObj, replace_global!, RNamObj, sysinfo, Wrappers +import Test: @test +import ...GAP: disable_error_handler, Globals, GapObj, replace_global!, RNamObj, sysinfo, Wrappers const DEFAULT_PKGDIR = Ref{String}() const DOWNLOAD_HELPER = Ref{Downloads.Downloader}() @@ -408,6 +409,67 @@ function build(name::String; quiet::Bool = false, return res end +""" + test(name::String) + +Test the GAP package with name `name`. + +The function uses [the function `TestPackage`](GAP_ref(ref:TestPackage)). + +Use-sites of this function should verify that the `Test` package is loaded +before calling this function, as this function might be moved +to a package extension that depends on the `Test` package in the future. +""" +function test(name::String) + global disable_error_handler + + function with_gap_var(f, name::String, val) + gname = GapObj(name) + old_value = Globals.ValueGlobal(gname) + Globals.MakeReadWriteGlobal(gname) + Globals.UnbindGlobal(gname) + Globals.BindGlobal(gname, val) + try + f() + finally + Globals.MakeReadWriteGlobal(gname); + Globals.UnbindGlobal(gname); + Globals.BindGlobal(gname, old_value); + end + end + + error_occurred = false + ended_using_QuitGap = false + function fake_QuitGap(code) + if code != 0 + error_occurred = true + end + ended_using_QuitGap = true + end + + disable_error_handler[] = true + try + with_gap_var("ERROR_OUTPUT", Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var("QuitGap", fake_QuitGap) do + with_gap_var("QUIT_GAP", fake_QuitGap) do + with_gap_var("ForceQuitGap", identity) do + with_gap_var("FORCE_QUIT_GAP", identity) do + result = Globals.TestPackage(GapObj(name)) + @test ended_using_QuitGap || result == true + # Due to the hack above, we run into an error in TestPackage that is usually unreachable. + # In the case of a `QuitGap` call, we thus don't check for `result == true`. + end + end + end + end + end + finally + disable_error_handler[] = false + end + + @test !error_occurred +end + """ locate_package(name::String) From c43cdf95561b37b8f4dded5b4bffa2221a37663f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 18 Dec 2024 16:33:19 +0100 Subject: [PATCH 05/27] Remove dependency on `Test` --- .github/workflows/CI-distro.yml | 2 +- Project.toml | 2 -- src/packages.jl | 20 +++++++++----------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 3eb023d1..288f1c46 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -75,4 +75,4 @@ jobs: - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" - run: julia --color=yes --project=. -e 'using GAP, Test; GAP.Packages.test("${{ matrix.gap-package }}")' + run: julia --color=yes --project=. -e 'using GAP, Test; @test GAP.Packages.test("${{ matrix.gap-package }}")' diff --git a/Project.toml b/Project.toml index 5d4d3ab9..38864cb8 100644 --- a/Project.toml +++ b/Project.toml @@ -48,7 +48,6 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Scratch = "6c6a2e73-6563-6170-7368-637461726353" -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" nauty_jll = "55c6dc9b-343a-50ca-8ff2-b71adb3733d5" @@ -97,7 +96,6 @@ Pkg = "1.6" REPL = "1.6" Random = "1.6" Scratch = "1.1" -Test = "1.6" TOML = "<0.0.1, 1" julia = "1.6" nauty_jll = "2.6.13" diff --git a/src/packages.jl b/src/packages.jl index ce17b6e0..7bf37828 100644 --- a/src/packages.jl +++ b/src/packages.jl @@ -3,7 +3,6 @@ module Packages import Downloads import Pidfile -import Test: @test import ...GAP: disable_error_handler, Globals, GapObj, replace_global!, RNamObj, sysinfo, Wrappers const DEFAULT_PKGDIR = Ref{String}() @@ -412,13 +411,12 @@ end """ test(name::String) -Test the GAP package with name `name`. +Return a boolean indicating if the GAP package with name `name` succeeds +in running its tests. -The function uses [the function `TestPackage`](GAP_ref(ref:TestPackage)). +It is inteded to be used with the `@test` macro from the `Test` package. -Use-sites of this function should verify that the `Test` package is loaded -before calling this function, as this function might be moved -to a package extension that depends on the `Test` package in the future. +The function uses [the function `TestPackage`](GAP_ref(ref:TestPackage)). """ function test(name::String) global disable_error_handler @@ -448,16 +446,14 @@ function test(name::String) end disable_error_handler[] = true + result = false try with_gap_var("ERROR_OUTPUT", Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do with_gap_var("QuitGap", fake_QuitGap) do with_gap_var("QUIT_GAP", fake_QuitGap) do with_gap_var("ForceQuitGap", identity) do with_gap_var("FORCE_QUIT_GAP", identity) do - result = Globals.TestPackage(GapObj(name)) - @test ended_using_QuitGap || result == true - # Due to the hack above, we run into an error in TestPackage that is usually unreachable. - # In the case of a `QuitGap` call, we thus don't check for `result == true`. + result = Globals.TestPackage(GapObj(name)) end end end @@ -467,7 +463,9 @@ function test(name::String) disable_error_handler[] = false end - @test !error_occurred + # Due to the hack above, we run into an error in TestPackage that is usually unreachable. + # In the case of a `QuitGap` call, we thus don't check for `result == true`. + return !error_occurred && (ended_using_QuitGap || result == true) end """ From 2e50af0379d7c733ba7b885aad7f07f3062f9853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 18 Dec 2024 10:09:00 +0100 Subject: [PATCH 06/27] Add exclude list --- .github/workflows/CI-distro.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 288f1c46..fe5fde35 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -60,6 +60,12 @@ jobs: os: - ubuntu-latest gap-package: ${{fromJSON(needs.generate-matrix.outputs.gap-packages)}} + exclude: + - gap-package: 'curlinterface' # no jll + - gap-package: 'example' # no jll + - gap-package: 'jupyterkernel' # no jll + - gap-package: 'semigroups' # no jll + - gap-package: 'xgap' # no jll steps: - uses: actions/checkout@v4 From 65dbc8860d4b42638bdbacaf28f8c49f89cc027a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 18 Dec 2024 16:42:51 +0100 Subject: [PATCH 07/27] Add to changelog --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index ed1fd7f1..396f54f6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -31,6 +31,7 @@ - orb - profiling - simpcomp +- Add `GAP.Packages.test(name)` ## Version 0.12.1 (released 2024-12-09) From c33e17534959d910b8519fa0c82c4b1e24906885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 18 Dec 2024 17:19:24 +0100 Subject: [PATCH 08/27] Extend exclusion list --- .github/workflows/CI-distro.yml | 38 ++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index fe5fde35..bcafb7e5 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -61,11 +61,39 @@ jobs: - ubuntu-latest gap-package: ${{fromJSON(needs.generate-matrix.outputs.gap-packages)}} exclude: - - gap-package: 'curlinterface' # no jll - - gap-package: 'example' # no jll - - gap-package: 'jupyterkernel' # no jll - - gap-package: 'semigroups' # no jll - - gap-package: 'xgap' # no jll + - gap-package: '4ti2interface' # ??? + - gap-package: 'alnuth' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` + - gap-package: 'autodoc' # test failure + - gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` + - gap-package: 'curlinterface' # no jll + - gap-package: 'example' # no jll + - gap-package: 'examplesforhomalg' # `Error, found no Singular executable in PATH while searching the following list` + - gap-package: 'gapdoc' # test failure + - gap-package: 'gradedmodules' # `Error, found no Singular executable in PATH while searching the following list` + - gap-package: 'gradedringforhomalg' # `Error, found no Singular executable in PATH while searching the following list` + - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` + - gap-package: 'guava' # test failure + - gap-package: 'hap' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` + - gap-package: 'hapcryst' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` + - gap-package: 'io' # test failure + - gap-package: 'itc' # dependency `xgap` has no jll + - gap-package: 'jupyterkernel' # no jll + - gap-package: 'localizeringforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' + - gap-package: 'modulepresentationsforcap' # `Error, found no Singular executable in PATH while searching the following list`' + - gap-package: 'normalizinterface' # `Error, Some error in the normaliz input data detected: Cone Property in last line not allowed for lattice ideals` + - gap-package: 'packagemanager' # test failure + - gap-package: 'polenta' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` + - gap-package: 'polycyclic' # ??? + - gap-package: 'polymaking' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` + - gap-package: 'profiling' # segfaults during testing + - gap-package: 'radiroot' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` + - gap-package: 'ringsforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' + - gap-package: 'semigroups' # no jll + - gap-package: 'singular' # `Error, Singular executable file not found!` + - gap-package: 'toricvarieties' # `Error, found no Singular executable in PATH while searching the following list`' + - gap-package: 'typeset' # `ReadPackage could not read /gap/doc.g` + - gap-package: 'wpe' # ??? + - gap-package: 'xgap' # no jll steps: - uses: actions/checkout@v4 From b0b10c2ba5bec3a8a00abdb6e7f4a35be35e6d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 18 Dec 2024 16:54:36 +0100 Subject: [PATCH 09/27] Reduce number of CI action caches --- .github/workflows/CI-distro.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index bcafb7e5..e7047341 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -32,6 +32,8 @@ jobs: version: '1' - name: "Cache artifacts" uses: julia-actions/cache@v2 + with: + include-matrix: false # don't create a cache per GAP package - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: Get list of GAP packages From 648890e92fe687299225e4c3431119166520fb0a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 18 Dec 2024 21:41:49 +0100 Subject: [PATCH 10/27] debugging --- .github/workflows/CI-distro.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index e7047341..4ea4a4c2 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -74,16 +74,16 @@ jobs: - gap-package: 'gradedmodules' # `Error, found no Singular executable in PATH while searching the following list` - gap-package: 'gradedringforhomalg' # `Error, found no Singular executable in PATH while searching the following list` - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - - gap-package: 'guava' # test failure + #- gap-package: 'guava' # test failure - gap-package: 'hap' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - gap-package: 'hapcryst' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - - gap-package: 'io' # test failure + #- gap-package: 'io' # test failure - gap-package: 'itc' # dependency `xgap` has no jll - gap-package: 'jupyterkernel' # no jll - gap-package: 'localizeringforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' - gap-package: 'modulepresentationsforcap' # `Error, found no Singular executable in PATH while searching the following list`' - gap-package: 'normalizinterface' # `Error, Some error in the normaliz input data detected: Cone Property in last line not allowed for lattice ideals` - - gap-package: 'packagemanager' # test failure + #- gap-package: 'packagemanager' # test failure - gap-package: 'polenta' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'polycyclic' # ??? - gap-package: 'polymaking' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` @@ -93,8 +93,8 @@ jobs: - gap-package: 'semigroups' # no jll - gap-package: 'singular' # `Error, Singular executable file not found!` - gap-package: 'toricvarieties' # `Error, found no Singular executable in PATH while searching the following list`' - - gap-package: 'typeset' # `ReadPackage could not read /gap/doc.g` - - gap-package: 'wpe' # ??? + #- gap-package: 'typeset' # `ReadPackage could not read /gap/doc.g` + #- gap-package: 'wpe' # ??? - gap-package: 'xgap' # no jll steps: @@ -111,4 +111,4 @@ jobs: - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" - run: julia --color=yes --project=. -e 'using GAP, Test; @test GAP.Packages.test("${{ matrix.gap-package }}")' + run: JULIA_DEBUG=GAP julia --color=yes --project=. -e 'using GAP, Test; @test GAP.Packages.test("${{ matrix.gap-package }}")' From 123a3a7f9dd33698b86195fd640277da564361e6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 18 Dec 2024 22:57:38 +0100 Subject: [PATCH 11/27] hack --- .github/workflows/CI-distro.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 4ea4a4c2..d6228351 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -111,4 +111,6 @@ jobs: - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" - run: JULIA_DEBUG=GAP julia --color=yes --project=. -e 'using GAP, Test; @test GAP.Packages.test("${{ matrix.gap-package }}")' + run: | + ls -l ~/.julia/scratchspaces/*/binarywrappers_v1.11/bin + JULIA_DEBUG=GAP julia --color=yes --project=. -e 'using GAP, Test; @test GAP.Packages.test("${{ matrix.gap-package }}")' From 82d282da2f1aa6e32920d3579aac021ac5693ddb Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 18 Dec 2024 23:02:34 +0100 Subject: [PATCH 12/27] WIP --- .github/workflows/CI-distro.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index d6228351..57388e44 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -112,5 +112,6 @@ jobs: uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" run: | - ls -l ~/.julia/scratchspaces/*/binarywrappers_v1.11/bin + JULIA_DEBUG=GAP julia --color=yes --project=. -e 'using GAP' # ensure initialization + ls -l /home/runner/.julia/scratchspaces/*/binarywrappers_v1.11/bin JULIA_DEBUG=GAP julia --color=yes --project=. -e 'using GAP, Test; @test GAP.Packages.test("${{ matrix.gap-package }}")' From c1c91df328e552cc06e84fda950fa9a31fbf9f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Wed, 18 Dec 2024 23:35:36 +0100 Subject: [PATCH 13/27] Update .github/workflows/CI-distro.yml Co-authored-by: Benjamin Lorenz --- .github/workflows/CI-distro.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 57388e44..5f36fbd0 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -106,8 +106,6 @@ jobs: arch: ${{ matrix.julia-arch }} - name: "Cache artifacts" uses: julia-actions/cache@v2 - with: - cache-scratchspaces: false - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" From 78573e38cfc38175527ddb880fd9395ead9927f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 19 Dec 2024 11:21:37 +0100 Subject: [PATCH 14/27] Fix typo --- .github/workflows/CI-distro.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 5f36fbd0..12dfce78 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -32,8 +32,6 @@ jobs: version: '1' - name: "Cache artifacts" uses: julia-actions/cache@v2 - with: - include-matrix: false # don't create a cache per GAP package - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: Get list of GAP packages @@ -106,6 +104,8 @@ jobs: arch: ${{ matrix.julia-arch }} - name: "Cache artifacts" uses: julia-actions/cache@v2 + with: + include-matrix: false # don't create a cache per GAP package - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" From 62a0868c23f8f5c36df6b8324d3aa031390b84b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Thu, 19 Dec 2024 19:45:38 +0100 Subject: [PATCH 15/27] Update .github/workflows/CI-distro.yml --- .github/workflows/CI-distro.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 12dfce78..dea0af7b 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -106,6 +106,7 @@ jobs: uses: julia-actions/cache@v2 with: include-matrix: false # don't create a cache per GAP package + cache-scratchspaces: false - name: "Build package" uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" From 91c9597301ae1bd2fb77361ba157338b46383042 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 20 Dec 2024 10:26:58 +0100 Subject: [PATCH 16/27] tweak --- .github/workflows/CI-distro.yml | 30 +++++++++++++++--------------- src/packages.jl | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index dea0af7b..22347795 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -61,36 +61,36 @@ jobs: - ubuntu-latest gap-package: ${{fromJSON(needs.generate-matrix.outputs.gap-packages)}} exclude: - - gap-package: '4ti2interface' # ??? + #- gap-package: '4ti2interface' # ??? - gap-package: 'alnuth' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - - gap-package: 'autodoc' # test failure - - gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` + #- gap-package: 'autodoc' # test failure + #- gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` - gap-package: 'curlinterface' # no jll - gap-package: 'example' # no jll - - gap-package: 'examplesforhomalg' # `Error, found no Singular executable in PATH while searching the following list` - - gap-package: 'gapdoc' # test failure - - gap-package: 'gradedmodules' # `Error, found no Singular executable in PATH while searching the following list` - - gap-package: 'gradedringforhomalg' # `Error, found no Singular executable in PATH while searching the following list` + #- gap-package: 'examplesforhomalg' # `Error, found no Singular executable in PATH while searching the following list` + #- gap-package: 'gapdoc' # test failure + #- gap-package: 'gradedmodules' # `Error, found no Singular executable in PATH while searching the following list` + #- gap-package: 'gradedringforhomalg' # `Error, found no Singular executable in PATH while searching the following list` - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` #- gap-package: 'guava' # test failure - gap-package: 'hap' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - gap-package: 'hapcryst' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` #- gap-package: 'io' # test failure - gap-package: 'itc' # dependency `xgap` has no jll - - gap-package: 'jupyterkernel' # no jll - - gap-package: 'localizeringforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' - - gap-package: 'modulepresentationsforcap' # `Error, found no Singular executable in PATH while searching the following list`' - - gap-package: 'normalizinterface' # `Error, Some error in the normaliz input data detected: Cone Property in last line not allowed for lattice ideals` + #- gap-package: 'jupyterkernel' # no jll + #- gap-package: 'localizeringforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' + #- gap-package: 'modulepresentationsforcap' # `Error, found no Singular executable in PATH while searching the following list`' + #- gap-package: 'normalizinterface' # `Error, Some error in the normaliz input data detected: Cone Property in last line not allowed for lattice ideals` #- gap-package: 'packagemanager' # test failure - gap-package: 'polenta' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'polycyclic' # ??? - gap-package: 'polymaking' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - - gap-package: 'profiling' # segfaults during testing + #- gap-package: 'profiling' # segfaults during testing - gap-package: 'radiroot' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - - gap-package: 'ringsforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' + #- gap-package: 'ringsforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' - gap-package: 'semigroups' # no jll - - gap-package: 'singular' # `Error, Singular executable file not found!` - - gap-package: 'toricvarieties' # `Error, found no Singular executable in PATH while searching the following list`' + #- gap-package: 'singular' # `Error, Singular executable file not found!` + #- gap-package: 'toricvarieties' # `Error, found no Singular executable in PATH while searching the following list`' #- gap-package: 'typeset' # `ReadPackage could not read /gap/doc.g` #- gap-package: 'wpe' # ??? - gap-package: 'xgap' # no jll diff --git a/src/packages.jl b/src/packages.jl index 7bf37828..40d58c10 100644 --- a/src/packages.jl +++ b/src/packages.jl @@ -420,7 +420,7 @@ The function uses [the function `TestPackage`](GAP_ref(ref:TestPackage)). """ function test(name::String) global disable_error_handler - + function with_gap_var(f, name::String, val) gname = GapObj(name) old_value = Globals.ValueGlobal(gname) @@ -453,7 +453,7 @@ function test(name::String) with_gap_var("QUIT_GAP", fake_QuitGap) do with_gap_var("ForceQuitGap", identity) do with_gap_var("FORCE_QUIT_GAP", identity) do - result = Globals.TestPackage(GapObj(name)) + result = Globals.TestPackage(GapObj(name)) end end end From 0ed4d36f60ef95baa02cf022f1c9b9593f2f453c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 20 Dec 2024 16:29:54 +0100 Subject: [PATCH 17/27] Update exclusion list --- .github/workflows/CI-distro.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 22347795..49a0face 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -61,25 +61,19 @@ jobs: - ubuntu-latest gap-package: ${{fromJSON(needs.generate-matrix.outputs.gap-packages)}} exclude: - #- gap-package: '4ti2interface' # ??? - gap-package: 'alnuth' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` #- gap-package: 'autodoc' # test failure #- gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` - gap-package: 'curlinterface' # no jll - gap-package: 'example' # no jll - #- gap-package: 'examplesforhomalg' # `Error, found no Singular executable in PATH while searching the following list` + #- gap-package: 'examplesforhomalg' # `Error, found no GAP executable in PATH` #- gap-package: 'gapdoc' # test failure - #- gap-package: 'gradedmodules' # `Error, found no Singular executable in PATH while searching the following list` - #- gap-package: 'gradedringforhomalg' # `Error, found no Singular executable in PATH while searching the following list` - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - #- gap-package: 'guava' # test failure - gap-package: 'hap' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - gap-package: 'hapcryst' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` #- gap-package: 'io' # test failure - gap-package: 'itc' # dependency `xgap` has no jll - #- gap-package: 'jupyterkernel' # no jll - #- gap-package: 'localizeringforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' - #- gap-package: 'modulepresentationsforcap' # `Error, found no Singular executable in PATH while searching the following list`' + #- gap-package: 'localizeringforhomalg' # `Error, found no GAP executable in PATH` #- gap-package: 'normalizinterface' # `Error, Some error in the normaliz input data detected: Cone Property in last line not allowed for lattice ideals` #- gap-package: 'packagemanager' # test failure - gap-package: 'polenta' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` @@ -87,11 +81,9 @@ jobs: - gap-package: 'polymaking' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` #- gap-package: 'profiling' # segfaults during testing - gap-package: 'radiroot' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - #- gap-package: 'ringsforhomalg' # `Error, found no Singular executable in PATH while searching the following list`' + #- gap-package: 'ringsforhomalg' # `Error, found no GAP executable in PATH` - gap-package: 'semigroups' # no jll - #- gap-package: 'singular' # `Error, Singular executable file not found!` - #- gap-package: 'toricvarieties' # `Error, found no Singular executable in PATH while searching the following list`' - #- gap-package: 'typeset' # `ReadPackage could not read /gap/doc.g` + #- gap-package: 'typeset' # needs `dot2tex` executable #- gap-package: 'wpe' # ??? - gap-package: 'xgap' # no jll From 5587398c955e00f352aa165523909006c545a9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 20 Dec 2024 17:36:00 +0100 Subject: [PATCH 18/27] Apply suggestions from code review Co-authored-by: Max Horn --- .github/workflows/CI-distro.yml | 8 ++++---- src/packages.jl | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 49a0face..4645d21b 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -63,7 +63,7 @@ jobs: exclude: - gap-package: 'alnuth' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` #- gap-package: 'autodoc' # test failure - #- gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` + - gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` - gap-package: 'curlinterface' # no jll - gap-package: 'example' # no jll #- gap-package: 'examplesforhomalg' # `Error, found no GAP executable in PATH` @@ -71,13 +71,13 @@ jobs: - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'hap' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - gap-package: 'hapcryst' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - #- gap-package: 'io' # test failure + - gap-package: 'io' # segfaults, most likely due to child process handling - gap-package: 'itc' # dependency `xgap` has no jll #- gap-package: 'localizeringforhomalg' # `Error, found no GAP executable in PATH` - #- gap-package: 'normalizinterface' # `Error, Some error in the normaliz input data detected: Cone Property in last line not allowed for lattice ideals` + - gap-package: 'normalizinterface' # Tests fail: NormalizInterface currently bundles Normaliz 3.9.3 and its test suite is tuned to that, but our JLL builds it against normaliz_jll which has 3.10.2 #- gap-package: 'packagemanager' # test failure - gap-package: 'polenta' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - - gap-package: 'polycyclic' # ??? + - gap-package: 'polycyclic' # test suite currently broken and also disabled by GAP package distribution - gap-package: 'polymaking' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` #- gap-package: 'profiling' # segfaults during testing - gap-package: 'radiroot' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` diff --git a/src/packages.jl b/src/packages.jl index 40d58c10..192da45a 100644 --- a/src/packages.jl +++ b/src/packages.jl @@ -451,8 +451,8 @@ function test(name::String) with_gap_var("ERROR_OUTPUT", Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do with_gap_var("QuitGap", fake_QuitGap) do with_gap_var("QUIT_GAP", fake_QuitGap) do - with_gap_var("ForceQuitGap", identity) do - with_gap_var("FORCE_QUIT_GAP", identity) do + with_gap_var("ForceQuitGap", fake_QuitGap) do + with_gap_var("FORCE_QUIT_GAP", fake_QuitGap) do result = Globals.TestPackage(GapObj(name)) end end From e16e5c93ba95dbb2340f552ef36d170df28753c6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 20 Dec 2024 19:48:02 +0100 Subject: [PATCH 19/27] tweak --- .github/workflows/CI-distro.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 4645d21b..fdc9ab2a 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -66,22 +66,22 @@ jobs: - gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` - gap-package: 'curlinterface' # no jll - gap-package: 'example' # no jll - #- gap-package: 'examplesforhomalg' # `Error, found no GAP executable in PATH` + - gap-package: 'examplesforhomalg' # `Error, found no GAP executable in PATH` #- gap-package: 'gapdoc' # test failure - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'hap' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - gap-package: 'hapcryst' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - gap-package: 'io' # segfaults, most likely due to child process handling - gap-package: 'itc' # dependency `xgap` has no jll - #- gap-package: 'localizeringforhomalg' # `Error, found no GAP executable in PATH` + - gap-package: 'localizeringforhomalg' # `Error, found no GAP executable in PATH` - gap-package: 'normalizinterface' # Tests fail: NormalizInterface currently bundles Normaliz 3.9.3 and its test suite is tuned to that, but our JLL builds it against normaliz_jll which has 3.10.2 #- gap-package: 'packagemanager' # test failure - gap-package: 'polenta' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'polycyclic' # test suite currently broken and also disabled by GAP package distribution - gap-package: 'polymaking' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - #- gap-package: 'profiling' # segfaults during testing + - gap-package: 'profiling' # segfaults during testing - gap-package: 'radiroot' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - #- gap-package: 'ringsforhomalg' # `Error, found no GAP executable in PATH` + - gap-package: 'ringsforhomalg' # `Error, found no GAP executable in PATH` - gap-package: 'semigroups' # no jll #- gap-package: 'typeset' # needs `dot2tex` executable #- gap-package: 'wpe' # ??? @@ -89,6 +89,8 @@ jobs: steps: - uses: actions/checkout@v4 + - name: "Install extra dependencies" + run: sudo apt-get install --no-install-recommends texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended - name: "Set up Julia" uses: julia-actions/setup-julia@v2 with: From 3c30ef1bd701db0101650d8027e222cafdd5d3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Sat, 21 Dec 2024 16:40:10 +0100 Subject: [PATCH 20/27] Work around packages calling `QuitGap` multiple times --- src/packages.jl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/packages.jl b/src/packages.jl index 868a508e..3d0a3403 100644 --- a/src/packages.jl +++ b/src/packages.jl @@ -482,12 +482,14 @@ function test(name::String) end error_occurred = false - ended_using_QuitGap = false + called_QuitGap = false function fake_QuitGap(code) + called_QuitGap && return # only do something on the first call + called_QuitGap = true if code != 0 error_occurred = true end - ended_using_QuitGap = true + return end disable_error_handler[] = true @@ -510,7 +512,8 @@ function test(name::String) # Due to the hack above, we run into an error in TestPackage that is usually unreachable. # In the case of a `QuitGap` call, we thus don't check for `result == true`. - return !error_occurred && (ended_using_QuitGap || result == true) + # Note: `result` may be `fail`, so it is not always booleany. + return !error_occurred && (called_QuitGap || result == true) end """ From e7f7acf3ed9b4bea613afbf421c2265b370f4244 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Sat, 21 Dec 2024 21:49:48 +0100 Subject: [PATCH 21/27] Apply suggestions from code review Co-authored-by: Max Horn --- .github/workflows/CI-distro.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index fdc9ab2a..66b4204a 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -67,7 +67,6 @@ jobs: - gap-package: 'curlinterface' # no jll - gap-package: 'example' # no jll - gap-package: 'examplesforhomalg' # `Error, found no GAP executable in PATH` - #- gap-package: 'gapdoc' # test failure - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'hap' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - gap-package: 'hapcryst' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` @@ -75,7 +74,7 @@ jobs: - gap-package: 'itc' # dependency `xgap` has no jll - gap-package: 'localizeringforhomalg' # `Error, found no GAP executable in PATH` - gap-package: 'normalizinterface' # Tests fail: NormalizInterface currently bundles Normaliz 3.9.3 and its test suite is tuned to that, but our JLL builds it against normaliz_jll which has 3.10.2 - #- gap-package: 'packagemanager' # test failure + - gap-package: 'packagemanager' # tests need curlInterface to passe, reactivate once we have a working JLL for that - gap-package: 'polenta' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'polycyclic' # test suite currently broken and also disabled by GAP package distribution - gap-package: 'polymaking' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` @@ -84,13 +83,12 @@ jobs: - gap-package: 'ringsforhomalg' # `Error, found no GAP executable in PATH` - gap-package: 'semigroups' # no jll #- gap-package: 'typeset' # needs `dot2tex` executable - #- gap-package: 'wpe' # ??? - gap-package: 'xgap' # no jll steps: - uses: actions/checkout@v4 - name: "Install extra dependencies" - run: sudo apt-get install --no-install-recommends texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended + run: sudo apt-get install --no-install-recommends texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dot2tex - name: "Set up Julia" uses: julia-actions/setup-julia@v2 with: @@ -105,6 +103,4 @@ jobs: uses: julia-actions/julia-buildpkg@v1 - name: "Run GAP package tests" run: | - JULIA_DEBUG=GAP julia --color=yes --project=. -e 'using GAP' # ensure initialization - ls -l /home/runner/.julia/scratchspaces/*/binarywrappers_v1.11/bin - JULIA_DEBUG=GAP julia --color=yes --project=. -e 'using GAP, Test; @test GAP.Packages.test("${{ matrix.gap-package }}")' + julia --color=yes --project=. -e 'using GAP, Test; @test GAP.Packages.test("${{ matrix.gap-package }}")' From 4e448e961db927da1d3ba74f18bedc6ad1fd6e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Mon, 23 Dec 2024 12:54:15 +0100 Subject: [PATCH 22/27] Apply suggestions from code review Co-authored-by: Max Horn --- .github/workflows/CI-distro.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 66b4204a..7aae904c 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -62,9 +62,9 @@ jobs: gap-package: ${{fromJSON(needs.generate-matrix.outputs.gap-packages)}} exclude: - gap-package: 'alnuth' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - #- gap-package: 'autodoc' # test failure - - gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` - - gap-package: 'curlinterface' # no jll + - gap-package: 'autodoc' # tries and fails to build its own documentation, inside the (partially write protected) artifacts dir + # - gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` + # - gap-package: 'curlinterface' # no jll - gap-package: 'example' # no jll - gap-package: 'examplesforhomalg' # `Error, found no GAP executable in PATH` - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` @@ -82,7 +82,6 @@ jobs: - gap-package: 'radiroot' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'ringsforhomalg' # `Error, found no GAP executable in PATH` - gap-package: 'semigroups' # no jll - #- gap-package: 'typeset' # needs `dot2tex` executable - gap-package: 'xgap' # no jll steps: From e3e5907e5900f8347cc3ccf79a30725b8552e060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Mon, 23 Dec 2024 14:21:45 +0100 Subject: [PATCH 23/27] Apply suggestions from code review --- .github/workflows/CI-distro.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 7aae904c..4f93fbe8 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -63,8 +63,6 @@ jobs: exclude: - gap-package: 'alnuth' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'autodoc' # tries and fails to build its own documentation, inside the (partially write protected) artifacts dir - # - gap-package: 'caratinterface' # `Carat program Bravais_inclusions failed with error code 1` - # - gap-package: 'curlinterface' # no jll - gap-package: 'example' # no jll - gap-package: 'examplesforhomalg' # `Error, found no GAP executable in PATH` - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` From eed4903663baf1d4521c2b26719f671efac917e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Mon, 6 Jan 2025 14:19:15 +0100 Subject: [PATCH 24/27] Disable `help` tests --- .github/workflows/CI-distro.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index 4f93fbe8..a8cd0f54 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -68,6 +68,7 @@ jobs: - gap-package: 'guarana' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` - gap-package: 'hap' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` - gap-package: 'hapcryst' # `polymake command not found. Please set POLYMAKE_COMMAND by hand` + - gap-package: 'help' # test failure in HeLP-4.0/tst/yes_4ti2.tst:39 - gap-package: 'io' # segfaults, most likely due to child process handling - gap-package: 'itc' # dependency `xgap` has no jll - gap-package: 'localizeringforhomalg' # `Error, found no GAP executable in PATH` From 8f489e1fabe59dcea155a61e1a4f44b4c31aadc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Mon, 6 Jan 2025 14:45:04 +0100 Subject: [PATCH 25/27] Disable `atlasrep` tests --- .github/workflows/CI-distro.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI-distro.yml b/.github/workflows/CI-distro.yml index a8cd0f54..309b4aed 100644 --- a/.github/workflows/CI-distro.yml +++ b/.github/workflows/CI-distro.yml @@ -62,6 +62,7 @@ jobs: gap-package: ${{fromJSON(needs.generate-matrix.outputs.gap-packages)}} exclude: - gap-package: 'alnuth' # `AL_EXECUTABLE, the executable for PARI/GP, has to be set` + - gap-package: 'atlasrep' # random segfaults during testing - gap-package: 'autodoc' # tries and fails to build its own documentation, inside the (partially write protected) artifacts dir - gap-package: 'example' # no jll - gap-package: 'examplesforhomalg' # `Error, found no GAP executable in PATH` From b92955a121f2d87e670a6cd9e8b20b7b990bf4bd Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 6 Jan 2025 23:33:30 +0100 Subject: [PATCH 26/27] Apply suggestions from code review --- src/packages.jl | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/packages.jl b/src/packages.jl index 3d0a3403..c59df7e0 100644 --- a/src/packages.jl +++ b/src/packages.jl @@ -456,12 +456,12 @@ end """ test(name::String) -Return a boolean indicating if the GAP package with name `name` succeeds -in running its tests. +Run the tests of GAP package `name` and return a boolean indicating whether +they succeeded (`true`) or not. -It is inteded to be used with the `@test` macro from the `Test` package. +It is intended to be used with the `@test` macro from the `Test` package. -The function uses [the function `TestPackage`](GAP_ref(ref:TestPackage)). +The function uses [the GAP function `TestPackage`](GAP_ref(ref:TestPackage)). """ function test(name::String) global disable_error_handler @@ -469,15 +469,11 @@ function test(name::String) function with_gap_var(f, name::String, val) gname = GapObj(name) old_value = Globals.ValueGlobal(gname) - Globals.MakeReadWriteGlobal(gname) - Globals.UnbindGlobal(gname) - Globals.BindGlobal(gname, val) + replace_global!(gname, val) try f() finally - Globals.MakeReadWriteGlobal(gname); - Globals.UnbindGlobal(gname); - Globals.BindGlobal(gname, old_value); + replace_global!(gname, old_value) end end From b38232f5646829c1dd095d02514a0630f0a20cc2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 6 Jan 2025 23:40:05 +0100 Subject: [PATCH 27/27] Apply suggestions from code review --- src/packages.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/packages.jl b/src/packages.jl index c59df7e0..7b803ceb 100644 --- a/src/packages.jl +++ b/src/packages.jl @@ -466,14 +466,14 @@ The function uses [the GAP function `TestPackage`](GAP_ref(ref:TestPackage)). function test(name::String) global disable_error_handler - function with_gap_var(f, name::String, val) + function with_gap_var(f, name::Symbol, val) gname = GapObj(name) old_value = Globals.ValueGlobal(gname) - replace_global!(gname, val) + replace_global!(name, val) try f() finally - replace_global!(gname, old_value) + replace_global!(name, old_value) end end @@ -491,11 +491,11 @@ function test(name::String) disable_error_handler[] = true result = false try - with_gap_var("ERROR_OUTPUT", Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do - with_gap_var("QuitGap", fake_QuitGap) do - with_gap_var("QUIT_GAP", fake_QuitGap) do - with_gap_var("ForceQuitGap", fake_QuitGap) do - with_gap_var("FORCE_QUIT_GAP", fake_QuitGap) do + with_gap_var(:ERROR_OUTPUT, Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do + with_gap_var(:QuitGap, fake_QuitGap) do + with_gap_var(:QUIT_GAP, fake_QuitGap) do + with_gap_var(:ForceQuitGap, fake_QuitGap) do + with_gap_var(:FORCE_QUIT_GAP, fake_QuitGap) do result = Globals.TestPackage(GapObj(name)) end end