-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CI job against GAP master #995
Changes from 17 commits
9b7bec4
8e25c7a
be70ccb
8aef207
7c95b1d
8d484ab
2b0fdfc
84a46d6
2a85cbe
d3b566a
c5d751c
fad961c
db25a37
c6b3314
4c85966
5a3b2bc
d61e12a
f9756a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: CI with GAP | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'release-*' | ||
tags: '*' | ||
pull_request: | ||
|
||
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: Julia ${{ matrix.julia-version }} - GAP ${{ matrix.gap-version }} - ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 20 | ||
continue-on-error: ${{ matrix.julia-version == 'nightly' }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
gap-version: | ||
- 'master' | ||
- 'stable-4.13' | ||
julia-version: | ||
- '1.6' | ||
- '1' # latest stable release | ||
- 'nightly' | ||
os: | ||
- ubuntu-latest | ||
include: | ||
# Add a few macOS jobs (the number we can run in parallel is limited) | ||
- gap-version: 'master' | ||
julia-version: '1' | ||
os: macOS-latest | ||
- gap-version: 'stable-4.13' | ||
julia-version: '1' | ||
os: macOS-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: "Set up Julia" | ||
uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
- name: Checkout GAP | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'gap-system/gap' | ||
ref: ${{ matrix.gap-version }} | ||
path: 'GAPROOT' | ||
- name: "Install dependencies (for macOS)" | ||
if: runner.os == 'macOS' | ||
run: | | ||
brew install autoconf zlib # gmp pkg-config | ||
- name: "Build GAP" | ||
run: | | ||
mv GAPROOT /tmp/GAPROOT | ||
cd /tmp/GAPROOT | ||
./autogen.sh | ||
./configure | ||
make -j`nproc` | ||
- name: "Override bundled GAP" | ||
run: | | ||
julia --proj=override etc/setup_override_dir.jl /tmp/GAPROOT /tmp/gap_jll_override | ||
- name: "Run tests" | ||
run: | | ||
julia --proj=override etc/run_with_override.jl /tmp/gap_jll_override --depwarn=error -e "using Pkg; Pkg.test(\"GAP\")" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,21 +12,23 @@ gapoverride = abspath(gapoverride) | |
# | ||
@info "Install needed packages" | ||
using Pkg | ||
Pkg.add(["GAP_jll"]) | ||
Pkg.add(["GAP_lib_jll"]) | ||
Pkg.develop(path=dirname(dirname(@__FILE__))) | ||
Pkg.add(["GAP_jll", "GAP_lib_jll"]) | ||
Pkg.instantiate() | ||
|
||
import GAP_lib_jll | ||
|
||
# | ||
# | ||
# | ||
function add_jll_override(depot, pkgname, newdir) | ||
function add_jll_override(depot, pkgname, pkguuid, newdir) | ||
pkgid = Base.identify_package("$(pkgname)_jll") | ||
uuid = string(pkgid.uuid) | ||
# does not work with julia 1.12-dev | ||
fingolfin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# pkguuid = string(pkgid.uuid) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This threw some (seemingly random) segfaults with nightly. But only if running from the console, not if copying everything to the reply. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just tried with Julia master and when running this code I actually got
which would suggest There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you print the pkgid, this succeeds (and prints something non-trivial), but i then get a segfault instead of a LoadError when accessing pkgid.uuid There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed: printing the pkgid = Base.identify_package("GAP_jll"); pkgid.uuid Perhaps we should open an issue? Anyway, so I inserted the
which makes no sense, as we run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for reporting it upstream, it seems we've hit an IMHO rather serious looking code generation bug in Julia. For now we can keep this workaround, but let's remove it again when they fix their bug. |
||
mkpath(joinpath(depot, "artifacts")) | ||
open(joinpath(depot, "artifacts", "Overrides.toml"), "a") do f | ||
write(f, """ | ||
[$(uuid)] | ||
[$(pkguuid)] | ||
$(pkgname) = "$(newdir)" | ||
""") | ||
end | ||
|
@@ -40,8 +42,11 @@ tmpdepot = mktempdir(; cleanup=true) | |
@info "Created temporary depot at $(tmpdepot)" | ||
|
||
# create override file for GAP_jll | ||
add_jll_override(tmpdepot, "GAP", gapoverride) | ||
add_jll_override(tmpdepot, "GAP_lib", gapoverride) | ||
add_jll_override(tmpdepot, "GAP", "5cd7a574-2c56-5be2-91dc-c8bc375b9ddf", gapoverride) | ||
add_jll_override(tmpdepot, "GAP_lib", "de1ad85e-c930-5cd4-919d-ccd3fcafd1a3", gapoverride) | ||
|
||
# HACK: use the documentation from GAP_lib_jll instead of rebuilding it | ||
run(`ln -sf $(abspath(GAP_lib_jll.find_artifact_dir(), "share", "gap", "doc")) $(abspath(gapoverride, "share", "gap", "doc"))`) | ||
fingolfin marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# prepend our temporary depot to the depot list... | ||
withenv("JULIA_DEPOT_PATH"=>tmpdepot*":", "FORCE_JULIAINTERFACE_COMPILATION" => "true") do | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changed order of additions makes a little bit faster to precompile