Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize CI sanitizers pull request job #4596

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 39 additions & 15 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,6 @@ jobs:
- image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu24.04-builder:20250115
debugger: lldb
directives: runtimestats
- 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: use ${{ matrix.directives }}
container:
Expand All @@ -479,34 +476,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
Loading