Skip to content

Commit

Permalink
CI: explicit exit with value 1 on error
Browse files Browse the repository at this point in the history
Force the exit with value 1 when cmake or make command fails.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
  • Loading branch information
arnopo committed May 13, 2024
1 parent 1974e90 commit bb4fae2
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/actions/build_ci/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ build_generic(){
apt-get install -y gcc-arm-none-eabi &&
mkdir -p build-generic &&
cd build-generic &&
cmake .. -DCMAKE_TOOLCHAIN_FILE=template-generic &&
make VERBOSE=1 &&
cmake .. -DCMAKE_TOOLCHAIN_FILE=template-generic || exit 1
make VERBOSE=1 || exit 1
exit 0
}

Expand All @@ -55,8 +55,8 @@ build_freertos(){
cmake .. -DCMAKE_TOOLCHAIN_FILE=template-freertos \
-DCMAKE_C_FLAGS="-I$PWD/../FreeRTOSv10.0.1/FreeRTOS/Source/include/ \
-I$PWD/../FreeRTOSv10.0.1/FreeRTOS/Demo/CORTEX_STM32F107_GCC_Rowley \
-I$PWD/../FreeRTOSv10.0.1/FreeRTOS/Source/portable/GCC/ARM_CM3" &&
make VERBOSE=1 &&
-I$PWD/../FreeRTOSv10.0.1/FreeRTOS/Source/portable/GCC/ARM_CM3" || exit 1
make VERBOSE=1 || exit 1
exit 0
}

Expand Down Expand Up @@ -98,28 +98,31 @@ build_zephyr(){
echo "PATCHLEVEL = 0" >>VERSION &&
echo "VERSION_TWEAK = 0" >>VERSION &&
echo "###### Build for qemu_cortex_m3 ######" &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_cortex_m3 -DWITH_TESTS=on -Bbuild-zephyr-m3 &&
cd build-zephyr-m3 &&
make VERBOSE=1 &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_cortex_m3 -DWITH_TESTS=on -Bbuild-zephyr-m3 || exit 1
cd build-zephyr-m3 || exit 1
make VERBOSE=1 || exit 1
cd .. &&
echo "###### Build for qemu_cortex_a53 ######" &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_cortex_a53 -DWITH_TESTS=on -Bbuild-zephyr-a53 &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_cortex_a53 -DWITH_TESTS=on -Bbuild-zephyr-a53 \
|| exit 1
cd build-zephyr-a53 &&
make VERBOSE=1 &&
make VERBOSE=1 || exit 1
cd .. &&
echo "###### Build for qemu_xtensa ######" &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_xtensa -DWITH_TESTS=on -Bbuild-zephyr-xtensa &&
cd build-zephyr-xtensa &&
cd .. &&
echo "###### Build for qemu_riscv64 ######" &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_riscv64 -DWITH_TESTS=on -Bbuild-zephyr-rscv64 &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_riscv64 -DWITH_TESTS=on -Bbuild-zephyr-rscv64 \
|| exit 1
cd build-zephyr-rscv64 &&
make VERBOSE=1 &&
make VERBOSE=1 || exit 1
cd .. &&
echo "###### Build for qemu_riscv32 ######" &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_riscv32 -DWITH_TESTS=on -Bbuild-zephyr-rscv32 &&
cmake . -DWITH_ZEPHYR=on -DBOARD=qemu_riscv32 -DWITH_TESTS=on -Bbuild-zephyr-rscv32 \
|| exit 1
cd build-zephyr-rscv32 &&
make VERBOSE=1 &&
make VERBOSE=1 || exit 1
exit 0
}

Expand Down

0 comments on commit bb4fae2

Please sign in to comment.