Skip to content

Commit

Permalink
Merge branch 'develop' into quatalg_from_ramification
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton authored Jan 24, 2025
2 parents 0c80936 + 5188024 commit 6808417
Show file tree
Hide file tree
Showing 1,949 changed files with 44,805 additions and 44,858 deletions.
6 changes: 6 additions & 0 deletions .ci/create-changes-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ echo '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highli
echo '<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>' >> CHANGES.html
echo '<script>hljs.highlightAll();</script>' >> CHANGES.html
cat >> CHANGES.html << EOF
<style>
p.diff a:first-child {
font-weight: bold;
font-size: x-large;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', () => {
// This URL is hardcoded in the file .github/workflows/doc-publish.yml.
Expand Down
12 changes: 6 additions & 6 deletions .ci/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ cat <<EOF
FROM with-system-packages AS bootstrapped
#:bootstrapping:
RUN rm -rf /new /sage/.git
$ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap-conda configure.ac sage .homebrew-build-env tox.ini Pipfile.m4 .gitignore /new/
$ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap configure.ac sage .homebrew-build-env tox.ini .gitignore /new/
$ADD config/config.rpath /new/config/config.rpath
$ADD src/doc/bootstrap /new/src/doc/bootstrap
$ADD src/bin /new/src/bin
$ADD src/Pipfile.m4 src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/
$ADD src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/
$ADD m4 /new/m4
$ADD pkgs /new/pkgs
$ADD build /new/build
Expand Down Expand Up @@ -326,7 +326,7 @@ ARG NUMPROC=8
ENV MAKE="make -j\${NUMPROC}"
ARG USE_MAKEFLAGS="-k V=0"
ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst"
#:toolchain:
$RUN$CHECK_STATUS_THEN make \${USE_MAKEFLAGS} base-toolchain$ENDRUN$THEN_SAVE_STATUS
Expand All @@ -335,7 +335,7 @@ ARG NUMPROC=8
ENV MAKE="make -j\${NUMPROC}"
ARG USE_MAKEFLAGS="-k V=0"
ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst"
#:make:
ARG TARGETS_PRE="all-sage-local"
$RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_PRE}$ENDRUN$THEN_SAVE_STATUS
Expand All @@ -345,7 +345,7 @@ ARG NUMPROC=8
ENV MAKE="make -j\${NUMPROC}"
ARG USE_MAKEFLAGS="-k V=0"
ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst"
$ADD .gitignore /new/.gitignore
$ADD src /new/src
RUN cd /new && rm -rf .git && \\
Expand All @@ -366,7 +366,7 @@ ARG NUMPROC=8
ENV MAKE="make -j\${NUMPROC}"
ARG USE_MAKEFLAGS="-k V=0"
ENV SAGE_CHECK=warn
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
ENV SAGE_CHECK_PACKAGES="!cython,!python3,!cysignals,!linbox,!ppl,!cmake,!rpy2,!sage_sws2rst"
ARG TARGETS_OPTIONAL="ptest"
$RUN$CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_OPTIONAL} || echo "(error ignored)"$ENDRUN$THEN_SAVE_STATUS
Expand Down
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ coverage:
target: auto
threshold: 0%
base: auto
informational: true
10 changes: 6 additions & 4 deletions .devcontainer/onCreate-conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
set -e

# Create conda environment
conda install mamba -n base -c conda-forge -y
mamba env create --file src/environment-dev-3.11-linux.yml || mamba env update --file src/environment-dev-3.11-linux.yml
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda update -y --all --override-channels -c conda-forge
conda install mamba=1 -n base -y
mamba env create -y --file environment-3.11-linux.yml || mamba env update -y --file environment-3.11-linux.yml
conda init bash

# Build sage
conda run -n sage-dev ./bootstrap
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src
conda run -n sage-dev pip install --no-build-isolation -v -v -e .
104 changes: 3 additions & 101 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ concurrency:
#
# The three workflows:
#
# - build.yml (with jobs test-new, test-mod, test-long),
# - build.yml (with jobs test-new, test-long),
# - doc-build.yml,
# - doc-build-pdf.yml
#
Expand All @@ -50,7 +50,7 @@ concurrency:
# This baseline is transparently improved by our use of the GH Actions cache,
# see https://docs.docker.com/build/ci/github-actions/cache/#cache-backend-api.
#
# Jobs test-mod and test-long are only started after test-new completed;
# Jobs test-long is only started after test-new completed;
# but the workflows doc-build.yml and doc-build-pdf.yml are started independently.
#
# - When nothing is cached and the 3 workflows are launched in parallel,
Expand Down Expand Up @@ -254,104 +254,6 @@ jobs:
./sage -t --long --format github -p4 ${{ steps.changed-files.outputs.doctests_all_changed_files }}
shell: sh .ci/docker-exec-script.sh BUILD /sage {0}

test-mod:
runs-on: ubuntu-latest
needs: [test-new]
services:
# https://docs.docker.com/build/ci/github-actions/local-registry/
registry:
image: registry:2
ports:
- 5000:5000
strategy:
fail-fast: false
matrix:
targets:
- sagemath_categories-check
steps:
- name: Maximize build disk space
uses: easimon/maximize-build-space@v10
with:
# need space in /var for Docker images
root-reserve-mb: 30000
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true

- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Install test prerequisites
# From docker.yml
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
sudo apt-get clean
df -h
- name: Merge CI fixes from sagemath/sage
# From docker.yml
# This step needs to happen after the commit sha is put in DOCKER_TAG
# so that multi-stage builds can work correctly.
run: |
.ci/merge-fixes.sh
env:
GH_TOKEN: ${{ github.token }}

# Building

- name: Generate Dockerfile
# From docker.yml
run: |
tox -e ${{ env.TOX_ENV }}
cp .tox/${{ env.TOX_ENV }}/Dockerfile .
env:
# Only generate the Dockerfile, do not run 'docker build' here
DOCKER_TARGETS: ""

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Build Docker image
id: image
uses: docker/build-push-action@v6
with:
push: true
load: false
context: .
tags: ${{ env.BUILD_IMAGE }}
target: with-targets
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
NUMPROC=6
USE_MAKEFLAGS=-k V=0 SAGE_NUM_THREADS=4 --output-sync=recurse
TARGETS_PRE=build/make/Makefile
TARGETS=${{ needs.test-new.outputs.build_targets }}
- name: Start container
id: container
if: (success() || failure())
run: |
docker run --name BUILD -dit \
--mount type=bind,src=$(pwd),dst=$(pwd) \
--workdir $(pwd) \
${{ env.BUILD_IMAGE }} /bin/sh
# Testing

- name: Test modularized distributions
if: (success() || failure()) && steps.container.outcome == 'success'
run: |
export MAKE="make -j2 --output-sync=recurse" SAGE_NUM_THREADS=4
make V=0 tox-ensure && make ${{ matrix.targets }}
shell: sh .ci/docker-exec-script.sh BUILD /sage {0}

test-long:
runs-on: ubuntu-latest
needs: [test-new]
Expand Down Expand Up @@ -589,6 +491,6 @@ jobs:

- name: Upload coverage to codecov
if: (success() || failure()) && steps.container.outcome == 'success'
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
directory: .coverage/coverage-report
23 changes: 23 additions & 0 deletions .github/workflows/changelog_trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Trigger Changelog Generation

on:
release:
types: [published]

jobs:
trigger-website-repo-workflow:
runs-on: ubuntu-latest
steps:
- name: Trigger Generate Changelog Workflow in website repo
if: "!github.event.release.prerelease"
env:
GITHUB_PAT: ${{ secrets.WEBSITE_ACCESS_TOKEN }}
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_PAT" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/sagemath/website/actions/workflows/generate_changelog.yml/dispatches \
-d '{"ref":"master","inputs":{"release_tag":"'"$RELEASE_TAG"'"}}'
21 changes: 5 additions & 16 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,12 @@ jobs:
# On pushes to tags or branches, test the whole matrix.
os: >-
${{ github.event_name == 'pull_request'
&& fromJson('["ubuntu-latest"]')
&& fromJson('["ubuntu-latest", "macos-latest"]')
|| fromJson('["ubuntu-latest", "macos-latest", "macos-13"]') }}
python: >-
${{ github.event_name == 'pull_request'
&& fromJson('["3.9"]')
|| fromJson('["3.9", "3.10", "3.11"]') }}
python: ['3.11', '3.12']
# Optional environment is disabled for now as its not yet working
# environment: [environment, environment-optional]
conda-env: [environment]
# On pull requests, only test two jobs:
# Ubuntu with Python 3.9, macOS (arm64) with Python 3.11.
# Build & Test currently uses Python 3.10 (on ubuntu-jammy).
# Together, they cover the supported minor Python versions.
include: >-
${{ github.event_name == 'pull_request'
&& fromJson('[{"os": "macos-latest", "python": "3.11", "conda-env": "environment"}]')
|| fromJson('[]') }}

steps:
- uses: actions/checkout@v4
Expand All @@ -59,7 +48,7 @@ jobs:
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ hashFiles('src/environment-3.11.yml') }}
${{ runner.os }}-conda-${{ hashFiles('environment-3.11.yml') }}

- name: Setup Conda environment
uses: conda-incubator/setup-miniconda@v3
Expand All @@ -69,8 +58,8 @@ jobs:
use-mamba: true
channels: conda-forge
channel-priority: true
activate-environment: sage
environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
activate-environment: sage-dev
environment-file: ${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml

- name: Print Conda environment
shell: bash -l {0}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
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.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: make dist
run: |
./configure --enable-download-from-upstream-url && make dist
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: "dist/*.tar.gz"
name: dist
Expand All @@ -119,7 +119,7 @@ jobs:
steps:
- uses: actions/checkout@v4
if: "!contains(matrix.tox_system_factor, 'nobootstrap')"
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
path: .
name: dist
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
run: |
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
if: always()
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: artifacts
name: ${{ env.LOGS_ARTIFACT_NAME }}
Expand Down
Loading

0 comments on commit 6808417

Please sign in to comment.