Skip to content

Run with sanitizers #12

Run with sanitizers

Run with sanitizers #12

Workflow file for this run

name: Build and Test

Check failure on line 1 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

(Line: 17, Col: 20): Unexpected value '{ "image": "ghcr.io/xrplf/clio-ci:14342e087ceb8b593027198bf9ef06a43833c696" }', (Line: 19, Col: 7): Unexpected value 'include'
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
jobs:
build-and-test:
strategy:
matrix:
compiler: [gcc, clang]
sanitizer_ext: [.asan, .tsan, .ubsan]
build_type: [Release, Debug]
os: [heavy, heavy-arm64]
container: '{ "image": "ghcr.io/xrplf/clio-ci:14342e087ceb8b593027198bf9ef06a43833c696" }'
include:
compiler: apple-clang
sanitizer_ext: ""
build_type: [Release, Debug]
os: macos15
runs-on: ${{ matrix.os }}
container: ${{ inputs.container != '' && fromJson(inputs.container) || null }}
env:
BUILD_DIR: build
BUILD_TYPE: ${{ matrix.build_type }}
steps:
- name: Cleanup workspace
if: ${{ runner.os == 'macOS' }}
uses: XRPLF/actions/cleanup-workspace@cf0433aa74563aead044a1e395610c96d65a37cf
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Prepare runner
uses: XRPLF/actions/prepare-runner@2cbf481018d930656e9276fcc20dc0e3a0be5b6d
with:
enable_ccache: false
- name: Run Conan
env:
CONAN_PROFILE: ${{ matrix.compiler }}${{ matrix.sanitizer_ext }}
run: |
conan install . \
-of "${BUILD_DIR}" \
-b missing \
-s "build_type=${BUILD_TYPE}" \
-o "&:with_tests=True" \
--profile:all "${CONAN_PROFILE}"
- name: Run CMake
run: |
cmake \
-B "${BUILD_DIR}" \
-S . \
-G Ninja \
-DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \
-DCMAKE_BUILD_TYPE="${BUILD_TYPE}"
- name: Build
run: ninja
working-directory: ${{ env.BUILD_DIR }}
- name: Run tests
run: ctest --output-on-failure
working-directory: ${{ env.BUILD_DIR }}