Skip to content

Commit b239392

Browse files
authored
Merge branch 'develop' into reseed_rng
2 parents 3e386bb + dc99dc8 commit b239392

File tree

1,298 files changed

+26257
-22504
lines changed

Some content is hidden

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

1,298 files changed

+26257
-22504
lines changed

.ci/write-dockerfile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ cat <<EOF
275275
FROM with-system-packages AS bootstrapped
276276
#:bootstrapping:
277277
RUN rm -rf /new /sage/.git
278-
$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/
278+
$ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap configure.ac sage .homebrew-build-env tox.ini .gitignore /new/
279279
$ADD config/config.rpath /new/config/config.rpath
280280
$ADD src/doc/bootstrap /new/src/doc/bootstrap
281281
$ADD src/bin /new/src/bin
282-
$ADD src/Pipfile.m4 src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/
282+
$ADD src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/
283283
$ADD m4 /new/m4
284284
$ADD pkgs /new/pkgs
285285
$ADD build /new/build

.devcontainer/onCreate-conda.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ conda config --env --add channels conda-forge
66
conda config --env --set channel_priority strict
77
conda update -y --all --override-channels -c conda-forge
88
conda install mamba=1 -n base -y
9-
mamba env create -y --file environment-dev-3.11-linux.yml || mamba env update -y --file environment-dev-3.11-linux.yml
9+
mamba env create -y --file environment-3.11-linux.yml || mamba env update -y --file environment-3.11-linux.yml
1010
conda init bash
1111

1212
# Build sage
13-
conda run -n sage-dev ./bootstrap
14-
conda run -n sage-dev pip install --no-build-isolation -v -v -e ./src
13+
conda run -n sage-dev pip install --no-build-isolation -v -v -e .

.github/workflows/build.yml

Lines changed: 3 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ concurrency:
2929
#
3030
# The three workflows:
3131
#
32-
# - build.yml (with jobs test-new, test-mod, test-long),
32+
# - build.yml (with jobs test-new, test-long),
3333
# - doc-build.yml,
3434
# - doc-build-pdf.yml
3535
#
@@ -50,7 +50,7 @@ concurrency:
5050
# This baseline is transparently improved by our use of the GH Actions cache,
5151
# see https://docs.docker.com/build/ci/github-actions/cache/#cache-backend-api.
5252
#
53-
# Jobs test-mod and test-long are only started after test-new completed;
53+
# Jobs test-long is only started after test-new completed;
5454
# but the workflows doc-build.yml and doc-build-pdf.yml are started independently.
5555
#
5656
# - When nothing is cached and the 3 workflows are launched in parallel,
@@ -254,104 +254,6 @@ jobs:
254254
./sage -t --long --format github -p4 ${{ steps.changed-files.outputs.doctests_all_changed_files }}
255255
shell: sh .ci/docker-exec-script.sh BUILD /sage {0}
256256

