From f5bad2ae282854f368bfc9a8671ec6247c83eff2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Nov 2022 12:42:25 -0800 Subject: [PATCH 01/10] .github/workflows/ci-sage.yml: New --- .github/workflows/ci-sage.yml | 105 ++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .github/workflows/ci-sage.yml diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml new file mode 100644 index 000000000..2bad08691 --- /dev/null +++ b/.github/workflows/ci-sage.yml @@ -0,0 +1,105 @@ +name: Run Sage CI for Linux + +## This GitHub Actions workflow provides: +## +## - portability testing, by building and testing this project on many platforms +## (Linux variants) +## +## - continuous integration, by building and testing other software +## that depends on this project. +## +## It runs on every push to the GitHub repository. +## +## The testing can be monitored in the "Actions" tab of the GitHub repository. +## +## After all jobs have finished (or are canceled) and a short delay, +## tar files of all logs are made available as "build artifacts". +## +## This GitHub Actions workflow uses the portability testing framework +## of SageMath (https://www.sagemath.org/). For more information, see +## https://doc.sagemath.org/html/en/developer/portability_testing.html + +## The workflow consists of two jobs: +## +## - First, it builds a source distribution of the project +## and generates a script "update-pkgs.sh". It uploads them +## as a build artifact named upstream. +## +## - Second, it checks out a copy of the SageMath source tree. +## It downloads the upstream artifact and replaces the project's +## package in the SageMath distribution by the newly packaged one +## from the upstream artifact, by running the script "update-pkgs.sh". +## Then it builds a small portion of the Sage distribution. +## +## Many copies of the second step are run in parallel for each of the tested +## systems/configurations. + +on: + pull_request: + push: + tags: + branches: + - master + workflow_dispatch: + # Allow to run manually + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + # Ubuntu packages to install so that the project can build an sdist + DIST_PREREQ: python3-pip + # Name of this project in the Sage distribution + SPKG: pyscipopt + ## REMOVE_PATCHES: "*" + +jobs: + + dist: + runs-on: ubuntu-latest + steps: + - name: Check out ${{ env.SPKG }} + uses: actions/checkout@v2 + with: + path: build/pkgs/${{ env.SPKG }}/src + - name: Install prerequisites + run: | + sudo DEBIAN_FRONTEND=noninteractive apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install $DIST_PREREQ + python3 -m pip install --user build + - name: Run make dist, prepare upstream artifact + run: | + (cd build/pkgs/${{ env.SPKG }}/src && python3 -m build --sdist .) \ + && mkdir -p upstream && cp build/pkgs/${{ env.SPKG }}/src/dist/*.tar.gz upstream/${{ env.SPKG }}-git.tar.gz \ + && echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \ + && if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \ + && echo "sed -i.bak \"/pushdef.*LT_VERSION/s/3[0-9.]*/4/\" ../build/pkgs/python3/spkg-configure.m4" >> upstream/update-pkgs.sh \ + && echo "sed -i.bak \"/export.*proxy/d\" ../build/bin/sage-spkg" >> upstream/update-pkgs.sh \ + && ls -l upstream/ + - uses: actions/upload-artifact@v2 + with: + path: upstream + name: upstream + + linux: + # https://github.com/sagemath/sage/blob/develop/.github/workflows/docker.yml + # Use branch u/mkoeppe/numpy_1_23_x__scipy_1_9_x for a fix for uppercase github repo names (FFY00) + uses: sagemath/sagetrac-mirror/.github/workflows/docker.yml@u/mkoeppe/numpy_1_23_x__scipy_1_9_x + with: + # Sage distribution packages to build + targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="soplex,scipoptsuite,pyscipopt" pyscipopt + # Standard setting: Test the current beta release of Sage: + sage_repo: sagemath/sage + sage_ref: develop + upstream_artifact: upstream + sage_trac_git: https://github.com/sagemath/sagetrac-mirror.git + # Temporarily test on the branch from sage ticket https://trac.sagemath.org/ticket/21003 (pyscipopt) + # (this is a no-op after that ticket is merged) + sage_trac_ticket: 21003 + # Docker targets (stages) to tag + docker_targets: "with-targets" + # We prefix the image name with the SPKG name ("pyscipopt-") to avoid the error + # 'Package "sage-docker-..." is already associated with another repository.' + docker_push_repository: ghcr.io/${{ github.repository }}/pyscipopt + needs: [dist] From 3c8f009e7cfe8ed0209ef8d4550d5912764a7ba9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Nov 2022 12:31:30 -0800 Subject: [PATCH 02/10] .github/workflows/ci-sage.yml: Use Sage CI from develop branch --- .github/workflows/ci-sage.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 2bad08691..e87b767f6 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -84,8 +84,7 @@ jobs: linux: # https://github.com/sagemath/sage/blob/develop/.github/workflows/docker.yml - # Use branch u/mkoeppe/numpy_1_23_x__scipy_1_9_x for a fix for uppercase github repo names (FFY00) - uses: sagemath/sagetrac-mirror/.github/workflows/docker.yml@u/mkoeppe/numpy_1_23_x__scipy_1_9_x + uses: sagemath/sagetrac-mirror/.github/workflows/docker.yml@develop with: # Sage distribution packages to build targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="soplex,scipoptsuite,pyscipopt" pyscipopt From 7ebf7221d5804d09f663ae660c9685426e655397 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Nov 2022 16:52:18 -0800 Subject: [PATCH 03/10] .github/workflows/ci-sage.yml: Make system cmake, onetbb available --- .github/workflows/ci-sage.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index e87b767f6..f7e7f585b 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -86,6 +86,10 @@ jobs: # https://github.com/sagemath/sage/blob/develop/.github/workflows/docker.yml uses: sagemath/sagetrac-mirror/.github/workflows/docker.yml@develop with: + # Extra system packages to install. See available packages at + # https://github.com/sagemath/sage/tree/develop/build/pkgs + # liblzma, bzip2, and libffi are python3 dependencies. + extra_sage_packages: "patch cmake liblzma bzip2 libffi python3 onetbb" # Sage distribution packages to build targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="soplex,scipoptsuite,pyscipopt" pyscipopt # Standard setting: Test the current beta release of Sage: From d5876fc9a3a0aab9e94fc2a6491b140faf6349bd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 18 Feb 2023 15:31:28 -0800 Subject: [PATCH 04/10] .github/workflows/ci-sage.yml: Update after Trac -> GitHub migration --- .github/workflows/ci-sage.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index f7e7f585b..f8126b5de 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -84,7 +84,7 @@ jobs: linux: # https://github.com/sagemath/sage/blob/develop/.github/workflows/docker.yml - uses: sagemath/sagetrac-mirror/.github/workflows/docker.yml@develop + uses: sagemath/sage/.github/workflows/docker.yml@develop with: # Extra system packages to install. See available packages at # https://github.com/sagemath/sage/tree/develop/build/pkgs @@ -96,10 +96,6 @@ jobs: sage_repo: sagemath/sage sage_ref: develop upstream_artifact: upstream - sage_trac_git: https://github.com/sagemath/sagetrac-mirror.git - # Temporarily test on the branch from sage ticket https://trac.sagemath.org/ticket/21003 (pyscipopt) - # (this is a no-op after that ticket is merged) - sage_trac_ticket: 21003 # Docker targets (stages) to tag docker_targets: "with-targets" # We prefix the image name with the SPKG name ("pyscipopt-") to avoid the error From 74fd3df5f70cd841c69162a8b6ff8bd1b5ae9524 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 20 Feb 2023 10:20:34 -0800 Subject: [PATCH 05/10] .github/workflows/ci-sage.yml: Only run when a tag is pushed --- .github/workflows/ci-sage.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index f8126b5de..b355544ee 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -35,11 +35,8 @@ name: Run Sage CI for Linux ## systems/configurations. on: - pull_request: push: tags: - branches: - - master workflow_dispatch: # Allow to run manually From 8a4d49b62d583b6d5a8ec462ecf4218ed1e07f1d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 11 Feb 2024 20:11:43 -0800 Subject: [PATCH 06/10] .github/workflows/ci-sage.yml: Add macOS tests --- .github/workflows/ci-sage.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index b355544ee..1b5760a3b 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -1,9 +1,9 @@ -name: Run Sage CI for Linux +name: Run Sage CI for Linux and macOS ## This GitHub Actions workflow provides: ## ## - portability testing, by building and testing this project on many platforms -## (Linux variants) +## (Linux variants, macOS) ## ## - continuous integration, by building and testing other software ## that depends on this project. @@ -37,6 +37,8 @@ name: Run Sage CI for Linux on: push: tags: + branches: + - main workflow_dispatch: # Allow to run manually @@ -57,7 +59,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out ${{ env.SPKG }} - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: build/pkgs/${{ env.SPKG }}/src - name: Install prerequisites @@ -74,7 +76,7 @@ jobs: && echo "sed -i.bak \"/pushdef.*LT_VERSION/s/3[0-9.]*/4/\" ../build/pkgs/python3/spkg-configure.m4" >> upstream/update-pkgs.sh \ && echo "sed -i.bak \"/export.*proxy/d\" ../build/bin/sage-spkg" >> upstream/update-pkgs.sh \ && ls -l upstream/ - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: path: upstream name: upstream @@ -86,7 +88,7 @@ jobs: # Extra system packages to install. See available packages at # https://github.com/sagemath/sage/tree/develop/build/pkgs # liblzma, bzip2, and libffi are python3 dependencies. - extra_sage_packages: "patch cmake liblzma bzip2 libffi python3 onetbb" + extra_sage_packages: "patch cmake gfortran openblas liblzma bzip2 libffi python3 onetbb" # Sage distribution packages to build targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="soplex,scipoptsuite,pyscipopt" pyscipopt # Standard setting: Test the current beta release of Sage: @@ -99,3 +101,13 @@ jobs: # 'Package "sage-docker-..." is already associated with another repository.' docker_push_repository: ghcr.io/${{ github.repository }}/pyscipopt needs: [dist] + + macos: + # Use https://github.com/sagemath/sage/pull/37237 + uses: mkoeppe/sage/.github/workflows/macos.yml@ci-macos-2024 + with: + targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="soplex,scipoptsuite,pyscipopt" pyscipopt + sage_repo: sagemath/sage + sage_ref: refs/pull/37237/head + upstream_artifact: upstream + needs: [dist] From 0b645491a0251f59761064949a11163a3af0266f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 11 Feb 2024 20:39:21 -0800 Subject: [PATCH 07/10] .github/workflows/ci-sage.yml: Fix up patch of sage-spkg --- .github/workflows/ci-sage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 1b5760a3b..4b5f2f833 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -74,7 +74,7 @@ jobs: && echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \ && if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \ && echo "sed -i.bak \"/pushdef.*LT_VERSION/s/3[0-9.]*/4/\" ../build/pkgs/python3/spkg-configure.m4" >> upstream/update-pkgs.sh \ - && echo "sed -i.bak \"/export.*proxy/d\" ../build/bin/sage-spkg" >> upstream/update-pkgs.sh \ + && echo "sed -i.bak \"/export.*proxy/s/export.*/:/\" ../build/bin/sage-spkg" >> upstream/update-pkgs.sh \ && ls -l upstream/ - uses: actions/upload-artifact@v3 with: From 38221a2ace3baa9742ece20934e895a0863e0c11 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Feb 2024 20:21:47 -0800 Subject: [PATCH 08/10] .github/workflows/ci-sage.yml: Shorten title --- .github/workflows/ci-sage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 4b5f2f833..914095256 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -1,4 +1,4 @@ -name: Run Sage CI for Linux and macOS +name: Run Sage CI ## This GitHub Actions workflow provides: ## From 0e25abd88b131447836dbde9bd551ce5a8c10f82 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 19 Feb 2024 21:57:32 -0800 Subject: [PATCH 09/10] .github/workflows/ci-sage.yml (macos): In -minimal configurations, use more system packages --- .github/workflows/ci-sage.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 914095256..3c4c68d0c 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -106,6 +106,11 @@ jobs: # Use https://github.com/sagemath/sage/pull/37237 uses: mkoeppe/sage/.github/workflows/macos.yml@ci-macos-2024 with: + # Extra system packages to install. See available packages at + # https://github.com/sagemath/sage/tree/develop/build/pkgs + # Use boost_cropped from system because Sage ships 1.66.0, too old for papilo + extra_sage_packages: "cmake gfortran openblas boost_cropped onetbb" + # Sage distribution packages to build targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="soplex,scipoptsuite,pyscipopt" pyscipopt sage_repo: sagemath/sage sage_ref: refs/pull/37237/head From d76bd5e9f0e2b4e34f62be373f2e52a436771820 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 1 Mar 2024 21:46:04 -0800 Subject: [PATCH 10/10] .github/workflows/ci-sage.yml: Build against https://github.com/sagemath/sage/pull/37494 --- .github/workflows/ci-sage.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-sage.yml b/.github/workflows/ci-sage.yml index 3c4c68d0c..c65a1e61b 100644 --- a/.github/workflows/ci-sage.yml +++ b/.github/workflows/ci-sage.yml @@ -83,7 +83,7 @@ jobs: linux: # https://github.com/sagemath/sage/blob/develop/.github/workflows/docker.yml - uses: sagemath/sage/.github/workflows/docker.yml@develop + uses: mkoeppe/sage/.github/workflows/docker.yml@scip_9 with: # Extra system packages to install. See available packages at # https://github.com/sagemath/sage/tree/develop/build/pkgs @@ -93,7 +93,7 @@ jobs: targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="soplex,scipoptsuite,pyscipopt" pyscipopt # Standard setting: Test the current beta release of Sage: sage_repo: sagemath/sage - sage_ref: develop + sage_ref: refs/pull/37494/head upstream_artifact: upstream # Docker targets (stages) to tag docker_targets: "with-targets" @@ -103,8 +103,7 @@ jobs: needs: [dist] macos: - # Use https://github.com/sagemath/sage/pull/37237 - uses: mkoeppe/sage/.github/workflows/macos.yml@ci-macos-2024 + uses: mkoeppe/sage/.github/workflows/macos.yml@scip_9 with: # Extra system packages to install. See available packages at # https://github.com/sagemath/sage/tree/develop/build/pkgs @@ -113,6 +112,6 @@ jobs: # Sage distribution packages to build targets: SAGE_CHECK=no SAGE_CHECK_PACKAGES="soplex,scipoptsuite,pyscipopt" pyscipopt sage_repo: sagemath/sage - sage_ref: refs/pull/37237/head + sage_ref: refs/pull/37494/head upstream_artifact: upstream needs: [dist]