-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (88 loc) · 2.63 KB
/
portability-tests.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Portability
on:
workflow_dispatch:
inputs:
chaste_branch:
description: "Chaste branch"
required: true
type: string
default: "develop"
tag_suffix:
description: "Tag suffix i.e. portability-<suffix>"
required: true
type: string
default: "dev"
jobs:
build-and-test:
runs-on: ubuntu-latest
container:
image: "chaste/runner:portability-${{ github.event.inputs.tag_suffix }}"
env:
RUNNER_OFF: 1
options: --user 0
steps:
- name: Checkout Chaste/${{ github.event.inputs.chaste_branch }}
uses: actions/checkout@v4
with:
repository: Chaste/Chaste
ref: ${{ github.event.inputs.chaste_branch }}
- name: Create build directory
run: |
mkdir -p build
- name: Create module loading script
run: |
cat > load_modules.sh << 'EOF'
#!/bin/bash
source /etc/profile.d/modules.sh
module use /home/runner/modules/modulefiles
module avail
module load boost petsc_hdf5 sundials vtk xercesc xsd
module list
EOF
working-directory: build
- name: Authorize runner user
run: |
chown -R runner:runner .
- name: Configure
run: |
su runner << 'EOF'
source load_modules.sh
cmake -DCMAKE_BUILD_TYPE=Release ..
EOF
working-directory: build
- name: TestChasteBuildInfo
run: |
su runner << 'EOF'
source load_modules.sh
cmake --build . --target TestChasteBuildInfo --parallel $(nproc)
ctest -V -R TestChasteBuildInfo$ --output-on-failure
EOF
working-directory: build
- name: Build Continuous test pack
run: |
su runner << 'EOF'
source load_modules.sh
cmake --build . --target Continuous --parallel $(nproc)
EOF
working-directory: build
- name: Build Nightly test pack
run: |
su runner << 'EOF'
source load_modules.sh
cmake --build . --target Nightly --parallel $(nproc)
EOF
working-directory: build
- name: Run Continuous test pack
run: |
su runner << 'EOF'
source load_modules.sh
ctest -j $(nproc) -L Continuous --output-on-failure
EOF
working-directory: build
- name: Run Nightly test pack
run: |
su runner << 'EOF'
source load_modules.sh
ctest -j $(nproc) -L Nightly --output-on-failure
EOF
working-directory: build