Skip to content

Commit

Permalink
Stop building when an step fails
Browse files Browse the repository at this point in the history
  • Loading branch information
StellaSmith committed Mar 23, 2022
1 parent 212c03e commit 7efd232
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,21 @@ 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:
CC: ${{ matrix.compiler.c }}
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
exec cmake --build build --parallel
5 changes: 3 additions & 2 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
5 changes: 3 additions & 2 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 2 additions & 0 deletions tools/build_mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
5 changes: 3 additions & 2 deletions tools/build_unix.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/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/

export PATH=build/tools-install/bin:$PATH

cmake -S ./ -B build/ -DCMAKE_BUILD_TYPE=Release
cmake --build build/ --parallel
cmake --install build/ --prefix install/
exec cmake --build build/ --parallel

0 comments on commit 7efd232

Please sign in to comment.