Initial commit #5
This file contains hidden or 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
| # Eggs.Stacktrace | |
| # | |
| # Copyright (c) 2026 Agustin Berge | |
| # | |
| # Distributed under the Boost Software License, Version 1.0. | |
| # See accompanying file LICENSE.txt or copy at | |
| # http://www.boost.org/LICENSE_1_0.txt | |
| name: sanitize | |
| on: | |
| push: | |
| branches: [ main, feature/** ] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| asan: | |
| name: ubuntu-24.04 / ASan + UBSan | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install CMake | |
| uses: lukka/get-cmake@latest | |
| with: | |
| cmakeVersion: "4.4.0" | |
| - name: Set up APT package cache | |
| run: | | |
| mkdir -p ~/.cache/apt/archives/partial | |
| echo "Dir::Cache::archives \"$HOME/.cache/apt/archives\";" \ | |
| | sudo tee /etc/apt/apt.conf.d/99user-cache | |
| - name: Cache APT packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/apt/archives | |
| key: apt-ubuntu-24.04-clang-22-${{ hashFiles('.github/workflows/sanitize.yml') }} | |
| restore-keys: apt-ubuntu-24.04-clang-22- | |
| - name: Install Clang 22 | |
| run: | | |
| wget -q https://apt.llvm.org/llvm.sh | |
| sudo bash llvm.sh 22 all | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-22 200 | |
| sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-22 200 | |
| - name: Fix APT cache permissions | |
| if: always() | |
| run: sudo rm -rf ~/.cache/apt/archives/lock ~/.cache/apt/archives/partial | |
| - name: Configure | |
| run: cmake --preset asan -B build/asan | |
| - name: Build | |
| run: cmake --build --preset asan | |
| - name: Test | |
| run: ctest --preset asan |