Skip to content

Commit 1a9f82d

Browse files
authored
Merge branch 'develop' into develop
2 parents 59c59ee + 80f6d77 commit 1a9f82d

File tree

2,463 files changed

+68887
-52697
lines changed

Some content is hidden

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

2,463 files changed

+68887
-52697
lines changed

.github/sync_labels.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ReviewDecision(Enum):
5656
"""
5757
changes_requested = 'CHANGES_REQUESTED'
5858
approved = 'APPROVED'
59-
unclear = 'COMMENTED'
59+
unclear = 'UNCLEAR'
6060

6161
class Priority(Enum):
6262
r"""
@@ -319,12 +319,15 @@ def get_review_decision(self):
319319
return None
320320

321321
if self._review_decision is not None:
322+
if self._review_decision == ReviewDecision.unclear:
323+
return None
322324
return self._review_decision
323325

324326
data = self.view('reviewDecision')
325327
if data:
326328
self._review_decision = ReviewDecision(data)
327329
else:
330+
# To separate a not supplied value from not cached (see https://github.com/sagemath/sage/pull/36177#issuecomment-1704022893 ff)
328331
self._review_decision = ReviewDecision.unclear
329332
info('Review decision for %s: %s' % (self._issue, self._review_decision.value))
330333
return self._review_decision
@@ -349,9 +352,9 @@ def get_reviews(self, complete=False):
349352
self.get_commits()
350353

351354
date = self._commit_date
352-
no_rev = ReviewDecision.unclear.value
355+
unproper_rev = RevState.commented.value
353356
new_revs = [rev for rev in self._reviews if rev['submittedAt'] > date]
354-
proper_new_revs = [rev for rev in new_revs if rev['state'] != no_rev]
357+
proper_new_revs = [rev for rev in new_revs if rev['state'] != unproper_rev]
355358
info('Proper reviews after %s for %s: %s' % (date, self._issue, proper_new_revs))
356359
return proper_new_revs
357360

@@ -463,11 +466,6 @@ def approve_allowed(self):
463466
r"""
464467
Return if the actor has permission to approve this PR.
465468
"""
466-
revs = self.get_reviews(complete=True)
467-
if not any(rev['authorAssociation'] in ('MEMBER', 'OWNER') for rev in revs):
468-
info('PR %s can\'t be approved because of missing member review' % (self._issue))
469-
return False
470-
471469
revs = self.get_reviews()
472470
revs = [rev for rev in revs if rev['author']['login'] != self._actor]
473471
ch_req = ReviewDecision.changes_requested

.github/workflows/build.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
steps:
3131
- name: Checkout
3232
id: checkout
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3434

3535
- name: Update system packages
3636
id: prepare
@@ -103,12 +103,24 @@ jobs:
103103
run: pyright
104104
working-directory: ./worktree-image
105105

106-
- name: Build (fallback to non-incremental)
107-
id: build
106+
- name: Clean (fallback to non-incremental)
107+
id: clean
108108
if: always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success'
109109
run: |
110110
set -ex
111-
./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status && make build
111+
./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status
112+
working-directory: ./worktree-image
113+
env:
114+
MAKE: make -j2
115+
SAGE_NUM_THREADS: 2
116+
117+
- name: Build
118+
# This step is needed because building the modularized distributions installs some optional packages,
119+
# so the editable install of sagelib needs to build the corresponding optional extension modules.
120+
id: build
121+
if: always() && (steps.incremental.outcome == 'success' || steps.clean.outcome == 'success')
122+
run: |
123+
make build
112124
working-directory: ./worktree-image
113125
env:
114126
MAKE: make -j2
@@ -125,22 +137,22 @@ jobs:
125137
COLUMNS: 120
126138

127139
- name: Test all files (sage -t --all --long)
128-
if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
140+
if: always() && steps.build.outcome == 'success'
129141
run: |
130142
../sage -python -m pip install coverage
131143
../sage -python -m coverage run ./bin/sage-runtests --all --long -p2 --random-seed=286735480429121101562228604801325644303
132144
working-directory: ./worktree-image/src
133145

134146
- name: Prepare coverage results
135-
if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
147+
if: always() && steps.build.outcome == 'success'
136148
run: |
137149
./venv/bin/python3 -m coverage combine src/.coverage/
138150
./venv/bin/python3 -m coverage xml
139151
find . -name *coverage*
140152
working-directory: ./worktree-image
141153

142154
- name: Upload coverage to codecov
143-
if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
155+
if: always() && steps.build.outcome == 'success'
144156
uses: codecov/codecov-action@v3
145157
with:
146158
files: ./worktree-image/coverage.xml

