-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (59 loc) · 1.73 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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@v4
- name: Cleanup
if: ${{ always() }}
run: |
cd ..
rm -rf build
- 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-timeout pytest-xdist
- name: Gusto tests
run: |
. /home/firedrake/firedrake/bin/activate
firedrake-clean
export GUSTO_PARALLEL_LOG=FILE
python -m pytest \
-n 12 --dist worksteal \
--durations=100 \
--timeout=3600 \
--timeout-method=thread \
-o faulthandler_timeout=3660 \
-v unit-tests integration-tests examples
timeout-minutes: 120
- 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: 5