-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (53 loc) · 2.07 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
61
62
63
64
name: CI
# Control when the workflow will run
on:
push:
pull_request:
# Allow running this workflow manually from the Actions tab
workflow_dispatch:
# concurrency:
# group: carpetx
# cancel-in-progress: false
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job
download-build-test:
strategy:
matrix:
accelerator: [cpu, cuda, rocm]
real-precision: [real64]
mode: [debug, optimize]
exclude:
- {accelerator: rocm, real-precision: real32}
- {real-precision: real32, mode: optimize}
env:
ACCELERATOR: ${{matrix.accelerator}}
REAL_PRECISION: ${{matrix.real-precision}}
MODE: ${{matrix.mode}}
# The type of runner that the job will run on
runs-on: ubuntu-latest
container: lwji/carpetx:${{matrix.accelerator}}-${{matrix.real-precision}}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Check out the repository under $GITHUB_WORKSPACE, so our job can access it
- uses: actions/checkout@v4
# # Check out the documentation and test results
# - uses: actions/checkout@v3
# with:
# ref: gh-pages
# path: gh-pages
- name: Log the triggering commit
run: echo ${{github.event.client_payload.trigger}}
- name: Download Cactus
run: /bin/bash $GITHUB_WORKSPACE/scripts/download.sh
- name: Build Cactus
run: /bin/bash $GITHUB_WORKSPACE/scripts/build.sh
- name: Test Cactus
# We cannot run with cuda nor with rocm. Debug builds run too slowly.
if: ${{matrix.accelerator == 'cpu' && matrix.mode == 'optimize'}}
run: /bin/bash $GITHUB_WORKSPACE/scripts/test.sh
# Set exit code based on test status
- name: Set exit code
# Only look at the test results for `carpetx-cpu-real64` runs
if: ${{matrix.accelerator == 'cpu' && matrix.real-precision == 'real64' && matrix.mode == 'optimize' && env.TESTS_FAILED == 'True'}}
run: exit 1