Skip to content

Commit

Permalink
Merge branch 'develop' into binomial
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Sep 13, 2023
2 parents adb2e06 + 4103129 commit 65c3e72
Show file tree
Hide file tree
Showing 2,196 changed files with 58,594 additions and 46,241 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/ci-linux-incremental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
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
workflow_dispatch:

concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
packages: write

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,-,_,g;s,(build/)?pkgs/([-_.a-z0-9]*)/[^ ]* *,\2-ensure,;'; done | sort -u))" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
minimal:
needs: [changed_files]
if: |
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
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.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"]
tox_packages_factors: >-
["standard",
"minimal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
50 changes: 50 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,56 @@ jobs:
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/

standard-sitepackages:
if: ${{ success() || failure() }}
needs: [standard-pre]
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-kinetic",
"ubuntu-lunar",
"ubuntu-mantic",
"debian-bullseye",
"debian-bookworm",
"debian-trixie",
"debian-sid",
"linuxmint-21",
"linuxmint-21.1",
"linuxmint-21.2",
"fedora-33",
"fedora-34",
"fedora-35",
"fedora-36",
"fedora-37",
"fedora-38",
"fedora-39",
"centos-stream-8-python3.9",
"centos-stream-9-python3.9",
"almalinux-8-python3.9",
"gentoo-python3.10",
"gentoo-python3.11",
"archlinux-latest",
"opensuse-15.4-gcc_11-python3.10",
"opensuse-15.5-gcc_11-python3.11",
"opensuse-tumbleweed-python3.10",
"opensuse-tumbleweed",
"debian-bullseye-i386"]
docker_push_repository: ghcr.io/${{ github.repository }}/
max_parallel: 10

minimal-pre:
if: ${{ success() || failure() }}
# It does not really "need" it.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
#
CIBW_ARCHS: ${{ matrix.arch }}
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
# Environment during wheel build
CIBW_ENVIRONMENT: "PATH=$(pwd)/local/bin:$PATH CPATH=$(pwd)/local/include:$CPATH LIBRARY_PATH=$(pwd)/local/lib:$LIBRARY_PATH PKG_CONFIG_PATH=$(pwd)/local/share/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal"
# Use 'build', not 'pip wheel'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
# incremental docbuild may introduce broken links (inter-file references) though build succeeds
run: |
set -ex
export SAGE_USE_CDNS=yes
mv /sage/local/share/doc/sage/html/en/.git /sage/.git-doc
make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage
mkdir -p /sage/local/share/doc/sage/html/en/ && mv /sage/.git-doc /sage/local/share/doc/sage/html/en/.git
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,24 @@ on:
default: >-
["ubuntu-trusty-toolchain-gcc_9",
"ubuntu-xenial-toolchain-gcc_9",
"ubuntu-bionic-gcc_8-python3.8",
"ubuntu-bionic-gcc_8",
"ubuntu-focal",
"ubuntu-jammy",
"ubuntu-kinetic",
"ubuntu-lunar",
"ubuntu-mantic",
"debian-buster",
"debian-buster-gcc_spkg",
"debian-bullseye",
"debian-bookworm",
"debian-trixie",
"debian-sid",
"linuxmint-19-gcc_8-python3.8",
"linuxmint-19.3-gcc_8-python3.8",
"linuxmint-20.1",
"linuxmint-20.2",
"linuxmint-20.3",
"linuxmint-21",
"linuxmint-21.1",
"linuxmint-21.2",
"fedora-29-python3.8",
"fedora-30-python3.8",
"fedora-30",
"fedora-31",
"fedora-32",
"fedora-33",
Expand All @@ -59,9 +57,9 @@ on:
"opensuse-15.4-gcc_11-python3.10",
"opensuse-15.5-gcc_11-python3.11",
"opensuse-tumbleweed-python3.10",
"opensuse-tumbleweed",
"conda-forge",
"ubuntu-bionic-gcc_8-i386",
"debian-buster-i386",
"debian-bullseye-i386",
]
tox_packages_factors:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install pycodestyle
run: pip install tox pycodestyle
- name: Lint using pycodestyle
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install relint
run: pip install tox relint
- name: Lint using relint
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9
- name: Install tox
run: pip install tox
- name: Lint using tox -e rst
Expand Down
Loading

0 comments on commit 65c3e72

Please sign in to comment.