Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Run sanitizers in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty committed Jun 19, 2024
1 parent 992f140 commit a4c954b
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Sanitizers

on: [pull_request, push]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- sanitizer-name: asan with sleipnir
cmake-args: "-DCMAKE_BUILD_TYPE=Asan"
optimizer_backend: sleipnir
os: ubuntu-24.04
- sanitizer-name: tsan
cmake-args: "-DCMAKE_BUILD_TYPE=Tsan"
optimizer_backend: sleipnir with sleipnir
os: ubuntu-24.04
- sanitizer-name: ubsan with sleipnir
cmake-args: "-DCMAKE_BUILD_TYPE=Ubsan"
optimizer_backend: sleipnir
os: ubuntu-24.04
- sanitizer-name: asan with casadi
cmake-args: "-DCMAKE_BUILD_TYPE=Asan"
optimizer_backend: casadi
os: ubuntu-24.04
- sanitizer-name: tsan
cmake-args: "-DCMAKE_BUILD_TYPE=Tsan"
optimizer_backend: sleipnir with casadi
os: ubuntu-24.04
- sanitizer-name: ubsan with casadi
cmake-args: "-DCMAKE_BUILD_TYPE=Ubsan"
optimizer_backend: casadi
os: ubuntu-24.04

name: "${{ matrix.sanitizer-name }}"
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Make GCC 14 the default toolchain (Linux)
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 200
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 200
- run: cmake -B build -S . -DBUILD_EXAMPLES=ON ${{ matrix.cmake-args }} -DOPTIMIZER_BACKEND=${{ matrix.optimizer_backend }}

0 comments on commit a4c954b

Please sign in to comment.