diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6dc6439f..eda02603 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,10 +81,6 @@ jobs: uses: julia-actions/julia-processcoverage@v1 - name: "Process GAP code coverage" run: | - julia --color=yes --project=. -e ' - using GAP - GAP.Packages.install("profiling", interactive = false) || exit(1) - ' /tmp/gap.sh -A --quitonbreak --norepl etc/gather_coverage.g cat gap-lcov.info >> lcov.info diff --git a/CHANGES.md b/CHANGES.md index 5af20261..ebb77f00 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,8 @@ effectively pass `-A` to GAP when loading it) - Instead of downloading a single huge "artifact" containing all deposited GAP packages, we now use (and download) one artifact per GAP package. +- Use precompiled binaries for many GAP packages, such as `io`, `ferret` + and many more ## Version 0.12.1 (released 2024-12-09) diff --git a/Project.toml b/Project.toml index c7f9efd8..60e22afe 100644 --- a/Project.toml +++ b/Project.toml @@ -6,11 +6,33 @@ version = "0.13.0-DEV" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +BinaryWrappers = "f01c122e-0ea1-4f85-ad8f-907073ad7a9f" Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" GAP_jll = "5cd7a574-2c56-5be2-91dc-c8bc375b9ddf" GAP_lib_jll = "de1ad85e-c930-5cd4-919d-ccd3fcafd1a3" +GAP_pkg_ace_jll = "6e11effc-327b-571d-98e3-e12b1d1e7421" +GAP_pkg_anupq_jll = "995f5adf-d221-5ddc-a873-ce518b8081c9" +GAP_pkg_browse_jll = "6e540885-1cbc-538c-85e7-b800ca60d645" +GAP_pkg_cddinterface_jll = "edf6cd94-1a94-567d-837e-37d1f3b87eed" +GAP_pkg_crypting_jll = "3b5f52f3-99b5-593a-81cd-d6cf4b425c55" +GAP_pkg_cvec_jll = "03de9d45-54dd-5e36-9810-6ca1d577e6b3" +GAP_pkg_datastructures_jll = "66bcec33-4fa3-551a-b2da-ca256b6829d9" +GAP_pkg_deepthought_jll = "27af9300-c9da-50fb-ba64-a6b0776a3078" +GAP_pkg_digraphs_jll = "ce5c30f6-a98c-53bc-b643-089f5717f8db" +GAP_pkg_edim_jll = "aa0ab9cb-918b-5ca1-812e-3cecb1c413b6" +GAP_pkg_ferret_jll = "d6652ff9-bdf9-5f19-9e6f-c10727807222" +GAP_pkg_float_jll = "b73cfdca-4c14-50a3-9408-5dcda5b8fad2" +GAP_pkg_fplsa_jll = "f51f7fb6-0f19-5db2-8aaf-495cce673bcb" +GAP_pkg_gauss_jll = "296a3c51-2614-5f89-afa9-2c5cd84b74d9" +GAP_pkg_guava_jll = "70456840-cd51-5d76-a902-d128bd76a730" +GAP_pkg_io_jll = "19a9678b-966c-568e-9f2e-41ceac70c829" +GAP_pkg_json_jll = "b348cf08-4407-5d37-b307-1564396f8b07" GAP_pkg_juliainterface_jll = "ba154793-3a7d-51ee-8800-e295b0cf7374" +GAP_pkg_normalizinterface_jll = "74f4ad05-5f81-5a78-8197-4e83b84c9c17" +GAP_pkg_nq_jll = "00bf61e5-c0f9-5a3f-ba8b-68a621695b53" +GAP_pkg_orb_jll = "b689cd95-dcfd-544e-a174-ce2fd787c795" +GAP_pkg_simpcomp_jll = "1c659ad8-f6e2-554d-814b-22ddd907b91c" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" @@ -26,11 +48,33 @@ TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" [compat] AbstractAlgebra = "0.41.11, 0.42.1, 0.43" Artifacts = "1.6" +BinaryWrappers = "0.1.3" Compat = "4.4.0" Downloads = "1.4.3" GAP_jll = "~400.1400.000" GAP_lib_jll = "~400.1400.000" +GAP_pkg_ace_jll = "500.600.200" +GAP_pkg_anupq_jll = "300.300.100" +GAP_pkg_browse_jll = "100.800.2101" +GAP_pkg_cddinterface_jll = "202400.900.200" +GAP_pkg_crypting_jll = "0.1000.500" +GAP_pkg_cvec_jll = "200.800.200" +GAP_pkg_datastructures_jll = "0.300.100" +GAP_pkg_deepthought_jll = "100.0.700" +GAP_pkg_digraphs_jll = "100.900.0" +GAP_pkg_edim_jll = "100.300.801" +GAP_pkg_ferret_jll = "100.0.1400" +GAP_pkg_float_jll = "100.0.500" +GAP_pkg_fplsa_jll = "100.200.600" +GAP_pkg_gauss_jll = "202400.1100.100" +GAP_pkg_guava_jll = "300.1900.0" +GAP_pkg_io_jll = "400.900.100" +GAP_pkg_json_jll = "200.200.200" GAP_pkg_juliainterface_jll = "=0.1300.0" +GAP_pkg_normalizinterface_jll = "100.300.700" +GAP_pkg_nq_jll = "200.500.1100" +GAP_pkg_orb_jll = "400.900.100" +GAP_pkg_simpcomp_jll = "200.100.1400" InteractiveUtils = "1.6" Libdl = "1.6" MacroTools = "0.5.13" diff --git a/src/GAP.jl b/src/GAP.jl index 31a0cdcd..c2e94cc9 100644 --- a/src/GAP.jl +++ b/src/GAP.jl @@ -222,6 +222,9 @@ function initialize(argv::Vector{String}) # Redirect error messages, in order not to print them to the screen. GAP.Globals.Read(GapObj(joinpath(@__DIR__, "..", "gap", "err.g"))) + # set up a few package JLLs + setup_gap_pkg_overrides() + return nothing end @@ -332,4 +335,6 @@ include("prompt.jl") include("exec.jl") include("doctestfilters.jl") +include("GAP_pkg.jl") + end diff --git a/src/GAP_pkg.jl b/src/GAP_pkg.jl new file mode 100644 index 00000000..54364367 --- /dev/null +++ b/src/GAP_pkg.jl @@ -0,0 +1,49 @@ +using BinaryWrappers + +const pkg_bindirs = Dict{Symbol, String}() + +for pkg in [ + :ace, + :anupq, + :browse, + :cddinterface, + :crypting, + :cvec, + :datastructures, + :deepthought, + :digraphs, + :edim, + :ferret, + :float, + :fplsa, + :gauss, + :guava, + :io, + :json, + :normalizinterface, + :nq, + :orb, + :simpcomp, + ] + jll = Symbol("GAP_pkg_$(pkg)_jll") + @eval begin + using $jll + # Crude heuristic: if the JLL has a `bin` directory then we assume it + # contains executables the packages uses; otherwise assume it contains + # a kernel extension `lib/gap/BLAH.so`. + # + # This fails if a package has both executables and a kernel extension. + pkg_bindirs[Symbol($(string(pkg)))] = + if isdir(joinpath($jll.find_artifact_dir(), "bin")) + @generate_wrappers($jll) + else + joinpath($jll.find_artifact_dir(), "lib", "gap") + end + end +end + +function setup_gap_pkg_overrides() + for (pkg, dir) in pkg_bindirs + setproperty!(GAP.Globals.DirectoriesPackageProgramsOverrides, pkg, GapObj(dir)) + end +end