From 7efd232b3175894e04e707d4cbb0c43be1b1bc67 Mon Sep 17 00:00:00 2001 From: StellaSmith Date: Wed, 23 Mar 2022 13:38:58 -0300 Subject: [PATCH] Stop building when an step fails --- .github/workflows/linux.yml | 7 ++++--- .github/workflows/mingw.yml | 5 +++-- .github/workflows/msys2.yml | 5 +++-- tools/build_mingw.sh | 2 ++ tools/build_unix.sh | 5 +++-- 5 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c179a94..1451931 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -50,10 +50,11 @@ jobs: - name: Configure & Build Tools run: | + set -e export PATH="/usr/lib/ccache/bin:/usr/local/opt/ccache/libexec:$PATH" cmake -S tools/ -B build/tools-build/ -DCMAKE_BUILD_TYPE=Release cmake --build build/tools-build/ --parallel - cmake --install build/tools-build/ --prefix build/tools-install/ + exec cmake --install build/tools-build/ --prefix build/tools-install/ - name: Configure env: @@ -61,9 +62,9 @@ jobs: CXX: ${{ matrix.compiler.cxx }} run: | export PATH="/usr/lib/ccache/bin:/usr/local/opt/ccache/libexec:build/tools-install/bin:$PATH" - cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + exec cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - name: Build run: | export PATH="/usr/lib/ccache/bin:/usr/local/opt/ccache/libexec:build/tools-install/bin:$PATH" - cmake --build build --parallel \ No newline at end of file + exec cmake --build build --parallel \ No newline at end of file diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 33c1c70..102acee 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -55,10 +55,11 @@ jobs: - name: Configure & Build Tools run: | + set -e export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" cmake -S tools/ -B build/tools-build/ -DCMAKE_BUILD_TYPE=Release cmake --build build/tools-build/ --parallel - cmake --install build/tools-build/ --prefix build/tools-install/ + exec cmake --install build/tools-build/ --prefix build/tools-install/ - name: Configure env: @@ -80,7 +81,7 @@ jobs: CXXFLAGS: ${{ matrix.target_host.cxxflags }} run: | export PATH="/usr/lib/ccache/bin:/usr/local/opt/ccache/libexec:build/tools-install/bin:$PATH" - cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.target_host.arch }} -DCMAKE_FIND_ROOT_PATH=/usr/${{ matrix.target_host.toolchain }} -DCMAKE_SYSROOT=/usr/${{ matrix.target_host.toolchain }} + exec cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.target_host.arch }} -DCMAKE_FIND_ROOT_PATH=/usr/${{ matrix.target_host.toolchain }} -DCMAKE_SYSROOT=/usr/${{ matrix.target_host.toolchain }} - name: Build run: cmake --build build --parallel \ No newline at end of file diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml index 92af3c0..3403bd2 100644 --- a/.github/workflows/msys2.yml +++ b/.github/workflows/msys2.yml @@ -50,9 +50,10 @@ jobs: - name: Configure & Build Tools run: | + set -e cmake -S tools/ -B build/tools-build/ -DCMAKE_BUILD_TYPE=Release cmake --build build/tools-build/ --parallel - cmake --install build/tools-build/ --prefix build/tools-install/ + exec cmake --install build/tools-build/ --prefix build/tools-install/ - name: Configure env: @@ -63,7 +64,7 @@ jobs: CXXFLAGS: -Wa,-mbig-obj run: | export PATH="build/tools-install/bin:$PATH" - cmake -S ./ -B build/ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + exec cmake -S ./ -B build/ -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - name: Build run: cmake --build build --parallel \ No newline at end of file diff --git a/tools/build_mingw.sh b/tools/build_mingw.sh index c440a52..ed79af4 100755 --- a/tools/build_mingw.sh +++ b/tools/build_mingw.sh @@ -5,6 +5,8 @@ # Build tools ### +set -e + cmake -S tools/ -B build/tools-build/ -DCMAKE_BUILD_TYPE=Release cmake --build build/tools-build/ --parallel cmake --install build/tools-build/ --prefix build/tools-install/ diff --git a/tools/build_unix.sh b/tools/build_unix.sh index 3e19231..95813de 100755 --- a/tools/build_unix.sh +++ b/tools/build_unix.sh @@ -1,5 +1,7 @@ #!/bin/sh +set -e + cmake -S tools/ -B build/tools-build/ -DCMAKE_BUILD_TYPE=Release cmake --build build/tools-build/ --parallel cmake --install build/tools-build/ --prefix build/tools-install/ @@ -7,5 +9,4 @@ cmake --install build/tools-build/ --prefix build/tools-install/ export PATH=build/tools-install/bin:$PATH cmake -S ./ -B build/ -DCMAKE_BUILD_TYPE=Release -cmake --build build/ --parallel -cmake --install build/ --prefix install/ \ No newline at end of file +exec cmake --build build/ --parallel