Skip to content

Commit

Permalink
Also make the sanitizer tests nightly.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Sep 28, 2023
1 parent 077fc69 commit e9317f6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,39 +75,6 @@ jobs:
working-directory: ./build
if: matrix.unity == 'ON'

# Build with clang and test p4c on Ubuntu 20.04.
test-ubuntu20-clang-sanitizers:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
env:
CTEST_PARALLEL_LEVEL: 2
IMAGE_TYPE: test
COMPILE_WITH_CLANG: ON
BUILD_AUTO_VAR_INIT_PATTERN: ON
ENABLE_SANITIZERS: ON
UBSAN_OPTIONS: print_stacktrace=1
ASAN_OPTIONS: print_stacktrace=1:detect_leaks=0
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: test-${{ runner.os }}-clang
max-size: 1000M

- name: Build (Ubuntu 20.04, Clang, Sanitizers)
run: |
tools/ci-build.sh
- name: Run tests (Ubuntu 20.04)
# Need to use sudo for the eBPF kernel tests.
run: sudo -E ctest --output-on-failure --schedule-random
working-directory: ./build

# Build and test p4c on Fedora.
test-fedora-linux:
strategy:
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/ci-ubuntu-20-sanitizer-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "test-p4c-ubuntu-20.04-sanitizers"

on:
schedule:
# Every day on midnight UTC
- cron: '0 0 * * *'

# Cancel any preceding run on the pull request.
concurrency:
group: test-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# Build with clang and test p4c on Ubuntu 20.04.
test-ubuntu20-clang-sanitizers:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
env:
CTEST_PARALLEL_LEVEL: 2
IMAGE_TYPE: test
COMPILE_WITH_CLANG: ON
BUILD_AUTO_VAR_INIT_PATTERN: ON
ENABLE_SANITIZERS: ON
UBSAN_OPTIONS: print_stacktrace=1
ASAN_OPTIONS: print_stacktrace=1:detect_leaks=0
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: test-${{ runner.os }}-clang
max-size: 1000M

- name: Build (Ubuntu 20.04, Clang, Sanitizers)
run: |
tools/ci-build.sh
- name: Run tests (Ubuntu 20.04)
# Need to use sudo for the eBPF kernel tests.
run: sudo -E ctest --output-on-failure --schedule-random
working-directory: ./build

0 comments on commit e9317f6

Please sign in to comment.