Test examples in parallel #557
Workflow file for this run
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
name: Build Gusto | |
on: | |
# Push to main or PR | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Scheduled build at 0330 UTC on Monday mornings to detect bitrot. | |
- cron: '30 3 * * 1' | |
jobs: | |
build: | |
name: "Build Gusto" | |
# The type of runner that the job will run on | |
runs-on: self-hosted | |
# The docker container to use. | |
container: | |
image: firedrakeproject/firedrake-vanilla:latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cleanup | |
if: ${{ always() }} | |
run: | | |
cd .. | |
rm -rf build | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install Gusto | |
run: | | |
. /home/firedrake/firedrake/bin/activate | |
python -m pip install -r requirements.txt | |
python -m pip install -e . | |
python -m pip install \ | |
pytest-cov pytest-timeout pytest-xdist | |
- name: Gusto tests | |
run: | | |
. /home/firedrake/firedrake/bin/activate | |
firedrake-clean | |
echo "GUSTO_PARALLEL_LOG=FILE" >> "$GITHUB_ENV" | |
export GUSTO_PARALLEL_LOG=FILE | |
python -m pytest \ | |
-n 12 --dist worksteal \ | |
--durations=100 \ | |
--timeout=1800 \ | |
--timeout-method=thread \ | |
-o faulthandler_timeout=1860 \ | |
--cov gusto \ | |
-sv examples # unit-tests integration-tests examples | |
timeout-minutes: 60 | |
- name: Prepare logs | |
if: always() | |
run: | | |
mkdir logs | |
cd /tmp/pytest-of-firedrake/pytest-0/ | |
find . -name "*.log" -exec cp --parents {} /__w/gusto/gusto/logs/ \; | |
- name: Upload artifact | |
if: always() | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
name: log-files | |
path: /__w/gusto/gusto/logs | |
retention-days: 1 | |