Skip to content

Commit

Permalink
Merge branch 'develop' into public/algebras/quantum_clifford_root_uni…
Browse files Browse the repository at this point in the history
…ty-34147
  • Loading branch information
tscrim committed Aug 2, 2022
2 parents 5b55aa0 + cd1e2b1 commit 6f15344
Show file tree
Hide file tree
Showing 825 changed files with 8,303 additions and 5,726 deletions.
58 changes: 44 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -13,35 +22,55 @@ 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 pyright@1.1.232

- name: Prepare
run: |
# Install test tools.
# Installation of python3-venv can be removed as soon as a
# base image with a release including #33822 is available
apt-get update
apt-get install -y git python3-venv
# 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: 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
Expand All @@ -58,20 +87,21 @@ jobs:
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
81 changes: 81 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI Linux

## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
## whenever a GitHub pull request is opened or synchronized in a repository
## where GitHub Actions are enabled.
##
## It builds and checks some sage spkgs as defined in TARGETS.
##
## A job succeeds if there is no error.
##
## The build is run with "make V=0", so the build logs of individual packages are suppressed.
##
## At the end, all package build logs that contain an error are printed out.
##
## After all jobs have finished (or are canceled) and a short delay,
## tar files of all logs are made available as "build artifacts".

#on: [push, pull_request]

on:
pull_request:
types: [opened, synchronize]
push:
tags:
- '*'
workflow_dispatch:
# Allow to run manually

env:
TARGETS_PRE: all-sage-local
TARGETS: build doc-html
TARGETS_OPTIONAL: ptest

jobs:

docker:
uses: ./.github/workflows/docker.yml
with:
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
targets: build doc-html
targets_optional: ptest
docker_push_repository: ghcr.io/${{ github.repository }}/

local-ubuntu:

runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 1
matrix:
tox_system_factor: [conda-forge-ubuntu]
tox_packages_factor: [minimal, standard, environment, environment-optional]
env:
TOX_ENV: local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
LOGS_ARTIFACT_NAME: logs-commit-${{ github.sha }}-tox-local-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
steps:
- uses: actions/checkout@v2
- name: Install test prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install tox
- name: Build and test with tox
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
# For doctesting, we use a lower parallelization to avoid timeouts.
run: |
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
- name: Prepare logs artifact
run: |
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
if: always()
- uses: actions/upload-artifact@v1
with:
path: artifacts
name: ${{ env.LOGS_ARTIFACT_NAME }}
if: always()
- name: Print out logs for immediate inspection
# and markup the output with GitHub Actions logging commands
run: |
.github/workflows/scan-logs.sh "artifacts/$LOGS_ARTIFACT_NAME"
if: always()
Loading

0 comments on commit 6f15344

Please sign in to comment.