Skip to content

Commit 129c7bc

Browse files
committed
Modify settings of action script
1 parent 5207170 commit 129c7bc

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

.github/workflows/testing.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -86,42 +86,42 @@ jobs:
8686
8787
- name: Test with pytest
8888
run: |
89-
if [ "${{ matrix.build }}" == "debug" ]; then
90-
if [ "${{ matrix.toolchain.compiler}}" == "gcc" ]; then
91-
export FFLAGS="-O0 -W -Wall -fbounds-check -fcheck=all -pedantic-errors -Wunderflow -fbacktrace -ffpe-trap=invalid,zero,overflow -g"
92-
elif [ "${{ matrix.toolchain.compiler}}" == "intel" ]; then
93-
export FFLAGS="-O0 -g -check all -warn all -traceback"
94-
elif [ "${{ matrix.toolchain.compiler}}" == "intel-classic" ]; then
95-
export FFLAGS="-O0 -g -check all -warn all -traceback"
96-
elif [ "${{ matrix.toolchain.compiler}}" == "nvidia-hpc" ]; then
97-
export FFLAGS="-O0 -g -check all -warn all -traceback"
98-
elif [ "${{ matrix.toolchain.compiler}}" == "lfortran" ]; then
99-
export FFLAGS="-O0 -g -fcheck=all -fbacktrace
100-
else
101-
echo "Unknown compiler: ${{ matrix.toolchain.compiler }}"
89+
case "${{ matrix.toolchain.compiler }}" in
90+
gcc)
91+
case "${{ matrix.build }}" in
92+
debug)
93+
export FFLAGS="-g -Wall -Wextra -Werror"
94+
export OMP_NUM_THREADS=1
95+
;;
96+
optimized)
97+
export FFLAGS="-O1"
98+
export OMP_NUM_THREADS=2
99+
;;
100+
*)
101+
echo "ERROR: Unknown build type: ${{ matrix.build }}"
102+
exit 1
103+
;;
104+
esac
105+
intel)
106+
case "${{ matrix.build }}" in
107+
debug)
108+
export FFLAGS="-g -Wall -Wextra -Werror"
109+
export OMP_NUM_THREADS=1
110+
;;
111+
optimized)
112+
export FFLAGS="-O1 -xHost -qopenmp"
113+
export OMP_NUM_THREADS=2
114+
;;
115+
*)
116+
echo "ERROR: Unknown build type: ${{ matrix.build }}"
117+
exit 1
118+
;;
119+
esac
120+
*)
121+
echo "ERROR: Unknown compiler: ${{ matrix.toolchain.compiler }}"
102122
exit 1
103-
fi
104-
export OMP_NUM_THREADS=1
105-
elif [ "${{ matrix.build }}" == "optimized" ]; then
106-
if [ "${{ matrix.toolchain.compiler}}" == "gcc" ]; then
107-
export FFLAGS="-O1 -march=native -mtune=native -fopenmp"
108-
elif [ "${{ matrix.toolchain.compiler}}" == "intel" ]; then
109-
export FFLAGS="-O1 -xHost -qopenmp"
110-
elif [ "${{ matrix.toolchain.compiler}}" == "intel-classic" ]; then
111-
export FFLAGS="-O1 -xHost -qopenmp"
112-
elif [ "${{ matrix.toolchain.compiler}}" == "nvidia-hpc" ]; then
113-
export FFLAGS="-O1 -xHost -qopenmp"
114-
elif [ "${{ matrix.toolchain.compiler}}" == "lfortran" ]; then
115-
export FFLAGS="-O1 -fopenmp"
116-
else
117-
echo "Unknown compiler: ${{ matrix.toolchain.compiler }}"
118-
exit 1
119-
fi
120-
export OMP_NUM_THREADS=2
121-
else
122-
echo "Unknown build type: ${{ matrix.build }}"
123-
exit 1
124-
fi
123+
;;
124+
esac
125125
cd ${CLAW}/amrclaw
126126
pytest
127127

0 commit comments

Comments
 (0)