-
Notifications
You must be signed in to change notification settings - Fork 32
101 lines (91 loc) · 3.16 KB
/
build_and_lint.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
name: Build & Lint
# This runs the HIP Builds. CUDA builds can be reenabled by adding the CUDA
# container to the matrix and uncommenting the CUDA lines
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 & Lint:
${{ 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, dust, cooling]
# The CUDA container can be added with {name: "CUDA", link: "docker://chollahydro/cholla:cuda_github"}
container: [{name: "HIP",link: "docker://chollahydro/cholla:rocm_github"}]
# Setup environment variables
env:
CHOLLA_MAKE_TYPE: ${{ matrix.make-type }}
# 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: |
make clobber
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 Cholla
run: |
source builds/run_tests.sh
buildCholla OPTIMIZE
- name: Build Tests
run: |
source builds/run_tests.sh
buildChollaTests
# Run Clang-tidy
# - name: Run clang-tidy
# if: matrix.container.name == 'CUDA'
# run: make tidy TYPE=${{ matrix.make-type }} CLANG_TIDY_ARGS="--warnings-as-errors=*"
# - name: Display tidy_results_cpp.log
# if: ${{ (matrix.container.name == 'CUDA') && (always()) }}
# run: cat tidy_results_cpp.log
# - name: Display tidy_results_c.log
# if: ${{ (matrix.container.name == 'CUDA') && (always()) }}
# run: cat tidy_results_c.log
# - name: Display tidy_results_gpu.log
# if: ${{ (matrix.container.name == 'CUDA') && (always()) }}
# run: cat tidy_results_gpu.log