257-
test-mod:
258-
runs-on: ubuntu-latest
259-
needs: [test-new]
260-
services:
261-
# https://docs.docker.com/build/ci/github-actions/local-registry/
262-
registry:
263-
image: registry:2
264-
ports:
265-
- 5000:5000
266-
strategy:
267-
fail-fast: false
268-
matrix:
269-
targets:
270-
- sagemath_categories-check
271-
steps:
272-
- name: Maximize build disk space
273-
uses: easimon/maximize-build-space@v10
274-
with:
275-
# need space in /var for Docker images
276-
root-reserve-mb: 30000
277-
remove-dotnet: true
278-
remove-android: true
279-
remove-haskell: true
280-
remove-codeql: true
281-
remove-docker-images: true
282-
283-
- name: Checkout
284-
id: checkout
285-
uses: actions/checkout@v4
286-
287-
- name: Install test prerequisites
288-
# From docker.yml
289-
run: |
290-
sudo DEBIAN_FRONTEND=noninteractive apt-get update
291-
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
292-
sudo apt-get clean
293-
df -h
294-
295-
- name: Merge CI fixes from sagemath/sage
296-
# From docker.yml
297-
# This step needs to happen after the commit sha is put in DOCKER_TAG
298-
# so that multi-stage builds can work correctly.
299-
run: |
300-
.ci/merge-fixes.sh
301-
env:
302-
GH_TOKEN: ${{ github.token }}
303-
304-
# Building
305-
306-
- name: Generate Dockerfile
307-
# From docker.yml
308-
run: |
309-
tox -e ${{ env.TOX_ENV }}
310-
cp .tox/${{ env.TOX_ENV }}/Dockerfile .
311-
env:
312-
# Only generate the Dockerfile, do not run 'docker build' here
313-
DOCKER_TARGETS: ""
314-
315-
- name: Set up Docker Buildx
316-
uses: docker/setup-buildx-action@v3
317-
with:
318-
driver-opts: network=host
319-
320-
- name: Build Docker image
321-
id: image
322-
uses: docker/build-push-action@v6
323-
with:
324-
push: true
325-
load: false
326-
context: .
327-
tags: ${{ env.BUILD_IMAGE }}
328-
target: with-targets
329-
cache-from: type=gha
330-
cache-to: type=gha,mode=max
331-
build-args: |
332-
NUMPROC=6
333-
USE_MAKEFLAGS=-k V=0 SAGE_NUM_THREADS=4 --output-sync=recurse
334-
TARGETS_PRE=build/make/Makefile
335-
TARGETS=${{ needs.test-new.outputs.build_targets }}
336-
337-
- name: Start container
338-
id: container
339-
if: (success() || failure())
340-
run: |
341-
docker run --name BUILD -dit \
342-
--mount type=bind,src=$(pwd),dst=$(pwd) \
343-
--workdir $(pwd) \
344-
${{ env.BUILD_IMAGE }} /bin/sh
345-
346-
# Testing
347-
348-
- name: Test modularized distributions
349-
if: (success() || failure()) && steps.container.outcome == 'success'
350-
run: |
351-
export MAKE="make -j2 --output-sync=recurse" SAGE_NUM_THREADS=4
352-
make V=0 tox-ensure && make ${{ matrix.targets }}
353-
shell: sh .ci/docker-exec-script.sh BUILD /sage {0}
354-
355257
test-long:
356258
runs-on: ubuntu-latest
357259
needs: [test-new]
@@ -589,6 +491,6 @@ jobs:
589491

590492
- name: Upload coverage to codecov
591493
if: (success() || failure()) && steps.container.outcome == 'success'
592-
uses: codecov/codecov-action@v4
494+
uses: codecov/codecov-action@v5
593495
with:
594496
directory: .coverage/coverage-report
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Trigger Changelog Generation
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
trigger-website-repo-workflow:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger Generate Changelog Workflow in website repo
12+
if: "!github.event.release.prerelease"
13+
env:
14+
GITHUB_PAT: ${{ secrets.WEBSITE_ACCESS_TOKEN }}
15+
RELEASE_TAG: ${{ github.event.release.tag_name }}
16+
run: |
17+
curl -L \
18+
-X POST \
19+
-H "Accept: application/vnd.github+json" \
20+
-H "Authorization: Bearer $GITHUB_PAT" \
21+
-H "X-GitHub-Api-Version: 2022-11-28" \
22+
https://api.github.com/repos/sagemath/website/actions/workflows/generate_changelog.yml/dispatches \
23+
-d '{"ref":"master","inputs":{"release_tag":"'"$RELEASE_TAG"'"}}'

.github/workflows/ci-conda.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,12 @@ jobs:
2626
# On pushes to tags or branches, test the whole matrix.
2727
os: >-
2828
${{ github.event_name == 'pull_request'
29-
&& fromJson('["ubuntu-latest"]')
29+
&& fromJson('["ubuntu-latest", "macos-latest"]')
3030
|| fromJson('["ubuntu-latest", "macos-latest", "macos-13"]') }}
31-
python: >-
32-
${{ github.event_name == 'pull_request'
33-
&& fromJson('["3.9"]')
34-
|| fromJson('["3.9", "3.10", "3.11"]') }}
31+
python: ['3.11', '3.12']
3532
# Optional environment is disabled for now as its not yet working
3633
# environment: [environment, environment-optional]
3734
conda-env: [environment]
38-
# On pull requests, only test two jobs:
39-
# Ubuntu with Python 3.9, macOS (arm64) with Python 3.11.
40-
# Build & Test currently uses Python 3.10 (on ubuntu-jammy).
41-
# Together, they cover the supported minor Python versions.
42-
include: >-
43-
${{ github.event_name == 'pull_request'
44-
&& fromJson('[{"os": "macos-latest", "python": "3.11", "conda-env": "environment"}]')
45-
|| fromJson('[]') }}
4635

