Sanity check order of instrumentation points, handle missing end case #137
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/paratoolsinc/salt-dev:1.3 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Print working directory | |
run: | | |
echo "Working directory: $(pwd)" | |
echo "Working directory contents:" | |
ls -la | |
- name: Configure SALT | |
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Wdev -Wdeprecated -G Ninja -S . -B build | |
- name: Compile SALT | |
id: build | |
run: | | |
echo "Cores: $(nproc) " | |
if cmake --build build --parallel $(nproc) ; then | |
echo "build_status=success" >> $GITHUB_OUTPUT | |
else | |
echo "build_status=failure" >> $GITHUB_OUTPUT | |
echo "::error::Initial build failed, re-attempting build with verbose output but failing CI" | |
echo "Initial build failed, re-attempting build with verbose output but failing CI" | |
if ! cmake --build build --verbose ; then | |
echo "Verbose build failed on second attempt" | |
echo "::error::Verbose build failed on second attempt" | |
exit 1 | |
fi | |
fi | |
- name: Run Tests | |
working-directory: build | |
run: | | |
if ! ctest -j --output-on-failure ; then | |
echo "::error::Tests failed, re-running tests with verbose output" | |
echo "Tests failed, re-running tests with verbose output" | |
if ! ctest --rerun-failed --verbose ; then | |
echo "Rerunning failed tests failed on second attempt" | |
echo "::error::Rerunning failed tests failed on second attempt" | |
fi | |
exit 1 | |
fi | |
- name: Fail CI on build failure | |
if: ${{ steps.build.outputs.build_status == 'failure' }} | |
run: echo "Failing build" ; exit 1 |