@@ -83,10 +83,12 @@ jobs:
8383 needs : Formatting
8484 runs-on : ${{matrix.os}}
8585 strategy :
86+ fail-fast : false
8687 matrix :
8788 os : [ubuntu-24.04, macos-latest]
8889 build_type : [Release, Debug]
8990 enable_eb : [EB-OFF, EB-ON]
91+ dim : [2, 3]
9092 include :
9193 - os : macos-latest
9294 install_deps : brew install open-mpi automake ccache
@@ -150,35 +152,28 @@ jobs:
150152 uses : actions/cache@v4
151153 with :
152154 path : ${{matrix.ccache_cache}}
153- key : ccache-${{github.workflow}}-${{github.job}}-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}}-git-${{github.sha}}
155+ key : ccache-${{github.workflow}}-${{github.job}}-${{matrix.os}}-${{matrix.dim}}d-${{matrix. build_type}}-${{matrix.enable_eb}}-git-${{github.sha}}
154156 restore-keys : |
155- ccache-${{github.workflow}}-${{github.job}}-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}}-git-
157+ ccache-${{github.workflow}}-${{github.job}}-${{matrix.os}}-${{matrix.dim}}d-${{matrix. build_type}}-${{matrix.enable_eb}}-git-
156158 - name : Configure
157159 run : |
158- (for DIM in 2 3; do \
159- printf "\n-------- Configuring ${DIM}D --------\n"; \
160- cmake -B${{runner.workspace}}/build-${DIM}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}} \
161- -DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install-${DIM}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}} \
162- -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} \
163- -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
164- -DPELE_DIM:STRING=${DIM} \
165- -DPELE_ENABLE_MPI:BOOL=ON \
166- -DMPIEXEC_PREFLAGS:STRING=--oversubscribe \
167- -DPELE_ENABLE_EB:BOOL=${{matrix.use_eb}} \
168- -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \
169- -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \
170- ${{github.workspace}}; \
171- if [ $? -ne 0 ]; then exit 1; fi \
172- done)
160+ cmake -B${{runner.workspace}}/build-${{matrix.dim}}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}} \
161+ -DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install-${{matrix.dim}}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}} \
162+ -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} \
163+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
164+ -DPELE_DIM:STRING=${{matrix.dim}} \
165+ -DPELE_ENABLE_MPI:BOOL=ON \
166+ -DMPIEXEC_PREFLAGS:STRING=--oversubscribe \
167+ -DPELE_ENABLE_EB:BOOL=${{matrix.use_eb}} \
168+ -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \
169+ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \
170+ ${{github.workspace}}
173171 - name : Build
174172 run : |
175173 ccache -z
176- (for DIM in 2 3; do \
177- printf "\n-------- Building ${DIM}D --------\n"; \
178- cmake --build ${{runner.workspace}}/build-${DIM}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}} \
179- --parallel ${{env.NPROCS}} 2>&1 | tee -a ${{runner.workspace}}/build-output.txt; \
180- if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi \
181- done)
174+ cmake --build ${{runner.workspace}}/build-${{matrix.dim}}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}} \
175+ --parallel ${{env.NPROCS}} 2>&1 | tee -a ${{runner.workspace}}/build-output.txt; \
176+ if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi \
182177 - name : Ccache Report
183178 run : |
184179 ccache -s
@@ -195,12 +190,95 @@ jobs:
195190 exit ${return}
196191 - name : Test
197192 run : |
198- (for DIM in 2 3; do \
199- printf "\n-------- Testing ${DIM}D --------\n"; \
200- cd ${{runner.workspace}}/build-${DIM}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}}; \
201- ctest ${{matrix.ctest_args}} -VV --output-on-failure; \
202- if [ $? -ne 0 ]; then exit 1; fi \
203- done)
193+ cd ${{runner.workspace}}/build-${{matrix.dim}}d-${{matrix.os}}-${{matrix.build_type}}-${{matrix.enable_eb}}; \
194+ ctest ${{matrix.ctest_args}} -VV --output-on-failure; \
195+ if [ $? -ne 0 ]; then exit 1; fi \
196+ CPU-CMake-SINGLE :
197+ needs : Formatting
198+ runs-on : ubuntu-24.04
199+ strategy :
200+ fail-fast : false
201+ matrix :
202+ enable_eb : [EB-OFF, EB-ON]
203+ dim : [2, 3]
204+ include :
205+ - enable_eb : EB-OFF
206+ use_eb : " OFF"
207+ - enable_eb : EB-ON
208+ use_eb : " ON"
209+ steps :
210+ - name : Clone
211+ uses : actions/checkout@v4
212+ with :
213+ submodules : recursive
214+ - name : Python
215+ uses : actions/setup-python@v5
216+ with :
217+ python-version : ' 3.12'
218+ - name : Setup
219+ run : |
220+ echo "NPROCS=$(nproc)" >> $GITHUB_ENV
221+ echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV
222+ echo "CCACHE_COMPRESSLEVEL=10" >> $GITHUB_ENV
223+ echo "CCACHE_LOGFILE=${{github.workspace}}/ccache.log.txt" >> $GITHUB_ENV
224+ echo "CCACHE_MAXSIZE=50M" >> $GITHUB_ENV
225+ cmake -E make_directory ${{runner.workspace}}/deps
226+ - name : Dependencies
227+ run : |
228+ sudo apt-get install -y libopenmpi-dev openmpi-bin
229+ - name : Install Ccache
230+ run : |
231+ wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz
232+ tar xvf ccache-4.8-linux-x86_64.tar.xz
233+ sudo cp -f ccache-4.8-linux-x86_64/ccache /usr/local/bin/
234+ - name : Set Up Ccache
235+ uses : actions/cache@v4
236+ with :
237+ path : ~/.cache/ccache
238+ key : ccache-${{github.workflow}}-${{github.job}}-${{matrix.dim}}d-${{matrix.enable_eb}}-single-git-${{github.sha}}
239+ restore-keys : |
240+ ccache-${{github.workflow}}-${{github.job}}-${{matrix.dim}}d-${{matrix.enable_eb}}-single-git-
241+ - name : Configure
242+ run : |
243+ cmake -B${{runner.workspace}}/build-${{matrix.dim}}d-${{matrix.enable_eb}}-single \
244+ -DCMAKE_INSTALL_PREFIX:PATH=${{runner.workspace}}/install-${{matrix.dim}}d-${{matrix.enable_eb}}-single \
245+ -DCMAKE_BUILD_TYPE:STRING=Release \
246+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
247+ -DPELE_DIM:STRING=${{matrix.dim}} \
248+ -DPELE_PRECISION:STRING=SINGLE \
249+ -DCMAKE_CXX_FLAGS:STRING=-Wno-float-conversion \
250+ -DPELE_ENABLE_MPI:BOOL=ON \
251+ -DMPIEXEC_PREFLAGS:STRING=--oversubscribe \
252+ -DPELE_ENABLE_EB:BOOL=${{matrix.use_eb}} \
253+ -DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \
254+ -DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \
255+ ${{github.workspace}}
256+ - name : Build
257+ run : |
258+ ccache -z
259+ cmake --build ${{runner.workspace}}/build-${{matrix.dim}}d-${{matrix.enable_eb}}-single \
260+ --parallel ${{env.NPROCS}} 2>&1 | tee -a ${{runner.workspace}}/build-output.txt; \
261+ if [ ${PIPESTATUS[0]} -ne 0 ]; then exit 1; fi
262+ - name : Ccache Report
263+ run : |
264+ ccache -s
265+ du -hs ~/.cache/ccache
266+ - name : Report
267+ run : |
268+ echo "::add-matcher::.github/problem-matchers/gcc.json"
269+ egrep "Warning:|Error:|warning:|error:" ${{runner.workspace}}/build-output.txt \
270+ | egrep -v "Submodules/amrex|Submodules/sundials|Submodules/AMReX-Hydro" \
271+ | egrep -v "ld: warning:" | egrep -v "lto-wrapper: warning:" | sort | uniq \
272+ | awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > ${{runner.workspace}}/build-output-warnings.txt
273+ cat ${{runner.workspace}}/build-output-warnings.txt
274+ export return=$(tail -n 1 ${{runner.workspace}}/build-output-warnings.txt | awk '{print $2}')
275+ exit ${return}
276+ # - name: Test
277+ # run: |
278+ # cd ${{runner.workspace}}/build-${{matrix.dim}}d-${{matrix.enable_eb}}-single; \
279+ # ctest -LE no-ci -VV --output-on-failure; \
280+ # if [ $? -ne 0 ]; then exit 1; fi
281+
204282 GPU-Nvidia :
205283 name : GPU-CUDA
206284 needs : [Formatting, CPU-GNUmake]
@@ -247,9 +325,9 @@ jobs:
247325 uses : actions/cache@v4
248326 with :
249327 path : ~/.cache/ccache
250- key : ccache-${{github.workflow}}-${{github.job}}-git-${{github.sha}}
328+ key : ccache-${{github.workflow}}-${{github.job}}-${{matrix.enable_eb}}- git-${{github.sha}}
251329 restore-keys : |
252- ccache-${{github.workflow}}-${{github.job}}-git-
330+ ccache-${{github.workflow}}-${{github.job}}-${{matrix.enable_eb}}- git-
253331 - name : Configure
254332 run : |
255333 export PATH=/usr/local/nvidia/bin:/usr/local/cuda-12.6/bin:${PATH}
0 commit comments