4736
steps:
4837
- uses: actions/checkout@v4
@@ -69,7 +58,7 @@ jobs:
6958
use-mamba: true
7059
channels: conda-forge
7160
channel-priority: true
72-
activate-environment: sage
61+
activate-environment: sage-dev
7362
environment-file: ${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
7463

7564
- name: Print Conda environment

.github/workflows/ci-linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
tox_packages_factors: >-
5151
["standard"]
5252
docker_push_repository: ghcr.io/${{ github.repository }}/
53+
logs_artifact: false
5354

5455
# All platforms. This duplicates the default platform, but why not,
5556
# it makes it more robust regarding random timeouts.

.github/workflows/ci-meson.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
os: [ubuntu]
26-
python: ['3.9', '3.10', '3.11']
26+
python: ['3.11', '3.12']
2727

2828
steps:
2929
- uses: actions/checkout@v4
@@ -47,14 +47,14 @@ jobs:
4747
key: ${{ runner.os }}-meson-${{ matrix.python }}
4848

4949
- name: Setup Conda environment
50-
uses: conda-incubator/setup-miniconda@v2
50+
uses: conda-incubator/setup-miniconda@v3
5151
with:
5252
python-version: ${{ matrix.python }}
5353
miniforge-version: latest
5454
use-mamba: true
5555
channels: conda-forge
5656
channel-priority: true
57-
activate-environment: sage
57+
activate-environment: sage-dev
5858
environment-file: environment-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml
5959

6060
- name: Print Conda environment
@@ -69,11 +69,23 @@ jobs:
6969
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
7070
export CC="ccache $CC"
7171
export CXX="ccache $CXX"
72-
pip install --no-build-isolation --config-settings=builddir=builddir . -v
72+
# Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda
73+
pip install --no-build-isolation --no-deps --config-settings=builddir=builddir . -v
74+
75+
- name: Verify dependencies
76+
shell: bash -l {0}
77+
run: pip check
7378

7479
- name: Test
7580
shell: bash -l {0}
7681
run: |
7782
# We don't install sage_setup, so don't try to test it
7883
rm -R ./src/sage_setup/
7984
./sage -t --all -p4
85+
86+
- name: Upload log
87+
uses: actions/[email protected]
88+
if: failure()
89+
with:
90+
name: ${{ runner.os }}-meson-${{ matrix.python }}-log
91+
path: builddir/meson-logs/

.github/workflows/conda-lock-update.py

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

.github/workflows/dist.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,38 @@ jobs:
119119
with:
120120
name: dist
121121
path: dist
122-
- uses: softprops/action-gh-release@v2
122+
- name: Create release
123+
env:
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125+
run: |
126+
latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
127+
| jq -r 'sort_by(.created_at) | last(.[]).tag_name')
128+
release_notes=$(curl -s \
129+
-X POST \
130+
-H "Accept: application/vnd.github+json" \
131+
-H "Authorization: Bearer $GITHUB_TOKEN" \
132+
-H "X-GitHub-Api-Version: 2022-11-28" \
133+
https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \
134+
-d "{
135+
\"tag_name\": \"${{ github.ref_name }}\",
136+
\"previous_tag_name\": \"$latest_release_tag\"
137+
}" | jq -r '.body')
138+
# escape special characters for json
139+
release_notes=$(jq -R -s '.' <<< "$release_notes")
140+
curl -L \
141+
-X POST \
142+
-H "Accept: application/vnd.github+json" \
143+
-H "Authorization: Bearer $GITHUB_TOKEN" \
144+
-H "X-GitHub-Api-Version: 2022-11-28" \
145+
https://api.github.com/repos/${{ github.repository }}/releases \
146+
-d "{
147+
\"tag_name\": \"${{ github.ref_name }}\",
148+
\"prerelease\": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }},
149+
\"body\": $release_notes
150+
}"
151+
- name: Create release assets
152+
uses: softprops/action-gh-release@v2
123153
with:
124-
generate_release_notes: true
125-
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
126154
files: |
127155
dist/*
128156
upstream/*

0 commit comments

Comments
 (0)