Skip to content

Commit 7d6c759

Browse files
committed
Switch back if-else
1 parent 61c2b0a commit 7d6c759

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

.github/workflows/testing.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -87,31 +87,32 @@ jobs:
8787
8888
- name: Test with pytest
8989
run: |
90-
case "${{ matrix.toolchain.compiler }}" in
91-
gcc)
92-
case "${{ matrix.build }}" in
93-
debug)
94-
export FFLAGS="-g -O0 -fcheck=all -fbacktrace"
95-
export OMP_NUM_THREADS=1
96-
;;
97-
optimized)
98-
export FFLAGS="-O1 -fopenmp"
99-
export OMP_NUM_THREADS=2
100-
;;
101-
*)
102-
echo "Unknown build type: ${{ matrix.build }}"
103-
exit 1
104-
;;
105-
esac
106-
intel)
107-
echo "Using Intel compiler"
108-
exit 1 # Temporarily disable Intel compiler testing
109-
;;
110-
*)
111-
echo "Unknown compiler: ${{ matrix.toolchain.compiler }}"
90+
if [ "${{ matrix.toolchain.compiler }}" = "gcc" ]; then
91+
if [ "${{ matrix.build }}" = "debug" ]; then
92+
export FFLAGS="-g -O0 -fcheck=all -fbacktrace"
93+
export OMP_NUM_THREADS=1
94+
elif [ "${{ matrix.build }}" = "optimized" ]; then
95+
export FFLAGS="-O1 -fopenmp"
96+
export OMP_NUM_THREADS=2
97+
else
98+
echo "Unknown build type: ${{ matrix.build }}"
11299
exit 1
113-
;;
114-
esac
100+
fi
101+
elif [ "${{ matrix.toolchain.compiler }}" = "intel" ]; then
102+
if [ "${{ matrix.build }}" = "debug" ]; then
103+
export FFLAGS="-g -O0 -check all -traceback"
104+
export OMP_NUM_THREADS=1
105+
elif [ "${{ matrix.build }}" = "optimized" ]; then
106+
export FFLAGS="-O1 -qopenmp"
107+
export OMP_NUM_THREADS=2
108+
else
109+
echo "Unknown build type: ${{ matrix.build }}"
110+
exit 1
111+
fi
112+
else
113+
echo "Unknown compiler: ${{ matrix.toolchain.compiler }}"
114+
exit 1
115+
fi
115116
echo "FFLAGS: $FFLAGS"
116117
echo "OMP_NUM_THREADS: $OMP_NUM_THREADS"
117118
cd ${CLAW}/amrclaw

0 commit comments

Comments
 (0)