Repository navigation
71 lines (59 loc) · 1.99 KB
/
Copy pathci.yml
File metadata and controls
71 lines (59 loc) · 1.99 KB
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
name: CI
on:
push:
branches: [odesolvers]
pull_request:
branches: [odesolvers]
workflow_dispatch:
jobs:
download-build-test:
strategy:
fail-fast: false
matrix:
accelerator: [cpu, cuda, rocm]
runs-on: ubuntu-latest
container: lwji/carpetx:${{matrix.accelerator}}-real64
env:
ACCELERATOR: ${{matrix.accelerator}}
REAL_PRECISION: real64
TEST_OUTPUT_DIR: /__w/nuX/workspace/simulations/NuXTest01
PERFORMANCE_OUTPUT_DIR: /__w/nuX/workspace/simulations/NuXPerformance
steps:
- uses: actions/checkout@v4
- name: Install ccache
run: apt-get update -y && apt-get install -y ccache || true
- name: Restore compiler cache
uses: actions/cache@v5
with:
path: .ccache
key: ccache-${{matrix.accelerator}}-real64-${{github.sha}}
restore-keys: |
ccache-${{matrix.accelerator}}-real64-
- name: Download Cactus
run: /bin/bash "$GITHUB_WORKSPACE/scripts/download.sh"
- name: Build Cactus
run: /bin/bash "$GITHUB_WORKSPACE/scripts/build.sh"
env:
CCACHE_DIR: ${{github.workspace}}/.ccache
- name: Test nuX
if: matrix.accelerator == 'cpu'
run: /bin/bash "$GITHUB_WORKSPACE/scripts/test.sh"
- name: Run CPU performance smoke test
if: matrix.accelerator == 'cpu'
run: /bin/bash "$GITHUB_WORKSPACE/scripts/performance.sh"
- name: Upload test output
if: always() && matrix.accelerator == 'cpu'
uses: actions/upload-artifact@v4
with:
name: nux-test-output
path: ${{env.TEST_OUTPUT_DIR}}
retention-days: 7
if-no-files-found: warn
- name: Upload performance timers
if: always() && matrix.accelerator == 'cpu'
uses: actions/upload-artifact@v4
with:
name: nux-performance-timers
path: ${{env.PERFORMANCE_OUTPUT_DIR}}
retention-days: 14
if-no-files-found: warn