-
Notifications
You must be signed in to change notification settings - Fork 32
92 lines (83 loc) · 2.64 KB
/
build_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
name: Cholla Compile
on:
pull_request:
schedule:
- cron: "37 07 * * 1" # run every Monday at 07:37UTC. Crontab computed with crontab.guru
workflow_dispatch:
jobs:
Build:
name: >
Build
${{ matrix.container.name }}
TYPE=${{ matrix.make-type }}
# if: ${{ false }} # If uncommented this line will disable this job
# Choose OS/Runner
runs-on: ubuntu-latest
container:
image: ${{matrix.container.link}}
defaults:
run:
shell: bash
# Matrix for different make types
strategy:
fail-fast: false
matrix:
make-type: [hydro, gravity, disk, particles, cosmology, mhd]
container: [{name: "CUDA", link: "docker://alwinm/cholla:cuda_github"}, {name: "HIP",link: "docker://alwinm/cholla:hip_github"},]
# Setup environment variables
env:
CHOLLA_MACHINE: github
CHOLLA_MAKE_TYPE: ${{ matrix.make-type }}
CUDA_ROOT: /usr/local/cuda
HDF5_ROOT: /usr/lib/x86_64-linux-gnu/hdf5/serial
MPI_ROOT: /usr/lib/x86_64-linux-gnu/openmpi
# Run the job itself
steps:
# Install required Tools
- uses: actions/checkout@v3
# Show versions
- name: Show MPI version
run: mpirun --version
- name: Show HDF5 config
run: |
h5cc -showconfig
- name: Git Safe Directory
run: |
git --version
git config --global --add safe.directory /__w/cholla/cholla
git config --global --add safe.directory '*'
- name: Show CUDA and gcc version
if: matrix.container.name == 'CUDA'
run: |
cc --version
c++ --version
nvcc -V
- name: Show HIP and hipcc version
if: matrix.container.name == 'HIP'
run: |
hipcc --version
hipconfig --full
# Perform Build
- name: Cholla setup
run: |
source builds/run_tests.sh
setupTests -c gcc
echo "CHOLLA_ROOT = ${CHOLLA_ROOT}"
echo "CHOLLA_LAUNCH_COMMAND = ${CHOLLA_LAUNCH_COMMAND}"
echo "CHOLLA_ROOT=${CHOLLA_ROOT}" >> $GITHUB_ENV
echo "CHOLLA_LAUNCH_COMMAND=${CHOLLA_LAUNCH_COMMAND}" >> $GITHUB_ENV
echo "F_OFFLOAD=${F_OFFLOAD} >> $GITHUB_ENV
echo "CHOLLA_ENVSET=${CHOLLA_ENVSET} >> $GITHUB_ENV
- name: Build GoogleTest
run: |
source builds/run_tests.sh
buildGoogleTest
echo "GOOGLETEST_ROOT=${GOOGLETEST_ROOT}" >> $GITHUB_ENV
- name: Build Cholla
run: |
source builds/run_tests.sh
buildCholla OPTIMIZE
- name: Build Tests
run: |
source builds/run_tests.sh
buildChollaTests