Skip to content

Commit b4cdf87

Browse files
authored
Merge branch 'develop' into lattice_functions
2 parents 2717cb0 + 4cdd703 commit b4cdf87

File tree

333 files changed

+5248
-2589
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+5248
-2589
lines changed

.devcontainer/portability-archlinux-latest-minimal/devcontainer.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.devcontainer/portability-archlinux-latest-minimal/portability-Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/portability-archlinux-latest-standard/devcontainer.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.devcontainer/portability-archlinux-latest-standard/portability-Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM archlinux
2+
RUN pacman -Syu --noconfirm bash git python
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// See https://aka.ms/devcontainer.json for format details.
2+
{
3+
"name": "archlinux",
4+
//"image": "archlinux",
5+
"dockerFile": "Dockerfile",
6+
"onCreateCommand": ".devcontainer/onCreate-meson.sh || true",
7+
"features": {
8+
// Git feature is not compatible with Arch Linux, so we install it manually in the Dockerfile
9+
// https://github.com/devcontainers/features/issues/824
10+
//"ghcr.io/devcontainers/features/git": {},
11+
//"ghcr.io/devcontainers/features/python:1": {},
12+
"../uv": {
13+
"version": "latest"
14+
}
15+
},
16+
"customizations": {
17+
"vscode": {
18+
"extensions": [
19+
"ms-python.python"
20+
]
21+
}
22+
}
23+
}

.github/workflows/ci-meson.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
tests: 'new'
3737
# one additional editable run in pull_request, this has no effect if not pull_request
3838
- os: 'ubuntu'
39-
python: 3.12
39+
python: '3.12'
4040
editable: true
4141
tests: 'all'
4242
- os: windows
@@ -185,5 +185,5 @@ jobs:
185185
uses: actions/[email protected]
186186
if: failure()
187187
with:
188-
name: ${{ runner.os }}-meson-${{ matrix.python }}${{ matrix.editable && '-editable' || '' }}-log
188+
name: ${{ runner.os }}-meson-${{ matrix.python }}${{ matrix.editable && '-editable' || '' }}${{ matrix.tests == 'new' && '-new' || '' }}-log
189189
path: builddir/meson-logs/

.github/workflows/ci.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- fedora:41
2424
- fedora:42
2525
- ghcr.io/void-linux/void-glibc-full
26+
- archlinux
2627
#- ubuntu:22.04 - fails due to issue with cypari2
2728
#- ubuntu:24.04 - fails due to issue with cypari2
2829
- ubuntu:25.04
@@ -38,6 +39,11 @@ jobs:
3839
# node-based actions require libstdc++.so.6
3940
xbps-install -Sy libstdc++ bash git
4041
fi
42+
if [ "${{ matrix.container }}" = "archlinux" ]; then
43+
# The archlinux container is configured to not install docs by default
44+
# but we need the maxima help to be in place
45+
sed -i '/^NoExtract/d' /etc/pacman.conf
46+
fi
4147
4248
- name: Checkout code
4349
# cannot use v4 yet because of https://github.com/actions/checkout/issues/1487
@@ -51,7 +57,11 @@ jobs:
5157
- name: Set up Python
5258
run: |
5359
uv python install
54-
uv venv
60+
if [ "${{ matrix.container }}" = "ghcr.io/void-linux/void-glibc-full" ] || [ "${{ matrix.container }}" = "archlinux" ]; then
61+
uv venv --system-site-packages
62+
else
63+
uv venv
64+
fi
5565
. .venv/bin/activate
5666
echo PATH=$PATH >> $GITHUB_ENV
5767

