1+ name : hpcReactCI
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ pull_request :
7+ workflow_dispatch :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+
15+ get_docker_image_tag_hash :
16+ runs-on : ubuntu-22.04
17+ outputs :
18+ DOCKER_IMAGE_TAG_HASH : ${{ steps.extract_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
19+ steps :
20+ - name : Extract docker image tag hash
21+ id : extract_docker_image_tag_hash
22+ run : |
23+ echo "DOCKER_IMAGE_TAG_HASH=310f70ba6065b94858af2cafeba828ea76c02a1d" >> "$GITHUB_OUTPUT"
24+
25+ # code_style:
26+ # needs: [check_pull_request_is_not_a_draft]
27+ # runs-on: ubuntu-22.04
28+ # steps:
29+ # - name: Checkout Repository
30+ 31+ # with:
32+ # submodules: true
33+ # lfs: false
34+ # - name: Check style
35+ # env:
36+ # DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
37+ # CMAKE_BUILD_TYPE: Release
38+ # BUILD_AND_TEST_ARGS: --test-code-style
39+ # run: ./scripts/ci_build_and_test.sh
40+
41+ doxygen_check :
42+ runs-on : ubuntu-22.04
43+ needs :
44+ - get_docker_image_tag_hash
45+ steps :
46+ - name : Checkout Repository
47+ 48+ with :
49+ submodules : true
50+ lfs : false
51+ - name : Check doxygen
52+ env :
53+ DOCKER_REPOSITORY : geosx/ubuntu:22.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
54+ HOST_CONFIG : hostconfigs/environment.cmake
55+ CMAKE_CXX_COMPILER : /usr/bin/clang++
56+ CMAKE_C_COMPILER : /usr/bin/clang
57+ CMAKE_BUILD_TYPE : Release
58+ BUILD_AND_TEST_ARGS : --test-doxygen
59+ run : ./scripts/ci_build_and_test.sh
60+
61+
62+ code_checks :
63+ runs-on : ubuntu-22.04
64+ needs :
65+ - get_docker_image_tag_hash
66+ steps :
67+ - name : Checkout Repository
68+ 69+ with :
70+ submodules : true
71+ lfs : false
72+ - name : code_checks
73+ env :
74+ DOCKER_REPOSITORY : geosx/ubuntu:22.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
75+ HOST_CONFIG : hostconfigs/environment.cmake
76+ CMAKE_CXX_COMPILER : /usr/bin/clang++
77+ CMAKE_C_COMPILER : /usr/bin/clang
78+ CMAKE_BUILD_TYPE : Release
79+ BUILD_AND_TEST_ARGS : --code-checks
80+ run : ./scripts/ci_build_and_test.sh
81+
82+ linux_builds :
83+ name : ${{matrix.name}}
84+ runs-on : ${{matrix.RUNS_ON}}
85+ needs :
86+ - get_docker_image_tag_hash
87+ strategy :
88+ # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
89+ fail-fast : false
90+ matrix :
91+ include :
92+ # - name: RHEL8.10-clang17-dbg (ubi8.10, clang-17.0.6, Debug)
93+ # DOCKER_REPOSITORY: geosx/ubi:8.10
94+ # RUNS_ON: ubuntu-22.04
95+ # CMAKE_CXX_COMPILER: clang++
96+ # CMAKE_C_COMPILER: clang
97+ # CMAKE_BUILD_TYPE: Debug
98+
99+ # - name: RHEL8.10-clang17-rel (ubi8.10, clang-17.0.6, Release)
100+ # DOCKER_REPOSITORY: geosx/ubi:8.10
101+ # RUNS_ON: ubuntu-22.04
102+ # CMAKE_CXX_COMPILER: clang++
103+ # CMAKE_C_COMPILER: clang
104+ # CMAKE_BUILD_TYPE: Release
105+
106+ # - name: RHEL8.10-gcc13-dbg (ubi8.10, gcc 13.2.1, Debug)
107+ # DOCKER_REPOSITORY: geosx/ubi:8.10
108+ # RUNS_ON: ubuntu-22.04
109+ # CMAKE_CXX_COMPILER: /opt/rh/gcc-toolset-13/root/bin/g++
110+ # CMAKE_C_COMPILER: /opt/rh/gcc-toolset-13/root/bin/gcc
111+ # CMAKE_BUILD_TYPE: Debug
112+
113+ # - name: RHEL8.10-gcc13-rel (ubi8.10, gcc 13.2.1, Release)
114+ # DOCKER_REPOSITORY: geosx/ubi:8.10
115+ # RUNS_ON: ubuntu-22.04
116+ # CMAKE_CXX_COMPILER: /opt/rh/gcc-toolset-13/root/bin/g++
117+ # CMAKE_C_COMPILER: /opt/rh/gcc-toolset-13/root/bin/gcc
118+ # CMAKE_BUILD_TYPE: Release
119+
120+ - name : ubuntu22-gcc11-dbg (ubuntu-22, gcc 11.4.0, Release)
121+ DOCKER_REPOSITORY : geosx/ubuntu:22.04
122+ RUNS_ON : ubuntu-22.04
123+ CMAKE_CXX_COMPILER : /usr/bin/g++
124+ CMAKE_C_COMPILER : /usr/bin/gcc
125+ CMAKE_BUILD_TYPE : Debug
126+
127+ - name : ubuntu22-gcc11-rel (ubuntu-22, gcc 11.4.0, Release)
128+ DOCKER_REPOSITORY : geosx/ubuntu:22.04
129+ RUNS_ON : ubuntu-22.04
130+ CMAKE_CXX_COMPILER : /usr/bin/g++
131+ CMAKE_C_COMPILER : /usr/bin/gcc
132+ CMAKE_BUILD_TYPE : Release
133+
134+ - name : ubuntu22-clang14-dbg (ubuntu-22, clang-14.0.0, Debug)
135+ DOCKER_REPOSITORY : geosx/ubuntu:22.04
136+ RUNS_ON : ubuntu-22.04
137+ CMAKE_CXX_COMPILER : /usr/bin/clang++
138+ CMAKE_C_COMPILER : /usr/bin/clang
139+ CMAKE_BUILD_TYPE : Debug
140+
141+ - name : ubuntu22-clang14-rel (ubuntu-22, clang-14.0.0, Release)
142+ DOCKER_REPOSITORY : geosx/ubuntu:22.04
143+ RUNS_ON : ubuntu-22.04
144+ CMAKE_CXX_COMPILER : /usr/bin/clang++
145+ CMAKE_C_COMPILER : /usr/bin/clang
146+ CMAKE_BUILD_TYPE : Release
147+
148+ # - name: ubuntu22-gcc11-cuda11-rel (ubuntu-22, gcc 11.4.0, cuda-11.8.0, Release)
149+ # DOCKER_REPOSITORY: geosx/ubuntu:22.04-cuda11.8
150+ # RUNS_ON: streak2
151+ # CMAKE_CXX_COMPILER: /usr/bin/g++
152+ # CMAKE_C_COMPILER: /usr/bin/gcc
153+ # CMAKE_BUILD_TYPE: Release
154+ # ENABLE_CUDA: ON
155+ # CMAKE_CUDA_ARCHITECTURES: "86"
156+ # NPROC: 4
157+ # DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"
158+
159+ # - name: ubuntu22-gcc11-cuda11-dbg (ubuntu-22, gcc 11.4.0, cuda-11.8.0, Debug)
160+ # DOCKER_REPOSITORY: geosx/ubuntu:22.04-cuda11.8
161+ # RUNS_ON: streak2
162+ # CMAKE_CXX_COMPILER: /usr/bin/g++
163+ # CMAKE_C_COMPILER: /usr/bin/gcc
164+ # CMAKE_BUILD_TYPE: Debug
165+ # ENABLE_CUDA: ON
166+ # CMAKE_CUDA_ARCHITECTURES: "86"
167+ # NPROC: 4
168+ # DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"
169+
170+ # - name: ubuntu22-clang14-cuda11-rel (ubuntu-22, clang-14.0.0, cuda-11.8.0, Release)
171+ # DOCKER_REPOSITORY: geosx/ubuntu:22.04-cuda11.8
172+ # RUNS_ON: streak2
173+ # CMAKE_CXX_COMPILER: /usr/bin/clang++
174+ # CMAKE_C_COMPILER: /usr/bin/clang
175+ # CMAKE_BUILD_TYPE: Release
176+ # ENABLE_CUDA: ON
177+ # CMAKE_CUDA_ARCHITECTURES: "86"
178+ # NPROC: 4
179+ # DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"
180+
181+ # - name: ubuntu22-clang14-cuda11-dbg (ubuntu-22, clang-14.0.0, cuda-11.8.0, Debug)
182+ # DOCKER_REPOSITORY: geosx/ubuntu:22.04-cuda11.8
183+ # RUNS_ON: streak2
184+ # CMAKE_CXX_COMPILER: /usr/bin/clang++
185+ # CMAKE_C_COMPILER: /usr/bin/clang
186+ # CMAKE_BUILD_TYPE: Debug
187+ # ENABLE_CUDA: ON
188+ # CMAKE_CUDA_ARCHITECTURES: "86"
189+ # NPROC: 4
190+ # DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"
191+
192+ # - name: RHEL8.10-clang17-cuda12-rel (ubi8.10, clang-17.0.6, cuda-12.4.1, Release)
193+ # DOCKER_REPOSITORY: geosx/ubi:8.10-cuda12.8
194+ # RUNS_ON: streak2
195+ # CMAKE_CXX_COMPILER: clang++
196+ # CMAKE_C_COMPILER: clang
197+ # CMAKE_BUILD_TYPE: Release
198+ # ENABLE_CUDA: ON
199+ # CMAKE_CUDA_ARCHITECTURES: "86"
200+ # NPROC: 4
201+ # DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"
202+
203+ # - name: RHEL8.10-gcc13-cuda12-rel (ubi8.10, gcc 13.2.1, cuda-12.4.1, Release)
204+ # DOCKER_REPOSITORY: geosx/ubi:8.10-cuda12.8
205+ # RUNS_ON: streak2
206+ # CMAKE_CXX_COMPILER: /opt/rh/gcc-toolset-13/root/bin/g++
207+ # CMAKE_C_COMPILER: /opt/rh/gcc-toolset-13/root/bin/gcc
208+ # CMAKE_BUILD_TYPE: Release
209+ # ENABLE_CUDA: ON
210+ # CMAKE_CUDA_ARCHITECTURES: "86"
211+ # NPROC: 4
212+ # DOCKER_RUN_ARGS: "--cpus=4 --memory=64g --runtime=nvidia --gpus all"
213+
214+ steps :
215+ - name : Checkout Repository
216+ 217+ with :
218+ submodules : true
219+ lfs : false
220+
221+ - name : Print environment
222+ run : printenv
223+
224+ - name : Build and test
225+ env :
226+ DOCKER_REPOSITORY : ${{ matrix.DOCKER_REPOSITORY }}-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
227+ CMAKE_CXX_COMPILER : ${{ matrix.CMAKE_CXX_COMPILER }}
228+ CMAKE_C_COMPILER : ${{ matrix.CMAKE_C_COMPILER }}
229+ CMAKE_BUILD_TYPE : ${{ matrix.CMAKE_BUILD_TYPE }}
230+ ENABLE_CUDA : ${{ matrix.ENABLE_CUDA }}
231+ CMAKE_CUDA_ARCHITECTURES : ${{ matrix.CMAKE_CUDA_ARCHITECTURES }}
232+ NPROC : ${{ matrix.NPROC }}
233+ BUILD_AND_TEST_ARGS : ${{ matrix.BUILD_AND_TEST_ARGS }} --build-exe
234+ DOCKER_RUN_ARGS : ${{ matrix.DOCKER_RUN_ARGS }}
235+ HOST_CONFIG : hostconfigs/environment.cmake
236+ run : ./scripts/ci_build_and_test.sh
237+
238+ code_coverage :
239+ runs-on : ubuntu-22.04
240+ needs :
241+ - get_docker_image_tag_hash
242+ steps :
243+ - name : Checkout Repository
244+ 245+ with :
246+ submodules : true
247+ lfs : false
248+ - name : run code coverage
249+ env :
250+ DOCKER_REPOSITORY : geosx/ubuntu:22.04-${{ needs.get_docker_image_tag_hash.outputs.DOCKER_IMAGE_TAG_HASH }}
251+ HOST_CONFIG : hostconfigs/environment.cmake
252+ CMAKE_CXX_COMPILER : /usr/bin/g++
253+ CMAKE_C_COMPILER : /usr/bin/gcc
254+ CMAKE_BUILD_TYPE : Debug
255+ BUILD_AND_TEST_ARGS : " --build-exe --code-coverage"
256+ run : ./scripts/ci_build_and_test.sh
257+ - name : Upload coverage reports to Codecov
258+ uses : codecov/codecov-action@v3
259+ with :
260+ files : hpcReact_coverage.info.cleaned
261+ fail_ci_if_error : true
262+ env :
263+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
264+
265+
266+ check_that_all_jobs_succeeded :
267+ runs-on : ubuntu-22.04
268+ needs :
269+ - get_docker_image_tag_hash
270+ - linux_builds
271+ - doxygen_check
272+ - code_checks
273+ if : ${{ always() }}
274+ env :
275+ RETURN_VAL : |
276+ ${{
277+ needs.linux_builds.result == 'success' &&
278+ needs.doxygen_check.result == 'success' &&
279+ needs.code_checks.result == 'success'
280+ }}
281+ steps :
282+ - name : PR Success
283+ if : ${{ contains(env.RETURN_VAL, 'true') }}
284+ run : " true"
285+ - name : PR Failure
286+ if : ${{ contains(env.RETURN_VAL, 'false') }}
287+ run : " false"
0 commit comments