Skip to content

Commit

Permalink
Reorganize CI sanitizers pull request job
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Jan 24, 2025
1 parent c21a80f commit 61a33d7
Showing 1 changed file with 39 additions and 12 deletions.
51 changes: 39 additions & 12 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -479,34 +479,61 @@ jobs:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt') }}
- name: Build Debug Runtime
if: matrix.directives != 'pool_memalign,address_sanitizer,undefined_behavior_sanitizer'
run: |
make configure arch=x86-64 config=debug use=${{ matrix.directives }}
make build config=debug
- name: Test with Debug Runtime
if: matrix.directives != 'pool_memalign,address_sanitizer,undefined_behavior_sanitizer'
run: make test-ci config=debug usedebugger='${{ matrix.debugger }}'
- name: Build Release Runtime
if: matrix.directives != 'pool_memalign,address_sanitizer,undefined_behavior_sanitizer'
run: |
make configure arch=x86-64 config=release use=${{ matrix.directives }}
make build config=release
- name: Test with Release Runtime
if: matrix.directives != 'pool_memalign,address_sanitizer,undefined_behavior_sanitizer'
run: make test-ci config=release usedebugger='${{ matrix.debugger }}'
- name: Build Debug Runtime (sanitizers)
if: matrix.directives == 'pool_memalign,address_sanitizer,undefined_behavior_sanitizer'

with_sanitizers:
runs-on: ubuntu-latest
needs: x86_64-linux

strategy:
fail-fast: false
matrix:
include:
- image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu24.04-builder:20250115
debugger: lldb
directives: pool_memalign,address_sanitizer,undefined_behavior_sanitizer

name: with sanitizers ${{ matrix.directives }}
container:
image: ${{ matrix.image }}
options: --user pony --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
steps:
- name: Checkout
uses: actions/[email protected]
- name: Restore Libs Cache
id: restore-libs
uses: actions/cache/restore@v4
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt') }}
- name: Build Libs
if: steps.restore-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Save Libs Cache
if: steps.restore-libs.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: build/libs
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt') }}
- name: Build Debug Runtime
run: |
ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make configure arch=x86-64 config=debug use=${{ matrix.directives }}
ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make build config=debug
- name: Test with Debug Runtime (sanitizers)
if: matrix.directives == 'pool_memalign,address_sanitizer,undefined_behavior_sanitizer'
- name: Test with Debug Runtime
run: ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make test-ci config=debug
- name: Build Release Runtime (sanitizers)
if: matrix.directives == 'pool_memalign,address_sanitizer,undefined_behavior_sanitizer'
- name: Build Release Runtime
run: |
ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make configure arch=x86-64 config=release use=${{ matrix.directives }}
ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make build config=release
- name: Test with Release Runtime (sanitizers)
if: matrix.directives == 'pool_memalign,address_sanitizer,undefined_behavior_sanitizer'
- name: Test with Release Runtime
run: ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make test-ci config=release

0 comments on commit 61a33d7

Please sign in to comment.