Skip to content

Commit 800a1e9

Browse files
committed
Merge branch 'develop' into refactor_drinfeld_modules_classes
2 parents 56f0e29 + 2f1a76d commit 800a1e9

File tree

820 files changed

+6924
-5030
lines changed

Some content is hidden

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

820 files changed

+6924
-5030
lines changed

.ci/merge-fixes.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
# Merge open PRs from sagemath/sage labeled "blocker".
3+
REPO="sagemath/sage"
4+
GH="gh -R $REPO"
5+
PRs="$($GH pr list --label "p: blocker / 1" --json number --jq '.[].number')"
6+
if [ -z "$PRs" ]; then
7+
echo 'Nothing to do: Found no open PRs with "blocker" status.'
8+
else
9+
echo "Found PRs: " $PRs
10+
export GIT_AUTHOR_NAME="ci-sage workflow"
11+
export GIT_AUTHOR_EMAIL="[email protected]"
12+
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
13+
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
14+
git tag -f test_base
15+
git commit -q -m "Uncommitted changes" --no-allow-empty -a
16+
for a in $PRs; do
17+
echo "::group::Merging PR https://github.com/$REPO/pull/$a"
18+
git tag -f test_head
19+
$GH pr checkout -b pr-$a $a
20+
git fetch --unshallow --all
21+
git checkout -q test_head
22+
if git merge --no-edit --squash -q pr-$a; then
23+
echo "::endgroup::"
24+
if git commit -q -m "Merge https://github.com/$REPO/pull/$a" -a --no-allow-empty; then
25+
echo "Merged #$a"
26+
else
27+
echo "Empty, skipped"
28+
fi
29+
else
30+
echo "::endgroup::"
31+
echo "Failure merging #$a, resetting"
32+
git reset --hard
33+
fi
34+
done
35+
git log test_base..HEAD
36+
fi

.github/workflows/build.yml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ name: Build & Test
22

33
on:
44
pull_request:
5+
merge_group:
56
push:
6-
branches: ['**']
7+
branches:
8+
- master
9+
- develop
710
# Ignore pushes on tags to prevent two uploads of codecov reports
811
tags-ignore: ['**']
912
workflow_dispatch:
@@ -24,9 +27,32 @@ concurrency:
2427
cancel-in-progress: true
2528

2629
jobs:
30+
get_ci_fixes:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
id: checkout
35+
uses: actions/checkout@v4
36+
- name: Merge CI fixes from sagemath/sage
37+
run: |
38+
.ci/merge-fixes.sh
39+
env:
40+
GH_TOKEN: ${{ github.token }}
41+
- name: Store CI fixes in upstream artifact
42+
run: |
43+
mkdir -p upstream
44+
if git format-patch --stdout test_base > ci_fixes.patch; then
45+
cp ci_fixes.patch upstream/
46+
fi
47+
- uses: actions/upload-artifact@v3
48+
with:
49+
path: upstream
50+
name: upstream
51+
2752
build:
2853
runs-on: ubuntu-latest
2954
container: ghcr.io/sagemath/sage/sage-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
55+
needs: [get_ci_fixes]
3056
steps:
3157
- name: Checkout
3258
id: checkout
@@ -68,6 +94,19 @@ jobs:
6894
if [ ! -f worktree-image/.gitignore ]; then cp .gitignore worktree-image/; fi
6995
(cd worktree-image && git add -A && git commit --quiet --allow-empty -m "old" -a && git tag -f old && git reset --hard new && git reset --quiet old && git add -N . && git status)
7096
97+
- name: Download upstream artifact
98+
uses: actions/download-artifact@v3
99+
with:
100+
path: upstream
101+
name: upstream
102+
103+
- name: Apply CI fixes from sagemath/sage
104+
# After applying the fixes, make sure all changes are marked as uncommitted changes.
105+
run: |
106+
if [ -r upstream/ci_fixes.patch ]; then
107+
(cd worktree-image && git commit -q -m "current changes" --allow-empty -a && git am; git reset --quiet old; git add -N .) < upstream/ci_fixes.patch
108+
fi
109+
71110
- name: Incremental build, test changed files (sage -t --new)
72111
id: incremental
73112
run: |
@@ -76,15 +115,15 @@ jobs:
76115
./bootstrap && make build && ./sage -t --new -p2
77116
working-directory: ./worktree-image
78117
env:
79-
MAKE: make -j2
118+
MAKE: make -j2 --output-sync=recurse
80119
SAGE_NUM_THREADS: 2
81120

82121
- name: Build and test modularized distributions
83122
if: always() && steps.worktree.outcome == 'success'
84123
run: make V=0 tox && make pypi-wheels
85124
working-directory: ./worktree-image
86125
env:
87-
MAKE: make -j2
126+
MAKE: make -j2 --output-sync=recurse
88127
SAGE_NUM_THREADS: 2
89128