.github/workflows/ci-conda.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
- 'public/build/**-runci'
99
pull_request:
1010
types:
11+
# Defaults
12+
- opened
13+
- synchronize
14+
- reopened
15+
# When a CI label is added
1116
- labeled
1217
workflow_dispatch:
1318
# Allow to run manually
@@ -21,13 +26,18 @@ jobs:
2126
test:
2227
name: Conda
2328
runs-on: ${{ matrix.os }}
24-
25-
# Run on push, workflow dispatch and when certain labels are added
29+
30+
# Run on push, workflow dispatch and when certain labels are added or are present
2631
if: |
27-
github.event.action != 'labeled' ||
28-
github.event.label.name == 'c: packages: optional' ||
29-
github.event.label.name == 'c: packages: standard' ||
30-
github.event.label.name == 's: run conda ci'
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')))
3141
3242
strategy:
3343
fail-fast: false
@@ -39,7 +49,7 @@ jobs:
3949
conda-env: [environment]
4050

4151
steps:
42-
- uses: actions/checkout@v3
52+
- uses: actions/checkout@v4
4353

4454
- name: Check for Miniconda
4555
id: check_conda
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: CI Linux incremental
2+
3+
## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
4+
## whenever a GitHub pull request is opened or synchronized in a repository
5+
## where GitHub Actions are enabled.
6+
##
7+
## It builds and checks some sage spkgs as defined in TARGETS.
8+
##
9+
## A job succeeds if there is no error.
10+
##
11+
## The build is run with "make V=0", so the build logs of individual packages are suppressed.
12+
##
13+
## At the end, all package build logs that contain an error are printed out.
14+
##
15+
## After all jobs have finished (or are canceled) and a short delay,
16+
## tar files of all logs are made available as "build artifacts".
17+
18+
on:
19+
pull_request:
20+
types:
21+
# Defaults
22+
- opened
23+
- synchronize
24+
- reopened
25+
# When a CI label is added
26+
- labeled
27+
workflow_dispatch:
28+
29+
concurrency:
30+
# Cancel previous runs of this workflow for the same branch
31+
group: ${{ github.workflow }}-${{ github.ref }}
32+
cancel-in-progress: true
33+
34+
permissions:
35+
packages: write
36+
37+
jobs:
38+
39+
changed_files:
40+
runs-on: ubuntu-latest
41+
name: List changed packages
42+
outputs:
43+
uninstall_targets: ${{ steps.build-targets.outputs.uninstall_targets }}
44+
build_targets: ${{ steps.build-targets.outputs.build_targets }}
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: Get all packages that have changed
48+
id: changed-packages
49+
uses: tj-actions/changed-files@v38
50+
with:
51+
files_yaml: |
52+
configures:
53+
- 'build/pkgs/*/spkg-configure.m4'
54+
pkgs:
55+
- 'build/pkgs/**'
56+
- 'pkgs/**'
57+
- name: Determine targets to build
58+
id: build-targets
59+
run: |
60+
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
61+
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
62+
cat $GITHUB_OUTPUT
63+
minimal:
64+
needs: [changed_files]
65+
if: |
66+
github.event_name != 'pull_request' ||
67+
((github.event.action != 'labeled' &&
68+
(contains(github.event.pull_request.labels.*.name, 'c: packages: standard') ||
69+
contains(github.event.pull_request.labels.*.name, 'c: packages: optional'))) ||
70+
(github.event.action == 'labeled' &&
71+
(github.event.label.name == 'c: packages: optional' ||
72+
github.event.label.name == 'c: packages: standard')))
73+
uses: ./.github/workflows/docker.yml
74+
with:
75+
# Build incrementally from published Docker image
76+
incremental: true
77+
free_disk_space: true
78+
from_docker_repository: ghcr.io/sagemath/sage/
79+
from_docker_target: "with-targets"
80+
from_docker_tag: "dev"
81+
docker_targets: "with-targets"
82+
targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
83+
tox_system_factors: >-
84+
["ubuntu-focal",
85+
"ubuntu-jammy",
86+
"ubuntu-mantic",
87+
"debian-bullseye",
88+
"debian-bookworm",
89+
"fedora-30",
90+
"fedora-38",
91+
"gentoo-python3.11",
92+
"debian-bullseye-i386"]
93+
tox_packages_factors: >-
94+
["standard",
95+
"minimal"]
96+
docker_push_repository: ghcr.io/${{ github.repository }}/

.github/workflows/ci-linux.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,56 @@ jobs:
6363
["standard"]
6464
docker_push_repository: ghcr.io/${{ github.repository }}/
6565

