Skip to content

Commit 041c88c

Browse files
committed
.github/workflows/ci-passagemath-macaulay2.yml: New
1 parent 00b89ec commit 041c88c

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Test integration with passagemath-macaulay2
2+
##
3+
## This GitHub Actions workflow uses the portability testing framework
4+
## of passagemath (https://github.com/passagemath).
5+
##
6+
## - Documentation: https://doc.sagemath.org/html/en/developer/portability_testing.html
7+
##
8+
## - Deployment of ci-sage.yml in upstream projects is tracked at
9+
## https://github.com/passagemath/passagemath/issues/704
10+
##
11+
## - Contact: @passagemath/ci team on GitHub
12+
##
13+
## This GitHub Actions workflow provides:
14+
##
15+
## - continuous integration, by building and testing other software
16+
## that depends on this project.
17+
##
18+
## It runs on every push of a tag to the GitHub repository
19+
## and can also be invoked manually ("workflow_dispatch").
20+
##
21+
## The testing can be monitored in the "Actions" tab of the GitHub repository.
22+
##
23+
## After all jobs have finished (or are canceled) and a short delay,
24+
## tar files of all logs are made available as "build artifacts".
25+
##
26+
## The workflow consists of two jobs:
27+
##
28+
## - First, it builds a source distribution of the project
29+
## and generates a script "update-pkgs.sh". It uploads them
30+
## as a build artifact named upstream.
31+
##
32+
## - Second, it checks out a copy of the SageMath source tree.
33+
## It downloads the upstream artifact and replaces the project's
34+
## package in the SageMath distribution by the newly packaged one
35+
## from the upstream artifact, by running the script "update-pkgs.sh".
36+
## Then it builds a small portion of the Sage distribution.
37+
##
38+
## Many copies of the second step are run in parallel for each of the tested
39+
## systems/configurations.
40+
41+
on:
42+
push:
43+
tags:
44+
- '*'
45+
workflow_dispatch:
46+
# Allow to run manually
47+
48+
concurrency:
49+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
50+
cancel-in-progress: true
51+
52+
env:
53+
# Ubuntu packages to install so that the project's "make dist" can succeed
54+
DIST_PREREQ: git
55+
# Name of this project in the Sage distribution
56+
SPKG: macaulay2
57+
REMOVE_PATCHES: "*"
58+
59+
jobs:
60+
61+
dist:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Check out ${{ env.SPKG }}
65+
uses: actions/checkout@v4
66+
with:
67+
path: build/pkgs/${{ env.SPKG }}/src
68+
- name: Install prerequisites
69+
run: |
70+
sudo DEBIAN_FRONTEND=noninteractive apt-get update
71+
sudo DEBIAN_FRONTEND=noninteractive apt-get install $DIST_PREREQ
72+
73+
- name: Run make dist, prepare upstream artifact
74+
run: |
75+
(cd build/pkgs/${{ env.SPKG }}/src && git archive --format=tar.gz --prefix=${{ env.SPKG }}-git/ HEAD > ${{ env.SPKG }}-git.tar.gz) \
76+
&& mkdir -p upstream && cp build/pkgs/${{ env.SPKG }}/src/*.tar.gz upstream/${{ env.SPKG }}-git.tar.gz \
77+
&& echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=optional" > upstream/update-pkgs.sh \
78+
&& if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \
79+
&& ls -l upstream/
80+
- uses: actions/upload-artifact@v4
81+
with:
82+
path: upstream
83+
name: upstream
84+
85+
passagemath-macaulay2:
86+
uses: passagemath/passagemath/.github/workflows/docker.yml@main
87+
with:
88+
extra_sage_packages: gdbm git libxml2 gfortran cmake python3 openblas zlib readline sqlite libpng bzip2 liblzma libffi openssl 4ti2 fflas_ffpack boost_cropped cddlib givaro glpk gmp mpc mpfi mpfr ncurses ntl readline singular lrslib normaliz topcom gfan frobby nauty libnauty flint onetbb googletest mpsolve msolve eigen gc ninja_build curl
89+
targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="sagemath_macaulay2" sagemath_macaulay2
90+
# Standard setting: Test the current HEAD of passagemath:
91+
sage_repo: passagemath/passagemath
92+
sage_ref: main
93+
upstream_artifact: upstream
94+
# Build incrementally from published Docker image
95+
free_disk_space: true
96+
docker_targets: "with-targets"
97+
tox_system_factors: >-
98+
["ubuntu-noble-macaulay2_daily"]
99+
tox_packages_factors: >-
100+
["minimal"]
101+
# avoid clash with linux job for the same platform
102+
logs_artifact: false
103+
needs: [dist]

0 commit comments

Comments
 (0)