From 8d3457200d025206fa19c7396ba8aa8427b46b64 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 28 Mar 2023 19:25:26 -0700 Subject: [PATCH 01/13] .github/workflows/ci-linux-incremental.yml: New --- .github/workflows/ci-linux-incremental.yml | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/ci-linux-incremental.yml diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml new file mode 100644 index 00000000000..a365348ed1e --- /dev/null +++ b/.github/workflows/ci-linux-incremental.yml @@ -0,0 +1,63 @@ +name: CI Linux incremental + +## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments, +## whenever a GitHub pull request is opened or synchronized in a repository +## where GitHub Actions are enabled. +## +## It builds and checks some sage spkgs as defined in TARGETS. +## +## A job succeeds if there is no error. +## +## The build is run with "make V=0", so the build logs of individual packages are suppressed. +## +## At the end, all package build logs that contain an error are printed out. +## +## After all jobs have finished (or are canceled) and a short delay, +## tar files of all logs are made available as "build artifacts". + +on: + pull_request: + types: + # Defaults + - opened + - synchronize + - reopened + # When a CI label is added + - labeled + +concurrency: + # Cancel previous runs of this workflow for the same branch + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + + minimal: + if: | + (github.event.action != 'labeled' && + (contains(github.event.pull_request.labels.*.name, 'c: packages: standard') || + contains(github.event.pull_request.labels.*.name, 'c: packages: optional'))) || + (github.event.action == 'labeled' && + (github.event.label.name == 'c: packages: optional' || + github.event.label.name == 'c: packages: standard')) + uses: ./.github/workflows/docker.yml + with: + # Build incrementally from published Docker image + incremental: true + free_disk_space: true + from_docker_repository: ghcr.io/sagemath/sage/ + from_docker_target: "with-targets" + from_docker_tag: "dev" + docker_targets: "with-targets" + targets: build doc-html ptest + tox_system_factors: >- + ["ubuntu-bionic-gcc_8-python3.8", + "debian-bookworm", + "ubuntu-lunar", + "fedora-31", + "fedora-37", + "gentoo-python3.9", + "debian-buster-i386"] + tox_packages_factors: >- + ["minimal"] + docker_push_repository: ghcr.io/${{ github.repository }}/ From e58476c959524c8b199a65acbc8a18813acd28a1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 8 May 2023 22:30:21 -0700 Subject: [PATCH 02/13] .github/workflows/ci-linux-incremental.yml: Also run on: workflow_dispatch --- .github/workflows/ci-linux-incremental.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index a365348ed1e..0189bfab571 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -24,6 +24,7 @@ on: - reopened # When a CI label is added - labeled + workflow_dispatch: concurrency: # Cancel previous runs of this workflow for the same branch @@ -34,12 +35,13 @@ jobs: minimal: if: | - (github.event.action != 'labeled' && - (contains(github.event.pull_request.labels.*.name, 'c: packages: standard') || - contains(github.event.pull_request.labels.*.name, 'c: packages: optional'))) || - (github.event.action == 'labeled' && - (github.event.label.name == 'c: packages: optional' || - github.event.label.name == 'c: packages: standard')) + github.event_name != 'pull_request' || + ((github.event.action != 'labeled' && + (contains(github.event.pull_request.labels.*.name, 'c: packages: standard') || + contains(github.event.pull_request.labels.*.name, 'c: packages: optional'))) || + (github.event.action == 'labeled' && + (github.event.label.name == 'c: packages: optional' || + github.event.label.name == 'c: packages: standard'))) uses: ./.github/workflows/docker.yml with: # Build incrementally from published Docker image From 37abb2ca8c7e038150458ef54df914b9e3cbc79c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 8 May 2023 22:30:52 -0700 Subject: [PATCH 03/13] .github/workflows/ci-linux-incremental.yml: Add permissions for packages --- .github/workflows/ci-linux-incremental.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index 0189bfab571..ade8158f733 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -31,6 +31,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + packages: write + jobs: minimal: From 5cf019cc6d05cef20727be53912f3ba62d8cf3d0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 May 2023 00:00:49 -0700 Subject: [PATCH 04/13] .github/workflows/ci-conda.yml: Also run on PR syncs etc when one of the trigger labels is present --- .github/workflows/ci-conda.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index 2048d9c43ae..49236dd7270 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -8,6 +8,11 @@ on: - 'public/build/**-runci' pull_request: types: + # Defaults + - opened + - synchronize + - reopened + # When a CI label is added - labeled workflow_dispatch: # Allow to run manually @@ -21,13 +26,18 @@ jobs: test: name: Conda runs-on: ${{ matrix.os }} - - # Run on push, workflow dispatch and when certain labels are added + + # Run on push, workflow dispatch and when certain labels are added or are present if: | - github.event.action != 'labeled' || - github.event.label.name == 'c: packages: optional' || - github.event.label.name == 'c: packages: standard' || - github.event.label.name == 's: run conda ci' + github.event_name != 'pull_request' || + ((github.event.action != 'labeled' && + (contains(github.event.pull_request.labels.*.name, 'c: packages: standard') || + contains(github.event.pull_request.labels.*.name, 'c: packages: optional') || + contains(github.event.pull_request.labels.*.name, 's: run conda ci'))) || + (github.event.action == 'labeled' && + (github.event.label.name == 'c: packages: optional' || + github.event.label.name == 'c: packages: standard' || + github.event.label.name == 's: run conda ci'))) strategy: fail-fast: false From 830f94f4f5c4cf12446be086ede5d5feba4886bb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 9 May 2023 12:22:38 -0700 Subject: [PATCH 05/13] ci-linux-incremental: Use gentoo-python3.11 --- .github/workflows/ci-linux-incremental.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index ade8158f733..798cef6255d 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -61,7 +61,7 @@ jobs: "ubuntu-lunar", "fedora-31", "fedora-37", - "gentoo-python3.9", + "gentoo-python3.11", "debian-buster-i386"] tox_packages_factors: >- ["minimal"] From cb7a2334b5237c94cc7bdca1e00f6c86f8571740 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Aug 2023 11:49:49 -0700 Subject: [PATCH 06/13] .github/workflows/docker.yml: Restore ubuntu-bionic --- .github/workflows/docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3dc4b8a4627..403093635ce 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,6 +18,7 @@ on: default: >- ["ubuntu-trusty-toolchain-gcc_9", "ubuntu-xenial-toolchain-gcc_9", + "ubuntu-bionic-gcc_8", "ubuntu-focal", "ubuntu-jammy", "ubuntu-kinetic", From 1bd5052b9b4988f4288e3c9d06a032e3ce303c80 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Aug 2023 12:02:20 -0700 Subject: [PATCH 07/13] .github/workflows/ci-linux-incremental.yml: WIP: just test one platform --- .github/workflows/ci-linux-incremental.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index 798cef6255d..dbefd520abf 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -54,15 +54,19 @@ jobs: from_docker_target: "with-targets" from_docker_tag: "dev" docker_targets: "with-targets" - targets: build doc-html ptest + targets: "build doc-html ptest" tox_system_factors: >- - ["ubuntu-bionic-gcc_8-python3.8", - "debian-bookworm", - "ubuntu-lunar", - "fedora-31", - "fedora-37", - "gentoo-python3.11", - "debian-buster-i386"] + ["ubuntu-focal"] + ## , + ## "ubuntu-jammy", + ## "ubuntu-mantic, + ## "debian-bullseye", + ## "debian-bookworm", + ## "ubuntu-mantic, + ## "fedora-30", + ## "fedora-38", + ## "gentoo-python3.11", + ## "debian-bullseye-i386"] tox_packages_factors: >- ["minimal"] docker_push_repository: ghcr.io/${{ github.repository }}/ From 94976ebe0fcd87dcc03026f212a4566cc4342742 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Aug 2023 16:17:34 -0700 Subject: [PATCH 08/13] build/pkgs/libbraiding: Update to 1.2 --- build/pkgs/libbraiding/package-version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/libbraiding/package-version.txt b/build/pkgs/libbraiding/package-version.txt index 9459d4ba2a0..5625e59da88 100644 --- a/build/pkgs/libbraiding/package-version.txt +++ b/build/pkgs/libbraiding/package-version.txt @@ -1 +1 @@ -1.1 +1.2 From 848ea50232b8a245b50c61e60ab49a92b624c50b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Aug 2023 16:18:34 -0700 Subject: [PATCH 09/13] build/pkgs/kissat: Update to 3.1.0 --- build/pkgs/kissat/checksums.ini | 6 +++--- build/pkgs/kissat/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/kissat/checksums.ini b/build/pkgs/kissat/checksums.ini index 66b187bb599..85929110253 100644 --- a/build/pkgs/kissat/checksums.ini +++ b/build/pkgs/kissat/checksums.ini @@ -1,5 +1,5 @@ tarball=kissat-rel-VERSION.tar.gz -sha1=abfd971d5f560ed76281ed3ed7b75e20cb445618 -md5=6ef4b2efcc60c95a32581bfe59720154 -cksum=1532123399 +sha1=49972324939761306ee50cfa3df93cd3cd530256 +md5=1d0fa246c5451e3592910f2c9a5f3476 +cksum=2570717921 upstream_url=https://github.com/arminbiere/kissat/archive/refs/tags/rel-VERSION.tar.gz diff --git a/build/pkgs/kissat/package-version.txt b/build/pkgs/kissat/package-version.txt index 4a36342fcab..fd2a01863fd 100644 --- a/build/pkgs/kissat/package-version.txt +++ b/build/pkgs/kissat/package-version.txt @@ -1 +1 @@ -3.0.0 +3.1.0 From 518322739c7535573b7816e369340bfa27d4f54e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Aug 2023 16:19:29 -0700 Subject: [PATCH 10/13] .github/workflows/ci-linux-incremental.yml: Check changed packages --- .github/workflows/ci-linux-incremental.yml | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index dbefd520abf..3a2ed298ac0 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -36,7 +36,32 @@ permissions: jobs: + changed_files: + runs-on: ubuntu-latest + name: List changed packages + outputs: + uninstall_targets: ${{ steps.build-targets.outputs.uninstall_targets }} + build_targets: ${{ steps.build-targets.outputs.build_targets }} + steps: + - uses: actions/checkout@v3 + - name: Get all packages that have changed + id: changed-packages + uses: tj-actions/changed-files@v38 + with: + files_yaml: | + configures: + - 'build/pkgs/*/spkg-configure.m4' + pkgs: + - 'build/pkgs/**' + - 'pkgs/**' + - name: Determine targets to build + id: build-targets + run: | + echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT + echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do echo $a | sed -E 's,(build/)?pkgs/([-_.a-z0-9]*)/[^ ]* *,\2,;s,-,_,g;'; done | sort -u))" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT minimal: + needs: [changed_files] if: | github.event_name != 'pull_request' || ((github.event.action != 'labeled' && @@ -54,7 +79,7 @@ jobs: from_docker_target: "with-targets" from_docker_tag: "dev" docker_targets: "with-targets" - targets: "build doc-html ptest" + targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest" tox_system_factors: >- ["ubuntu-focal"] ## , From 2c0cf43bcfabe63df3f5932fc8f3607685124e0f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Aug 2023 20:30:22 -0700 Subject: [PATCH 11/13] build/make/Makefile.in: Add targets SPKG-ensure --- build/make/Makefile.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/make/Makefile.in b/build/make/Makefile.in index b6858173362..2d1a7e6c7b7 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -591,6 +591,8 @@ $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2): $(3) $(1): $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2) +$(1)-ensure: $(inst_$(1)) + $(1)-$(4)-no-deps: +@if [ -z '$$($(4))' ]; then \ echo "Error: The installation tree $(4) has been disabled" 2>&1; \ @@ -649,6 +651,8 @@ $(1)-build-deps: $(2) $(1): $(2) +$(MAKE_REC) $(1)-no-deps +$(1)-ensure: $(inst_$(1)) + $(1)-no-deps: $(AM_V_at)sage-logger -p 'sage --pip install -r "$$(SAGE_ROOT)/build/pkgs/$(1)/requirements.txt"' '$$(SAGE_LOGS)/$(1).log' @@ -705,6 +709,8 @@ $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2): $(3) $(1): $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2) +$(1)-ensure: $(inst_$(1)) + $(1)-$(4)-no-deps: $(PLUS)@if [ -z '$$($(4))' ]; then \ echo "Error: The installation tree $(4) has been disabled" 2>&1; \ From 06add6dd503769f132aa07c4544efddeb1e02b57 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Aug 2023 20:31:47 -0700 Subject: [PATCH 12/13] .github/workflows/ci-linux-incremental.yml: Use targets SPKG-ensure --- .github/workflows/ci-linux-incremental.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index 3a2ed298ac0..b8138c4cdf4 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -58,7 +58,7 @@ jobs: id: build-targets run: | echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT - echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do echo $a | sed -E 's,(build/)?pkgs/([-_.a-z0-9]*)/[^ ]* *,\2,;s,-,_,g;'; done | sort -u))" >> $GITHUB_OUTPUT + echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([-_.a-z0-9]*)/[^ ]* *,\2-ensure,;'; done | sort -u))" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT minimal: needs: [changed_files] From 922385b115af2b113f1ae050b744d800a45096e6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 23 Aug 2023 21:52:25 -0700 Subject: [PATCH 13/13] .github/workflows/ci-linux-incremental.yml: Add back platforms --- .github/workflows/ci-linux-incremental.yml | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index b8138c4cdf4..d0a802d3b5c 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -81,17 +81,17 @@ jobs: docker_targets: "with-targets" targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest" tox_system_factors: >- - ["ubuntu-focal"] - ## , - ## "ubuntu-jammy", - ## "ubuntu-mantic, - ## "debian-bullseye", - ## "debian-bookworm", - ## "ubuntu-mantic, - ## "fedora-30", - ## "fedora-38", - ## "gentoo-python3.11", - ## "debian-bullseye-i386"] + ["ubuntu-focal", + "ubuntu-jammy", + "ubuntu-mantic, + "debian-bullseye", + "debian-bookworm", + "ubuntu-mantic, + "fedora-30", + "fedora-38", + "gentoo-python3.11", + "debian-bullseye-i386"] tox_packages_factors: >- - ["minimal"] + ["standard", + "minimal"] docker_push_repository: ghcr.io/${{ github.repository }}/