-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (51 loc) · 1.65 KB
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
concurrency:
# Cancels jobs running if new commits are pushed
group: >
${{ github.workflow }}-
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: [self-hosted, Linux]
container:
image: firedrakeproject/firedrake-vanilla-default:latest
steps:
- name: Fix HOME
# For unknown reasons GitHub actions overwrite HOME to /github/home
# which will break everything unless fixed
# (https://github.com/actions/runner/issues/863)
run: echo "HOME=/home/firedrake" >> "$GITHUB_ENV"
- name: Pre-cleanup
run: |
: # Wipe everything away in the current directory
find . -delete
firedrake-clean
- uses: actions/checkout@v4
with:
# Download Irksome into a subdirectory not called 'irksome' to make sure
# that the package installs correctly. Otherwise 'import irksome' may
# work even if the installation failed because it is a subdirectory.
path: irksome-repo
- name: Create virtual environment
# pass '--system-site-packages' so Firedrake can be found
run: python3 -m venv --system-site-packages venv-irksome
- name: Install Irksome
run: |
. venv-irksome/bin/activate
pip install './irksome-repo[ci]'
pip list
- name: Run tests
run: |
. venv-irksome/bin/activate
make -C irksome-repo test THREADS=12
- name: Post-cleanup
if: always()
run: |
find . -delete
firedrake-clean