From f8828082e9090675b383f6611426b393eaea08c9 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 6 Feb 2025 14:25:22 +0100 Subject: [PATCH 01/13] Disable broken and outdated CI --- .github/workflows/ci-linux-incremental.yml | 51 +------ .github/workflows/ci-linux.yml | 151 +-------------------- .github/workflows/ci-macos.yml | 58 -------- .github/workflows/docker.yml | 8 -- .github/workflows/macos.yml | 10 +- 5 files changed, 7 insertions(+), 271 deletions(-) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index 8606e7a4ca5..4ddc3e10d59 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -1,6 +1,6 @@ name: CI Linux incremental -## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments, +## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with selected environments, ## whenever a GitHub pull request is opened or synchronized in a repository ## where GitHub Actions are enabled. ## @@ -99,56 +99,9 @@ jobs: "debian-bullseye", "debian-bookworm", "fedora-30", - "fedora-40", - "gentoo-python3.11", - "debian-bullseye-i386"] + "fedora-40",] tox_packages_factors: >- ["standard", "minimal"] docker_push_repository: ghcr.io/${{ github.repository }}/ max_parallel: 8 - - constraints_pkgs-norequirements: - needs: [changed_files] - 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-pre" - from_docker_tag: "dev" - docker_targets: "with-targets-pre" - targets_pre: "${{needs.changed_files.outputs.build_targets}} all-sage-local python3-ensure tox-ensure sagelib-tox-sagepython-constraints_pkgs-norequirements" - tox_system_factors: >- - ["ubuntu-focal", - "ubuntu-noble", - "debian-bookworm", - "fedora-40", - "debian-bullseye-i386"] - tox_packages_factors: >- - ["standard"] - docker_push_repository: ghcr.io/${{ github.repository }}/ - max_parallel: 16 - - site: - needs: [changed_files] - 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: "${{needs.changed_files.outputs.build_targets}} doc-html ptest-nodoc" - # Only test systems with a usable system python (>= 3.9) - # with only a small number of test failures as of 10.2.rc0 - tox_system_factors: >- - ["gentoo-python3.11", - "archlinux-latest", - "fedora-40"] - tox_packages_factors: >- - ["standard-sitepackages"] - docker_push_repository: ghcr.io/${{ github.repository }}/ diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 1bf8862b4f4..3111d7aa8da 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -1,8 +1,7 @@ name: CI Linux -## 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. +## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with selected environments, +## whenever a tag is pushed. ## ## It builds and checks some sage spkgs as defined in TARGETS. ## @@ -25,165 +24,21 @@ on: # Allow to run manually env: - TARGETS_PRE: all-sage-local - TARGETS: build doc-html TARGETS_OPTIONAL: ptest permissions: packages: write jobs: - - # standard (without ptest) for the default platform (used by build.yml etc.) - default: - uses: ./.github/workflows/docker.yml - with: - # Build from scratch - free_disk_space: true - docker_targets: "with-system-packages configured with-targets-pre with-targets" - # FIXME: duplicated from env.TARGETS - targets_pre: all-sage-local - targets: build doc-html - targets_optional: ptest - tox_system_factors: >- - ["ubuntu-jammy"] - tox_packages_factors: >- - ["standard"] - docker_push_repository: ghcr.io/${{ github.repository }}/ - logs_artifact: false - - # All platforms. This duplicates the default platform, but why not, - # it makes it more robust regarding random timeouts. - - standard: - if: ${{ success() || failure() }} - uses: ./.github/workflows/docker.yml - with: - # Build from scratch - free_disk_space: true - docker_targets: "with-system-packages configured with-targets-pre with-targets with-targets-optional" - # FIXME: duplicated from env.TARGETS - targets_pre: all-sage-local - targets: build doc-html - targets_optional: ptest - tox_packages_factors: >- - ["standard"] - docker_push_repository: ghcr.io/${{ github.repository }}/ - # Make sure that all "standard" jobs can start simultaneously, - # so that runners are available by the time that "default" starts. - max_parallel: 50 - - standard-constraints_pkgs-norequirements: + maximal: if: ${{ success() || failure() }} - needs: [standard] uses: ./.github/workflows/docker.yml with: - # Build incrementally from previous stage (pre) - incremental: true free_disk_space: true - from_docker_repository: ghcr.io/${{ github.repository }}/ - from_docker_target: "with-targets-pre" - docker_targets: "with-targets-pre" - targets_pre: all-sage-local python3-ensure tox-ensure sagelib-tox-sagepython-constraints_pkgs-norequirements - tox_packages_factors: >- - ["standard"] - max_parallel: 15 - - standard-sitepackages: - if: ${{ success() || failure() }} - needs: [standard] - uses: ./.github/workflows/docker.yml - with: - # Build incrementally from previous stage (pre) - incremental: true - free_disk_space: true - from_docker_repository: ghcr.io/${{ github.repository }}/ - from_docker_target: "with-targets-pre" - docker_targets: "with-targets with-targets-optional" - # FIXME: duplicated from env.TARGETS - targets: build doc-html - targets_optional: ptest - tox_packages_factors: >- - ["standard-sitepackages"] - # Only test systems with a usable system python (>= 3.9) - tox_system_factors: >- - ["ubuntu-jammy", - "ubuntu-lunar", - "ubuntu-mantic", - "debian-bookworm", - "debian-trixie", - "debian-sid", - "linuxmint-21.1", - "linuxmint-21.2", - "fedora-40", - "centos-stream-9-python3.9", - "almalinux-8-python3.9", - "gentoo-python3.10", - "gentoo-python3.11", - "archlinux-latest", - "opensuse-15.5-gcc_11-python3.11", - "opensuse-tumbleweed-python3.10", - "opensuse-tumbleweed"] - docker_push_repository: ghcr.io/${{ github.repository }}/ - max_parallel: 8 - - minimal: - if: ${{ success() || failure() }} - uses: ./.github/workflows/docker.yml - with: # Build from scratch - free_disk_space: true docker_targets: "with-system-packages configured with-targets-pre with-targets with-targets-optional" - # FIXME: duplicated from env.TARGETS targets_pre: all-sage-local targets: build doc-html - targets_optional: ptest - tox_packages_factors: >- - ["minimal"] - docker_push_repository: ghcr.io/${{ github.repository }}/ - # Reduced from 30 because it may run in parallel with 'standard' and 'standard-sitepackages' above. - # Calibrated for clogging the job pipeline until the "default" job has finished. - max_parallel: 24 - - maximal-pre: - if: ${{ success() || failure() }} - needs: [minimal] - uses: ./.github/workflows/docker.yml - with: - free_disk_space: true - # Build from scratch - docker_targets: "with-system-packages configured with-targets-pre" - # FIXME: duplicated from env.TARGETS - targets_pre: all-sage-local tox_packages_factors: >- ["maximal"] docker_push_repository: ghcr.io/${{ github.repository }}/ - - optional: - if: ${{ success() || failure() }} - needs: [maximal-pre] - uses: ./.github/workflows/docker.yml - with: - incremental: true - free_disk_space: true - from_docker_repository: ghcr.io/${{ github.repository }}/ - from_docker_target: "with-targets-pre" - tox_packages_factors: >- - ["maximal"] - docker_targets: "with-targets-optional" - # We remove packages starting with _, in particular package _develop - targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :optional: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc | grep -v ^_))' - - experimental: - if: ${{ success() || failure() }} - needs: [optional] - uses: ./.github/workflows/docker.yml - with: - incremental: true - free_disk_space: true - from_docker_repository: ghcr.io/${{ github.repository }}/ - from_docker_target: "with-targets-pre" - tox_packages_factors: >- - ["maximal"] - docker_targets: "with-targets-optional" - targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :experimental: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc))' diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index c62d259c286..5d9a92de3b2 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -99,61 +99,3 @@ jobs: with: path: "dist/*.tar.gz" name: dist - - local-macos-nohomebrew: - - needs: [dist] - - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - max-parallel: 4 - matrix: - os: [ macos-12, macos-13, macos-14 ] - tox_system_factor: [macos-nobootstrap] - tox_packages_factor: [minimal] - xcode_version_factor: [default] - env: - TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }} - LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}-xcode_${{ matrix.xcode_version_factor }} - steps: - - uses: actions/checkout@v4 - if: "!contains(matrix.tox_system_factor, 'nobootstrap')" - - uses: actions/download-artifact@v4 - with: - path: . - name: dist - if: contains(matrix.tox_system_factor, 'nobootstrap') - - name: Unpack sage dist - run: | - tar xf sage*.tar.gz --strip-components=1 - if: contains(matrix.tox_system_factor, 'nobootstrap') - - name: Move homebrew away - run: | - (cd $(brew --prefix) && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done) - - name: Select Xcode version - run: | - if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi - - name: Install test prerequisites - run: | - sudo /usr/bin/python3 -m pip install tox - - name: Build and test with tox - # We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts. - # For doctesting, we use a lower parallelization to avoid timeouts. - run: | - (sleep 20000; pkill make) & - MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS - - name: Prepare logs artifact - run: | - mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME" - if: always() - - uses: actions/upload-artifact@v4 - with: - path: artifacts - name: ${{ env.LOGS_ARTIFACT_NAME }} - if: always() - - name: Print out logs for immediate inspection - # and markup the output with GitHub Actions logging commands - run: | - .github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME" - if: always() diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 96427164eae..42de1c0d6ca 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -19,11 +19,8 @@ on: default: >- [ "ubuntu-xenial-toolchain-gcc_9", - "ubuntu-bionic-gcc_8", "ubuntu-focal", "ubuntu-jammy", - "ubuntu-lunar", - "ubuntu-mantic", "ubuntu-noble", "debian-bullseye", "debian-bookworm", @@ -50,17 +47,12 @@ on: "fedora-41", "centos-stream-9", "centos-stream-9-python3.12", - "almalinux-8-python3.9", "almalinux-9-python3.11", - "gentoo-python3.10", - "gentoo-python3.11", - "gentoo-python3.12", "archlinux-latest", "opensuse-15.5-gcc_11-python3.11", "opensuse-tumbleweed-python3.10", "opensuse-tumbleweed", "conda-forge-python3.11", - "ubuntu-bionic-gcc_8-i386", "debian-bullseye-i386", ] # 'tox -e update_docker_platforms' updates above diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 38c7feb9ad8..0346c699820 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,15 +23,9 @@ on: # https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories description: 'Stringified JSON object' default: >- - [["12", "", "homebrew-macos-usrlocal-minimal"], - ["12", "", "homebrew-macos-usrlocal-standard"], - ["12", "", "homebrew-macos-usrlocal-python3_xcode-standard"], - ["12", "", "homebrew-macos-usrlocal-maximal"], - ["13", "xcode_15.0", "homebrew-macos-usrlocal-standard"], + [ ["latest", "", "homebrew-macos-opthomebrew-standard"], - ["13", "", "conda-forge-macos-minimal"], - ["13", "", "conda-forge-macos-standard"], - ["latest", "", "conda-forge-macos-standard"]] + ] type: string extra_sage_packages: description: 'Extra Sage packages to install as system packages' From f93a2d77ed83c7fa7910e6ac5fb6e8d379ce937b Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 6 Feb 2025 18:44:15 +0100 Subject: [PATCH 02/13] Fail ci-retrofit if it's not yet configured --- .ci/retrofit-worktree.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.ci/retrofit-worktree.sh b/.ci/retrofit-worktree.sh index 782d3ba44b7..27cd212fbaf 100755 --- a/.ci/retrofit-worktree.sh +++ b/.ci/retrofit-worktree.sh @@ -7,6 +7,11 @@ fi WORKTREE_NAME="$1" WORKTREE_DIRECTORY="$2" +if [ ! -f $WORKTREE_DIRECTORY/build/make/Makefile ]; then + echo >&2 "Error: This script must be run in a Sage directory that is configured." + exit 1 +fi + export GIT_AUTHOR_NAME="ci-sage workflow" export GIT_AUTHOR_EMAIL="ci-sage@example.com" export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" From 5c8e5d61871a7d8d3d3bd43991437421d782a7dc Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 6 Feb 2025 18:44:34 +0100 Subject: [PATCH 03/13] Remove obsolete "if" clause in CI --- .github/workflows/ci-linux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 3111d7aa8da..63dca96ce91 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -31,7 +31,6 @@ permissions: jobs: maximal: - if: ${{ success() || failure() }} uses: ./.github/workflows/docker.yml with: free_disk_space: true From 60ae9351517d42057ea278eb144d10c1472f96af Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 6 Feb 2025 19:55:42 +0100 Subject: [PATCH 04/13] Revert "Fail ci-retrofit if it's not yet configured" This reverts commit f93a2d77ed83c7fa7910e6ac5fb6e8d379ce937b. --- .ci/retrofit-worktree.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.ci/retrofit-worktree.sh b/.ci/retrofit-worktree.sh index 27cd212fbaf..782d3ba44b7 100755 --- a/.ci/retrofit-worktree.sh +++ b/.ci/retrofit-worktree.sh @@ -7,11 +7,6 @@ fi WORKTREE_NAME="$1" WORKTREE_DIRECTORY="$2" -if [ ! -f $WORKTREE_DIRECTORY/build/make/Makefile ]; then - echo >&2 "Error: This script must be run in a Sage directory that is configured." - exit 1 -fi - export GIT_AUTHOR_NAME="ci-sage workflow" export GIT_AUTHOR_EMAIL="ci-sage@example.com" export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" From 50bbe1a9044643d4620447f3191dc15f21f1a488 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 6 Feb 2025 20:05:58 +0100 Subject: [PATCH 05/13] add targets_optional: ptest --- .github/workflows/ci-linux.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 63dca96ce91..1c433080626 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -24,6 +24,8 @@ on: # Allow to run manually env: + TARGETS_PRE: all-sage-local + TARGETS: build doc-html TARGETS_OPTIONAL: ptest permissions: @@ -38,6 +40,7 @@ jobs: docker_targets: "with-system-packages configured with-targets-pre with-targets with-targets-optional" targets_pre: all-sage-local targets: build doc-html + targets_optional: ptest tox_packages_factors: >- ["maximal"] docker_push_repository: ghcr.io/${{ github.repository }}/ From 164a8378373fa70b947586b4742b146dd8df0086 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Thu, 6 Feb 2025 20:09:20 +0100 Subject: [PATCH 06/13] Remove failing retrofit --- .ci/write-dockerfile.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.ci/write-dockerfile.sh b/.ci/write-dockerfile.sh index 7a3512dafd9..5356b86ebfb 100755 --- a/.ci/write-dockerfile.sh +++ b/.ci/write-dockerfile.sh @@ -349,14 +349,9 @@ ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,! $ADD .gitignore /new/.gitignore $ADD src /new/src RUN cd /new && rm -rf .git && \\ - if /.ci/retrofit-worktree.sh worktree-pre /sage; then \\ - cd /sage && touch configure build/make/Makefile; \\ - else \\ - echo "retrofit-worktree.sh failed, falling back to replacing /sage/src"; \\ - rm -rf /sage/src; \\ - mv src /sage/src; \\ - cd /sage && ./bootstrap && ./config.status; \\ - fi; \\ + rm -rf /sage/src; \\ + mv src /sage/src; \\ + cd /sage && ./bootstrap && ./config.status; \\ cd /sage && rm -rf .git; rm -rf /new || echo "(error ignored)" ARG TARGETS="build" $RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS}$ENDRUN$THEN_SAVE_STATUS From 6b05035cb91d3023e492d5bbeb21ff70fa8d5a92 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 7 Feb 2025 12:58:58 +0100 Subject: [PATCH 07/13] Remove more failing systems --- .github/workflows/docker.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 42de1c0d6ca..5775c0199bd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,12 +21,8 @@ on: "ubuntu-xenial-toolchain-gcc_9", "ubuntu-focal", "ubuntu-jammy", - "ubuntu-noble", "debian-bullseye", "debian-bookworm", - "debian-trixie", - "debian-sid", - "linuxmint-20.1", "linuxmint-20.2", "linuxmint-20.3", "linuxmint-21", @@ -52,8 +48,6 @@ on: "opensuse-15.5-gcc_11-python3.11", "opensuse-tumbleweed-python3.10", "opensuse-tumbleweed", - "conda-forge-python3.11", - "debian-bullseye-i386", ] # 'tox -e update_docker_platforms' updates above tox_packages_factors: From 819cd4801cd72d3423da0bf91f3dea2a7d2f55c8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 8 Feb 2025 19:23:55 +0100 Subject: [PATCH 08/13] Use maximal in place of standard for CI --- .github/workflows/build.yml | 6 +++--- .github/workflows/doc-build-pdf.yml | 6 +++--- .github/workflows/pyright.yml | 2 +- src/doc/en/developer/github.rst | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbecdf481b6..0f15264ed59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ on: platform: description: 'Platform' required: true - default: 'ubuntu-jammy-standard' + default: 'ubuntu-jammy-maximal' docker_tag: description: 'Docker tag' required: true @@ -68,8 +68,8 @@ concurrency: env: # Adapted from docker.yml - TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-jammy-standard' }}-incremental" - BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-jammy-standard' }}-with-targets:ci" + TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-jammy-maximal' }}-incremental" + BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-jammy-maximal' }}-with-targets:ci" FROM_DOCKER_REPOSITORY: "ghcr.io/sagemath/sage/" FROM_DOCKER_TARGET: "with-targets" FROM_DOCKER_TAG: ${{ github.event.inputs.docker_tag || 'dev'}} diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index dce25a132c9..aa7d1cede15 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -9,7 +9,7 @@ on: platform: description: 'Platform' required: true - default: 'ubuntu-jammy-standard' + default: 'ubuntu-jammy-maximal' docker_tag: description: 'Docker tag' required: true @@ -22,8 +22,8 @@ concurrency: env: # Same as in build.yml - TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-jammy-standard' }}-incremental" - BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-jammy-standard' }}-with-targets:ci" + TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-jammy-maximal' }}-incremental" + BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-jammy-maximal' }}-with-targets:ci" FROM_DOCKER_REPOSITORY: "ghcr.io/sagemath/sage/" FROM_DOCKER_TARGET: "with-targets" FROM_DOCKER_TAG: ${{ github.event.inputs.docker_tag || 'dev'}} diff --git a/.github/workflows/pyright.yml b/.github/workflows/pyright.yml index eef1aad5976..4f89c2f290c 100644 --- a/.github/workflows/pyright.yml +++ b/.github/workflows/pyright.yml @@ -18,7 +18,7 @@ concurrency: jobs: pyright: runs-on: ubuntu-latest - container: ghcr.io/sagemath/sage/sage-ubuntu-jammy-standard-with-targets:dev + container: ghcr.io/sagemath/sage/sage-ubuntu-jammy-maximal-with-targets:dev steps: - name: Checkout id: checkout diff --git a/src/doc/en/developer/github.rst b/src/doc/en/developer/github.rst index 306454407fb..d77689343ac 100644 --- a/src/doc/en/developer/github.rst +++ b/src/doc/en/developer/github.rst @@ -462,7 +462,7 @@ Actions. test. Details are again available by clicking on the check. The automatic workflow runs on a container based on - ``ubuntu-focal-standard``. To request a run of the workflow on a different + ``ubuntu-jammy-maximal``. To request a run of the workflow on a different platform, you can issue a `workflow dispatch `_. You can select any of the platforms for which a `prebuilt container image From b8639d752f0a6c7f9af465fa26e99fdff9eae3b1 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Sat, 8 Feb 2025 19:34:37 +0100 Subject: [PATCH 09/13] Clarify portability testing docs --- src/doc/en/developer/portability_testing.rst | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/doc/en/developer/portability_testing.rst b/src/doc/en/developer/portability_testing.rst index 0f8d9e4b30f..c3e1dc1ad96 100644 --- a/src/doc/en/developer/portability_testing.rst +++ b/src/doc/en/developer/portability_testing.rst @@ -1139,24 +1139,25 @@ makes them available on `GitHub Packages `_ (ghcr.io). This makes it easy for developers to debug problems that showed up in -the build logs for a given platform. +the build logs for a given platform. These images are not intended for production +deployment. The image version corresponding to the latest development release receives the additional Docker tag ``dev``, see for example the Docker -image for the platform `ubuntu-focal-standard -`_. Thus, +image for the platform `ubuntu-focal-maximal +`_. Thus, for example, the following command will work:: - $ docker run -it ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets-optional:dev bash - Unable to find image 'ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets-optional:dev' locally - dev: Pulling from sagemath/sage/sage-ubuntu-focal-standard-with-targets-optional + $ docker run -it ghcr.io/sagemath/sage/sage-ubuntu-focal-maximal-with-targets-optional:dev bash + Unable to find image 'ghcr.io/sagemath/sage/sage-ubuntu-focal-maximal-with-targets-optional:dev' locally + dev: Pulling from sagemath/sage/sage-ubuntu-focal-maximal-with-targets-optional d5fd17ec1767: Already exists 67586203f0c7: Pull complete b63c529f4777: Pull complete ... 159775d1a3d2: Pull complete Digest: sha256:e6ba5e12f59c6c4668692ef4cfe4ae5f242556482664fb347bf260f32bf8e698 - Status: Downloaded newer image for ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets-optional:dev + Status: Downloaded newer image for ghcr.io/sagemath/sage/sage-ubuntu-focal-maximal-with-targets-optional:dev root@8055a7ba0607:/sage# ./sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 9.6, Release Date: 2022-05-15 │ @@ -1188,6 +1189,9 @@ are available: installation of Sage, including the HTML documentation, but ``make ptest`` has not been run yet. +Note that some of these images are outdated due to build errors. +Moreover, standard and minimal images are discontinued. + .. only:: html .. include:: portability_platform_table.rst From 4871a96e282ccd44c7c83471ce8333b270d91603 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Wed, 12 Feb 2025 14:08:31 +0100 Subject: [PATCH 10/13] Remove fedora systems after EOL --- .github/workflows/docker.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5775c0199bd..a7d215bf1cd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -29,16 +29,6 @@ on: "linuxmint-21.1", "linuxmint-21.2", "linuxmint-21.3", - "fedora-30", - "fedora-31", - "fedora-32", - "fedora-33", - "fedora-34", - "fedora-35", - "fedora-36", - "fedora-37", - "fedora-38", - "fedora-39", "fedora-40", "fedora-41", "centos-stream-9", From e51ddca84af437ecd2d295ec7d88eb6788295b94 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Wed, 12 Feb 2025 14:26:29 +0100 Subject: [PATCH 11/13] Readd ubuntu-jammy-minimal --- .github/workflows/ci-linux.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 1c433080626..c8a4e0e4e7d 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -32,6 +32,23 @@ permissions: packages: write jobs: + minimal: + if: ${{ success() || failure() }} + uses: ./.github/workflows/docker.yml + with: + # Build from scratch + free_disk_space: true + docker_targets: "with-system-packages configured with-targets-pre with-targets with-targets-optional" + # FIXME: duplicated from env.TARGETS + targets_pre: all-sage-local + targets: build doc-html + targets_optional: ptest + tox_system_factors: >- + ["ubuntu-jammy"] + tox_packages_factors: >- + ["minimal"] + docker_push_repository: ghcr.io/${{ github.repository }}/ + maximal: uses: ./.github/workflows/docker.yml with: From d12926469176887209e2c2293dbcd190e73db418 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Wed, 19 Feb 2025 21:25:10 +0100 Subject: [PATCH 12/13] Use 'standard' instead of 'maximal' as package factor 'maximal' also installs optional packages as system packages; this is better handled via the 'optional' factor. --- .github/workflows/build.yml | 6 +++--- .github/workflows/ci-linux.yml | 4 ++-- .github/workflows/doc-build-pdf.yml | 6 +++--- .github/workflows/pyright.yml | 2 +- src/doc/en/developer/github.rst | 2 +- src/doc/en/developer/portability_testing.rst | 12 ++++++------ 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 366d2d48ffb..564b3e5464e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ on: platform: description: 'Platform' required: true - default: 'ubuntu-noble-maximal' + default: 'ubuntu-noble-standard' docker_tag: description: 'Docker tag' required: true @@ -68,8 +68,8 @@ concurrency: env: # Adapted from docker.yml - TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-noble-maximal' }}-incremental" - BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-noble-maximal' }}-with-targets:ci" + TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-noble-standard' }}-incremental" + BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-noble-standard' }}-with-targets:ci" FROM_DOCKER_REPOSITORY: "ghcr.io/sagemath/sage/" FROM_DOCKER_TARGET: "with-targets" FROM_DOCKER_TAG: ${{ github.event.inputs.docker_tag || 'dev'}} diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index c8a4e0e4e7d..11c3af041c5 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -49,7 +49,7 @@ jobs: ["minimal"] docker_push_repository: ghcr.io/${{ github.repository }}/ - maximal: + standard: uses: ./.github/workflows/docker.yml with: free_disk_space: true @@ -59,5 +59,5 @@ jobs: targets: build doc-html targets_optional: ptest tox_packages_factors: >- - ["maximal"] + ["standard"] docker_push_repository: ghcr.io/${{ github.repository }}/ diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index c8db8715e99..f8d30cd32b6 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -9,7 +9,7 @@ on: platform: description: 'Platform' required: true - default: 'ubuntu-noble-maximal' + default: 'ubuntu-noble-standard' docker_tag: description: 'Docker tag' required: true @@ -22,8 +22,8 @@ concurrency: env: # Same as in build.yml - TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-noble-maximal' }}-incremental" - BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-noble-maximal' }}-with-targets:ci" + TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-noble-standard' }}-incremental" + BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-noble-standard' }}-with-targets:ci" FROM_DOCKER_REPOSITORY: "ghcr.io/sagemath/sage/" FROM_DOCKER_TARGET: "with-targets" FROM_DOCKER_TAG: ${{ github.event.inputs.docker_tag || 'dev'}} diff --git a/.github/workflows/pyright.yml b/.github/workflows/pyright.yml index 0a4327bdf44..97e12442b03 100644 --- a/.github/workflows/pyright.yml +++ b/.github/workflows/pyright.yml @@ -18,7 +18,7 @@ concurrency: jobs: pyright: runs-on: ubuntu-latest - container: ghcr.io/sagemath/sage/sage-ubuntu-noble-maximal-with-targets:dev + container: ghcr.io/sagemath/sage/sage-ubuntu-noble-standard-with-targets:dev steps: - name: Checkout id: checkout diff --git a/src/doc/en/developer/github.rst b/src/doc/en/developer/github.rst index d77689343ac..2ce4da07fc4 100644 --- a/src/doc/en/developer/github.rst +++ b/src/doc/en/developer/github.rst @@ -462,7 +462,7 @@ Actions. test. Details are again available by clicking on the check. The automatic workflow runs on a container based on - ``ubuntu-jammy-maximal``. To request a run of the workflow on a different + ``ubuntu``. To request a run of the workflow on a different platform, you can issue a `workflow dispatch `_. You can select any of the platforms for which a `prebuilt container image diff --git a/src/doc/en/developer/portability_testing.rst b/src/doc/en/developer/portability_testing.rst index c3e1dc1ad96..21e10a87e8d 100644 --- a/src/doc/en/developer/portability_testing.rst +++ b/src/doc/en/developer/portability_testing.rst @@ -1144,20 +1144,20 @@ deployment. The image version corresponding to the latest development release receives the additional Docker tag ``dev``, see for example the Docker -image for the platform `ubuntu-focal-maximal -`_. Thus, +image for the platform `ubuntu-focal-standard +`_. Thus, for example, the following command will work:: - $ docker run -it ghcr.io/sagemath/sage/sage-ubuntu-focal-maximal-with-targets-optional:dev bash - Unable to find image 'ghcr.io/sagemath/sage/sage-ubuntu-focal-maximal-with-targets-optional:dev' locally - dev: Pulling from sagemath/sage/sage-ubuntu-focal-maximal-with-targets-optional + $ docker run -it ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets-optional:dev bash + Unable to find image 'ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets-optional:dev' locally + dev: Pulling from sagemath/sage/sage-ubuntu-focal-standard-with-targets-optional d5fd17ec1767: Already exists 67586203f0c7: Pull complete b63c529f4777: Pull complete ... 159775d1a3d2: Pull complete Digest: sha256:e6ba5e12f59c6c4668692ef4cfe4ae5f242556482664fb347bf260f32bf8e698 - Status: Downloaded newer image for ghcr.io/sagemath/sage/sage-ubuntu-focal-maximal-with-targets-optional:dev + Status: Downloaded newer image for ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets-optional:dev root@8055a7ba0607:/sage# ./sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 9.6, Release Date: 2022-05-15 │ From 82832bc4eb1f6babc635792fc3fba33dbf5252ac Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 7 Mar 2025 10:49:21 +0100 Subject: [PATCH 13/13] Restore retrofit --- .ci/write-dockerfile.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.ci/write-dockerfile.sh b/.ci/write-dockerfile.sh index 5356b86ebfb..7a3512dafd9 100755 --- a/.ci/write-dockerfile.sh +++ b/.ci/write-dockerfile.sh @@ -349,9 +349,14 @@ ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,! $ADD .gitignore /new/.gitignore $ADD src /new/src RUN cd /new && rm -rf .git && \\ - rm -rf /sage/src; \\ - mv src /sage/src; \\ - cd /sage && ./bootstrap && ./config.status; \\ + if /.ci/retrofit-worktree.sh worktree-pre /sage; then \\ + cd /sage && touch configure build/make/Makefile; \\ + else \\ + echo "retrofit-worktree.sh failed, falling back to replacing /sage/src"; \\ + rm -rf /sage/src; \\ + mv src /sage/src; \\ + cd /sage && ./bootstrap && ./config.status; \\ + fi; \\ cd /sage && rm -rf .git; rm -rf /new || echo "(error ignored)" ARG TARGETS="build" $RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS}$ENDRUN$THEN_SAVE_STATUS