66+
standard-sitepackages:
67+
if: ${{ success() || failure() }}
68+
needs: [standard-pre]
69+
uses: ./.github/workflows/docker.yml
70+
with:
71+
# Build incrementally from previous stage (pre)
72+
incremental: true
73+
free_disk_space: true
74+
from_docker_repository: ghcr.io/${{ github.repository }}/
75+
from_docker_target: "with-targets-pre"
76+
docker_targets: "with-targets with-targets-optional"
77+
# FIXME: duplicated from env.TARGETS
78+
targets: build doc-html
79+
targets_optional: ptest
80+
tox_packages_factors: >-
81+
["standard-sitepackages"]
82+
# Only test systems with a usable system python (>= 3.9)
83+
tox_system_factors: >-
84+
["ubuntu-jammy",
85+
"ubuntu-kinetic",
86+
"ubuntu-lunar",
87+
"ubuntu-mantic",
88+
"debian-bullseye",
89+
"debian-bookworm",
90+
"debian-trixie",
91+
"debian-sid",
92+
"linuxmint-21",
93+
"linuxmint-21.1",
94+
"linuxmint-21.2",
95+
"fedora-33",
96+
"fedora-34",
97+
"fedora-35",
98+
"fedora-36",
99+
"fedora-37",
100+
"fedora-38",
101+
"fedora-39",
102+
"centos-stream-8-python3.9",
103+
"centos-stream-9-python3.9",
104+
"almalinux-8-python3.9",
105+
"gentoo-python3.10",
106+
"gentoo-python3.11",
107+
"archlinux-latest",
108+
"opensuse-15.4-gcc_11-python3.10",
109+
"opensuse-15.5-gcc_11-python3.11",
110+
"opensuse-tumbleweed-python3.10",
111+
"opensuse-tumbleweed",
112+
"debian-bullseye-i386"]
113+
docker_push_repository: ghcr.io/${{ github.repository }}/
114+
max_parallel: 10
115+
66116
minimal-pre:
67117
if: ${{ success() || failure() }}
68118
# It does not really "need" it.

.github/workflows/ci-macos.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
LOCAL_ARTIFACT_NAME: sage-local-commit-${{ github.sha }}-tox-local-${{ matrix.tox_env }}-${{ matrix.os }}-xcode_${{ matrix.xcode_version_factor }}
4848
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_env }}--${{ matrix.os }}-xcode_${{ matrix.xcode_version_factor }}
4949
steps:
50-
- uses: actions/checkout@v3
50+
- uses: actions/checkout@v4
5151
- name: Select Xcode version
5252
run: |
5353
if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi
@@ -118,7 +118,7 @@ jobs:
118118

119119
runs-on: ubuntu-latest
120120
steps:
121-
- uses: actions/checkout@v3
121+
- uses: actions/checkout@v4
122122
with:
123123
fetch-depth: 500
124124
- name: fetch tags
@@ -160,7 +160,7 @@ jobs:
160160
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
161161
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}-xcode_${{ matrix.xcode_version_factor }}
162162
steps:
163-
- uses: actions/checkout@v3
163+
- uses: actions/checkout@v4
164164
if: "!contains(matrix.tox_system_factor, 'nobootstrap')"
165165
- uses: actions/download-artifact@v3
166166
with:

.github/workflows/ci-wsl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- name: Configure git
1919
run: git config --global core.symlinks true
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Install Ubuntu 20.04 (in WSL)
2222
run: |
2323
(New-Object System.Net.WebClient).DownloadFile("https://aka.ms/wslubuntu2004", "Ubuntu.appx")

.github/workflows/cygwin.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ jobs:
7373
choco install git python39 python39-pip --source cygwin
7474
7575
- name: Check out SageMath
76-
uses: actions/checkout@v3
76+
uses: actions/checkout@v4
7777
with:
7878
repository: ${{ inputs.sage_repo }}
7979
ref: ${{ inputs.sage_ref }}
8080
fetch-depth: 2000
8181

8282
- name: Check out git-trac-command
83-
uses: actions/checkout@v3
83+
uses: actions/checkout@v4
8484
with:
8585
repository: sagemath/git-trac-command
8686
path: git-trac-command

.github/workflows/dist.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
runs-on: ubuntu-latest
3434
steps:
35-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
3636
- name: Install bootstrap prerequisites
3737
run: |
3838
sudo DEBIAN_FRONTEND=noninteractive apt-get update
@@ -51,7 +51,7 @@ jobs:
5151
env:
5252
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
5353
steps:
54-
- uses: actions/checkout@v3
54+
- uses: actions/checkout@v4
5555
- name: Install bootstrap prerequisites
5656
run: |
5757
sudo DEBIAN_FRONTEND=noninteractive apt-get update
@@ -100,13 +100,13 @@ jobs:
100100
#
101101
CIBW_ARCHS: ${{ matrix.arch }}
102102
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
103-
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
103+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9"
104104
# Environment during wheel build
105105
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"
106106
# Use 'build', not 'pip wheel'
107107
CIBW_BUILD_FRONTEND: build
108108
steps:
109-
- uses: actions/checkout@v3
109+
- uses: actions/checkout@v4
110110

111111
- uses: actions/download-artifact@v3
112112
with:

0 commit comments

Comments
 (0)