Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Build&Test: Fix "test modularized distributions" after #37022 #37750

Merged
merged 16 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
944144b
build/pkgs/sagemath_*/spkg-check: Replace by spkg-check.in from #35095
mkoeppe Apr 5, 2024
2cbf026
.github/workflows/ci-linux-incremental.yml: Do not run on changes to …
mkoeppe Apr 5, 2024
4ee5c25
pkgs/sagemath-{objects,categories,environment,repl}/tox.ini: Update f…
mkoeppe Apr 5, 2024
4a8723f
pkgs/sagemath-{objects,categories,environment,repl}/tox.ini: Replace …
mkoeppe Apr 5, 2024
244ceef
build/pkgs/sagemath_{objects,categories,environment,repl}: Back to us…
mkoeppe Apr 6, 2024
1511066
CythonFeature: Do not fail on Python 3.12 without setuptools
mkoeppe Apr 6, 2024
062f269
pkgs/sagemath-repl/pyproject.toml.m4: Add dependencies ipykernel, jup…
mkoeppe Apr 6, 2024
4cc3ccc
pkgs/sagemath-{repl,categories}/tox.ini: Set PYDEVD_DISABLE_FILE_VALI…
mkoeppe Apr 6, 2024
ee547fa
**/tox.ini: Set upper bound tox < 4.14.1 because of https://github.co…
mkoeppe Apr 6, 2024
3f87323
Revert "pkgs/sagemath-{objects,categories,environment,repl}/tox.ini: …
mkoeppe Apr 6, 2024
388dd3b
pkgs/sagemath-{repl,categories,environment,objects}/requirements-edit…
mkoeppe Apr 6, 2024
7e6017c
**/tox.ini: Set upper bound tox < 4.14.1 because of https://github.co…
mkoeppe Apr 6, 2024
be01f00
tox.ini: Fix 'requires' for autoprovisioning on tox 3
mkoeppe Apr 6, 2024
ae34707
src/sage/doctest/reporting.py: Add missing # needs SAGE_SRC
mkoeppe Apr 13, 2024
aba5aec
**/tox.ini: Fix format of [tox] requires
mkoeppe Apr 15, 2024
6d704b0
sage -fixdoctests --distribution sagemath-categories --update-known-t…
mkoeppe Apr 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci-linux-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ on:
pull_request:
paths:
- 'build/pkgs/**'
- 'pkgs/**'
- '!build/pkgs/sage_conf/**'
- '!build/pkgs/sage_docbuild/**'
- '!build/pkgs/sage_setup/**'
- '!build/pkgs/sage_sws2rst/**'
- '!build/pkgs/sagelib/**'
- '!build/pkgs/sagemath_*/**'
workflow_dispatch:

concurrency:
Expand Down
48 changes: 40 additions & 8 deletions build/pkgs/sagemath_objects/spkg-check
Original file line number Diff line number Diff line change
@@ -1,15 +1,45 @@
#!/usr/bin/env bash
cd src

if [ ! -r tox.ini ]; then
echo "Not testing the package because there is no tox.ini"
exit 0
fi

for lib in "$SAGE_SRC/bin/sage-src-env-config" "$SAGE_SRC/bin/sage-env-config" "$SAGE_SRC/bin/sage-env" "$SAGE_ROOT/build/bin/sage-build-env-config" "$SAGE_ROOT/build/bin/sage-build-env"; do
source "$lib"
if [ $? -ne 0 ]; then
echo >&2 "Error: failed to source $lib"
echo >&2 "Is $SAGE_ROOT the correct SAGE_ROOT?"
exit 1
fi
done

export PIP_NO_INDEX=true
export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS"

export TOX_PARALLEL_NO_SPINNER=1
unset tox_args

wheel="$(sed -n '1s,.*@ file://,,p' $SAGE_SPKG_SCRIPTS/$PKG_BASE/spkg-requirements.txt)"
echo Running "tox -r -p auto -v --installpkg $wheel"
tox -r -p auto -v --installpkg "$wheel"
if [ -n "$wheel" ]; then
tox_envs=$(tox -l)
tox_args="-r -p auto -v --installpkg $wheel"
elif [ "$SAGE_EDITABLE" = yes ]; then
tox_envs=$(tox -l | sed s/norequirements/editable/)
# FIXME: Should use -r if sage_setup or another build requirement changes
tox_args="-r -v -v -v -v -e $(echo $tox_envs | sed 's/ /,/g')"
else
echo "Not testing the package because SAGE_WHEELS=$SAGE_WHEELS and SAGE_EDITABLE=$SAGE_EDITABLE"
exit 0
fi

export TOX_PARALLEL_NO_SPINNER=1

echo Running "tox $tox_args"
tox $tox_args
status=$?
case $status:$SAGE_CHECK:$([ -r known-test-failures.json ]; echo $?) in
0:no:*) echo "Not testing the package because SAGE_CHECK=no";;
0:*:0) echo "Passed the test suite (modulo baseline known-test-failures*.json)";;
0:*:*) echo "Passed the test suite";;
*:warn:0) echo "Warning: New failures (not in baseline known-test-failures*.json (ignored)"; status=0;;
Expand All @@ -18,10 +48,12 @@ case $status:$SAGE_CHECK:$([ -r known-test-failures.json ]; echo $?) in
*:yes:*) echo "Failures testing the package";;
esac
# Show summaries of failures (suppress lines ending with '[failed in baseline]')
for f in $(pwd)/.tox/sagepython-sagewheels-nopypi-norequirements*/log/*-command*.log; do
if [ -r "$f" ]; then
echo "$f"
grep '^sage -t.*#[^]]*$' "$f"
fi
for e in $tox_envs; do
for f in $(pwd)/.tox/$e/log/*-command*.log; do
if [ -r "$f" ]; then
echo "$f"
grep '^sage -t.*#[^]]*$' "$f"
fi
done
done
exit $status
4 changes: 4 additions & 0 deletions pkgs/sage-conf_pypi/tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[tox]
envlist = py39, py310, py311, py39-user, py310-user, py311-user

requires =
# Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1
tox<4.14.1

[testenv:.pkg]
basepython = py311
passenv =
Expand Down
4 changes: 4 additions & 0 deletions pkgs/sage-docbuild/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
#
[tox]

requires =
# Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1
tox<4.14.1

[testenv]
deps = -rrequirements.txt

Expand Down
4 changes: 4 additions & 0 deletions pkgs/sage-setup/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
#
[tox]

requires =
# Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1
tox<4.14.1

[testenv]
deps = -rrequirements.txt

Expand Down
Loading
Loading