This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag '9.7.beta7' into t/31505/tox_ini__add_macports_environment
SageMath version 9.7.beta7, Release Date: 2022-08-01
- Loading branch information
Showing
2,342 changed files
with
35,825 additions
and
28,003 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,15 @@ on: | |
push: | ||
workflow_dispatch: | ||
# Allow to run manually | ||
inputs: | ||
platform: | ||
description: 'Platform' | ||
required: true | ||
default: 'ubuntu-focal-standard' | ||
docker_tag: | ||
description: 'Docker tag' | ||
required: true | ||
default: 'dev' | ||
|
||
concurrency: | ||
# Cancel previous runs of this workflow for the same branch | ||
|
@@ -13,52 +22,86 @@ concurrency: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/sagemath/sage/sage-docker-ubuntu-focal-standard-with-targets:dev | ||
container: ghcr.io/sagemath/sage/sage-docker-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}} | ||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare | ||
id: prepare | ||
run: | | ||
# Install test tools. | ||
if apt-get update && apt-get install -y git python3-venv; then | ||
# Debian-specific temporary code: | ||
# Installation of python3-venv can be removed as soon as a | ||
# base image with a release including #33822 is available | ||
: | ||
else | ||
export PATH="build/bin:$PATH" | ||
eval $(sage-print-system-package-command auto update) | ||
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git) | ||
fi | ||
# Reuse built SAGE_LOCAL contained in the Docker image | ||
./bootstrap | ||
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-editable --enable-download-from-upstream-url | ||
- name: Build and test modularized distributions | ||
if: always() && steps.prepare.outcome == 'success' | ||
run: make V=0 tox && make pypi-wheels | ||
env: | ||
MAKE: make -j2 | ||
SAGE_NUM_THREADS: 2 | ||
|
||
- name: Set up node to install pyright | ||
if: always() && steps.prepare.outcome == 'success' | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
|
||
- name: Install pyright | ||
if: always() && steps.prepare.outcome == 'success' | ||
# Fix to v232 due to bug https://github.com/microsoft/pyright/issues/3239 | ||
run: npm install -g [email protected] | ||
|
||
- name: Prepare | ||
run: | | ||
# Reuse built SAGE_LOCAL contained in the Docker image | ||
./bootstrap | ||
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-editable --enable-download-from-upstream-url | ||
# Install test tools | ||
apt-get install -y git | ||
- name: Static code check with pyright | ||
if: always() && steps.prepare.outcome == 'success' | ||
run: pyright | ||
|
||
- name: Build | ||
id: build | ||
if: always() && steps.prepare.outcome == 'success' | ||
run: make build | ||
env: | ||
MAKE: make -j2 | ||
SAGE_NUM_THREADS: 2 | ||
|
||
- name: Pytest | ||
if: contains(github.ref, 'pytest') | ||
run: | | ||
../sage -python -m pip install coverage pytest-xdist | ||
../sage -python -m coverage run -m pytest -c tox.ini --doctest-modules || true | ||
working-directory: ./src | ||
env: | ||
# Increase the length of the lines in the "short summary" | ||
COLUMNS: 120 | ||
|
||
- name: Test | ||
if: always() && steps.build.outcome == 'success' | ||
run: | | ||
../sage -python -m pip install coverage | ||
../sage -python -m coverage run ./bin/sage-runtests --all -p2 | ||
working-directory: ./src | ||
|
||
- name: Prepare coverage results | ||
if: always() | ||
if: always() && steps.build.outcome == 'success' | ||
run: | | ||
./venv/bin/python3 -m coverage combine src/.coverage/ | ||
./venv/bin/python3 -m coverage xml | ||
find . -name *coverage* | ||
- name: Upload coverage to codecov | ||
if: always() | ||
if: always() && steps.build.outcome == 'success' | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: ./coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.