.github/workflows/dist.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' && github.event_name != 'pull_request' }}
8686
steps:
8787
- uses: actions/checkout@v4
88-
88+
8989
- name: Setup Conda environment
9090
uses: conda-incubator/setup-miniconda@v3
9191
with:
@@ -141,14 +141,14 @@ jobs:
141141
path: dist
142142
- name: Create release
143143
env:
144-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144+
GITHUB_PAT: ${{ secrets.RELEASE_CREATION_TOKEN }}
145145
run: |
146146
latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
147147
| jq -r 'sort_by(.created_at) | last(.[]).tag_name')
148148
release_notes=$(curl -s \
149149
-X POST \
150150
-H "Accept: application/vnd.github+json" \
151-
-H "Authorization: Bearer $GITHUB_TOKEN" \
151+
-H "Authorization: Bearer $GITHUB_PAT" \
152152
-H "X-GitHub-Api-Version: 2022-11-28" \
153153
https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \
154154
-d "{
@@ -160,7 +160,7 @@ jobs:
160160
curl -L \
161161
-X POST \
162162
-H "Accept: application/vnd.github+json" \
163-
-H "Authorization: Bearer $GITHUB_TOKEN" \
163+
-H "Authorization: Bearer $GITHUB_PAT" \
164164
-H "X-GitHub-Api-Version: 2022-11-28" \
165165
https://api.github.com/repos/${{ github.repository }}/releases \
166166
-d "{
@@ -174,6 +174,8 @@ jobs:
174174
files: |
175175
dist/*
176176
upstream/*
177+
token: ${{ secrets.GITHUB_TOKEN }}
178+
tag_name: ${{ github.ref_name }}
177179
permissions:
178180
contents: write
179181

.github/workflows/doc-build-pdf.yml

Lines changed: 51 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -2,148 +2,93 @@ name: Build documentation (PDF)
22

33
on:
44
pull_request:
5+
merge_group:
56
push:
7+
tags:
8+
# Match all release tags including beta, rc
9+
- '[0-9]+.[0-9]+'
10+
- '[0-9]+.[0-9]+.[0-9]+'
11+
- '[0-9]+.[0-9]+.beta[0-9]+'
12+
- '[0-9]+.[0-9]+.[0-9]+.beta[0-9]+'
13+
- '[0-9]+.[0-9]+.rc[0-9]+'
14+
- '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+'
15+
branches:
16+
- develop
617
workflow_dispatch:
718
# Allow to run manually
8-
inputs:
9-
platform:
10-
description: 'Platform'
11-
required: true
12-
default: 'ubuntu-noble-standard'
13-
docker_tag:
14-
description: 'Docker tag'
15-
required: true
16-
default: 'dev'
1719

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

2325
env:
24-
# Same as in build.yml
25-
TOX_ENV: "docker-${{ github.event.inputs.platform || 'ubuntu-noble-standard' }}-incremental"
26-
BUILD_IMAGE: "localhost:5000/${{ github.repository }}/sage-${{ github.event.inputs.platform || 'ubuntu-noble-standard' }}-with-targets:ci"
27-
FROM_DOCKER_REPOSITORY: "ghcr.io/sagemath/sage/"
28-
FROM_DOCKER_TARGET: "with-targets"
29-
FROM_DOCKER_TAG: ${{ github.event.inputs.docker_tag || 'dev'}}
30-
EXTRA_CONFIGURE_ARGS: --enable-fat-binary
26+
PYTHON_VERSION: 3.11
3127

3228
jobs:
33-
build-doc-pdf:
29+
doc-pdf:
3430
runs-on: ubuntu-latest
35-
services:
36-
# https://docs.docker.com/build/ci/github-actions/local-registry/
37-
registry:
38-
image: registry:2
39-
ports:
40-
- 5000:5000
4131
steps:
42-
- name: Maximize build disk space
43-
uses: easimon/maximize-build-space@v10
44-
with:
45-
# need space in /var for Docker images
46-
root-reserve-mb: 30000
47-
remove-dotnet: true
48-
remove-android: true
49-
remove-haskell: true
50-
remove-codeql: true
51-
remove-docker-images: true
5232
- name: Checkout
5333
uses: actions/checkout@v4
54-
- name: Install test prerequisites
55-
# From docker.yml
56-
run: |
57-
sudo DEBIAN_FRONTEND=noninteractive apt-get update
58-
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
59-
sudo apt-get clean
60-
df -h
34+
6135
- name: Merge CI fixes from sagemath/sage
6236
run: |
63-
mkdir -p upstream
64-
.github/workflows/merge-fixes.sh 2>&1 | tee upstream/ci_fixes.log
37+
.github/workflows/merge-fixes.sh
6538
env:
6639
GH_TOKEN: ${{ github.token }}
67-
SAGE_CI_FIXES_FROM_REPOSITORIES: ${{ vars.SAGE_CI_FIXES_FROM_REPOSITORIES }}
68-
69-
# Building
70-
71-
- name: Generate Dockerfile
72-
# From docker.yml
73-
run: |
74-
tox -e ${{ env.TOX_ENV }}
75-
cp .tox/${{ env.TOX_ENV }}/Dockerfile .
76-
env:
77-
# Only generate the Dockerfile, do not run 'docker build' here
78-
DOCKER_TARGETS: ""
7940

80-
- name: Set up Docker Buildx
81-
uses: docker/setup-buildx-action@v3
41+
- name: Cache conda packages
42+
uses: actions/cache@v4
8243
with:
83-
driver-opts: network=host
84-
85-
- name: Build Docker image
86-
id: image
87-
uses: docker/build-push-action@v6
44+
path: ~/conda_pkgs_dir
45+
key:
46+
${{ runner.os }}-conda-${{ hashFiles('environment-${{ env.PYTHON_VERSION }}-linux.yml') }}
47+
48+
- name: Compiler cache
49+
uses: hendrikmuhs/[email protected]
8850
with:
89-
# push and load may not be set together at the moment
90-
push: true
91-
load: false
92-
context: .
93-
tags: ${{ env.BUILD_IMAGE }}
94-
target: with-targets
95-
cache-from: type=gha
96-
cache-to: type=gha,mode=max
97-
build-args: |
98-
NUMPROC=6
99-
USE_MAKEFLAGS=-k V=0 SAGE_NUM_THREADS=4 --output-sync=recurse
100-
TARGETS_PRE=build/make/Makefile
101-
TARGETS=ci-build-with-fallback
102-
103-
- name: Start container
104-
id: container
105-
# Try to continue when "exporting to GitHub Actions Cache" failed with timeout
106-
if: (success() || failure())
107-
run: |
108-
docker run --name BUILD -dit \
109-
--mount type=bind,src=$(pwd),dst=$(pwd) \
110-
--workdir $(pwd) \
111-
${{ env.BUILD_IMAGE }} /bin/sh
51+
key: ${{ runner.os }}-meson-${{ env.PYTHON_VERSION }}
11252

113-
#
114-
# On PRs and pushes to branches
115-
#
116-
117-
- name: Update system packages
118-
id: packages
119-
if: (success() || failure()) && steps.container.outcome == 'success'
53+
- name: Setup Conda environment
54+
uses: conda-incubator/setup-miniconda@v3
55+
with:
56+
python-version: ${{ env.PYTHON_VERSION }}
57+
# Disabled for now due to
58+
# https://github.com/conda-incubator/setup-miniconda/issues/379
59+
# miniforge-version: latest
60+
use-mamba: true
61+
channels: conda-forge
62+
channel-priority: true
63+
activate-environment: sage-dev
64+
environment-file: environment-${{ env.PYTHON_VERSION }}-linux.yml
65+
66+
- name: Build Sage
67+
shell: bash -l {0}
12068
run: |
121-
export PATH="build/bin:$PATH"
122-
eval $(sage-print-system-package-command auto update)
123-
eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip)
124-
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive texlive_luatex free_fonts xindy)
125-
shell: sh .github/workflows/docker-exec-script.sh BUILD /sage {0}
69+
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
70+
export CC="ccache $CC"
71+
export CXX="ccache $CXX"
72+
pip install --no-build-isolation --config-settings=builddir=builddir . -v
12673
127-
- name: Build doc (PDF)
128-
id: docbuild
129-
if: (success() || failure()) && steps.packages.outcome == 'success'
74+
- name: Build documentation
75+
shell: bash -l {0}
13076
run: |
131-
export MAKE="make -j5 --output-sync=recurse" SAGE_NUM_THREADS=5
132-
make doc-clean doc-uninstall; make sagemath_doc_html-build-deps sagemath_doc_pdf-no-deps
133-
shell: sh .github/workflows/docker-exec-script.sh BUILD /sage {0}
77+
sudo DEBIAN_FRONTEND=noninteractive sudo apt-get update
78+
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian texlive texlive_luatex free_fonts xindy)
79+
meson compile -C builddir doc-pdf
80+
env:
81+
SAGE_DOCBUILD_OPTS: "--include-tests-blocks"
13482

13583
- name: Copy doc
13684
id: copy
137-
if: (success() || failure()) && steps.docbuild.outcome == 'success'
13885
run: |
13986
mkdir -p ./doc
140-
# We copy everything to a local folder
141-
docker cp BUILD:/sage/local/share/doc/sage/pdf doc
87+
cp -r builddir/src/doc/pdf doc/
14288
# Zip everything for increased performance
14389
zip -r doc-pdf.zip doc
14490
14591
- name: Upload doc
146-
if: (success() || failure()) && steps.copy.outcome == 'success'
14792
uses: actions/upload-artifact@v4
14893
with:
14994
name: doc-pdf

0 commit comments

Comments
 (0)