90129
- name: Set up node to install pyright
@@ -123,7 +162,7 @@ jobs:
123162
make build
124163
working-directory: ./worktree-image
125164
env:
126-
MAKE: make -j2
165+
MAKE: make -j2 --output-sync=recurse
127166
SAGE_NUM_THREADS: 2
128167

129168
- name: Pytest

.github/workflows/ci-conda.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ on:
77
branches:
88
- 'public/build/**-runci'
99
pull_request:
10-
types:
11-
# Defaults
12-
- opened
13-
- synchronize
14-
- reopened
15-
# When a CI label is added
16-
- labeled
1710
workflow_dispatch:
1811
# Allow to run manually
1912

@@ -27,20 +20,9 @@ jobs:
2720
name: Conda
2821
runs-on: ${{ matrix.os }}
2922

30-
# Run on push, workflow dispatch and when certain labels are added or are present
31-
if: |
32-
github.event_name != 'pull_request' ||
33-
((github.event.action != 'labeled' &&
34-
(contains(github.event.pull_request.labels.*.name, 'c: packages: standard') ||
35-
contains(github.event.pull_request.labels.*.name, 'c: packages: optional') ||
36-
contains(github.event.pull_request.labels.*.name, 's: run conda ci'))) ||
37-
(github.event.action == 'labeled' &&
38-
(github.event.label.name == 'c: packages: optional' ||
39-
github.event.label.name == 'c: packages: standard' ||
40-
github.event.label.name == 's: run conda ci')))
41-
4223
strategy:
43-
fail-fast: false
24+
fail-fast: ${{ github.event_name == 'pull_request' }}
25+
max-parallel: ${{ github.event_name == 'pull_request' && 2 || 6 }}
4426
matrix:
4527
os: [ubuntu-latest, macos-latest]
4628
python: ['3.9', '3.10', '3.11']
@@ -51,6 +33,12 @@ jobs:
5133
steps:
5234
- uses: actions/checkout@v4
5335

36+
- name: Merge CI fixes from sagemath/sage
37+
run: |
38+
.ci/merge-fixes.sh
39+
env:
40+
GH_TOKEN: ${{ github.token }}
41+
5442
- name: Check for Miniconda
5543
id: check_conda
5644
run: echo ::set-output name=installed::$CONDA
@@ -99,9 +87,6 @@ jobs:
9987
echo "::remove-matcher owner=configure-system-package-warning::"
10088
echo "::remove-matcher owner=configure-system-package-error::"
10189
102-
# Manually install ptyprocess for now, until https://github.com/sagemath/sage/issues/32147 is fixed
103-
pip install --no-build-isolation -v -v ptyprocess==0.5.1
104-
10590
- name: Build
10691
shell: bash -l {0}
10792
run: |

.github/workflows/ci-cygwin-standard.yml

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

.github/workflows/ci-linux-incremental.yml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ jobs:
6060
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
6161
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
6262
cat $GITHUB_OUTPUT
63-
minimal:
63+
64+
test:
6465
needs: [changed_files]
6566
if: |
6667
github.event_name != 'pull_request' ||
@@ -94,3 +95,38 @@ jobs:
9495
["standard",
9596
"minimal"]
9697
docker_push_repository: ghcr.io/${{ github.repository }}/
98+
99+
site:
100+
needs: [changed_files]
101+
if: |
102+
github.event_name != 'pull_request' ||
103+
((github.event.action != 'labeled' &&
104+
(contains(github.event.pull_request.labels.*.name, 'c: packages: standard') ||
105+
contains(github.event.pull_request.labels.*.name, 'c: packages: optional'))) ||
106+
(github.event.action == 'labeled' &&
107+
(github.event.label.name == 'c: packages: optional' ||
108+
github.event.label.name == 'c: packages: standard')))
109+
uses: ./.github/workflows/docker.yml
110+
with:
111+
# Build incrementally from published Docker image
112+
incremental: true
113+
free_disk_space: true
114+
from_docker_repository: ghcr.io/sagemath/sage/
115+
from_docker_target: "with-targets"
116+
from_docker_tag: "dev"
117+
docker_targets: "with-targets"
118+
targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
119+
# Only test systems with a usable system python (>= 3.9)
120+
tox_system_factors: >-
121+
["ubuntu-jammy",
122+
"ubuntu-mantic",
123+
"debian-bullseye",
124+
"debian-bookworm",
125+
"fedora-33",
126+
"fedora-38",
127+
"gentoo-python3.11",
128+
"archlinux",
129+
"debian-bullseye-i386"]
130+
tox_packages_factors: >-
131+
["standard-sitepackages"]
132+
docker_push_repository: ghcr.io/${{ github.repository }}/

0 commit comments

Comments
 (0)