Skip to content

CI: add nightly CI job with looped sanitizers #1322

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

Merged
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
80 changes: 80 additions & 0 deletions .github/workflows/nightly_looped_sanitizers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Check code with looped compilers' sanitizers
# This build lasts 6 hours.
name: Sanitizers - Looped

# This job is run every Saturday at 01:00 UTC or on demand.
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 6' # every Saturday at 01:00 UTC

env:
BUILD_DIR : "${{github.workspace}}/build"
INSTL_DIR : "${{github.workspace}}/install-dir"

permissions:
contents: read

jobs:
ubuntu-build:
name: Ubuntu
strategy:
fail-fast: false
matrix:
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}, {c: icx, cxx: icpx}]
# TSAN is mutually exclusive with other sanitizers
sanitizers: [{asan: ON, ubsan: ON, tsan: OFF}, {asan: OFF, ubsan: OFF, tsan: ON}]
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Install apt packages
run: |
sudo apt-get update
sudo apt-get install -y clang cmake libhwloc-dev libnuma-dev libtbb-dev

- name: Install oneAPI basekit
if: matrix.compiler.cxx == 'icpx'
run: |
sudo apt-get install -y gpg-agent wget
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install -y intel-oneapi-ippcp-devel intel-oneapi-ipp-devel intel-oneapi-common-oneapi-vars intel-oneapi-compiler-dpcpp-cpp

- name: Configure build
run: >
${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh &&' || ''}}
cmake
-B ${{env.BUILD_DIR}}
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
-DCMAKE_BUILD_TYPE=Debug
-DUMF_BUILD_SHARED_LIBRARY=OFF
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON
-DUMF_BUILD_CUDA_PROVIDER=ON
-DUMF_FORMAT_CODE_STYLE=OFF
-DUMF_DEVELOPER_MODE=ON
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
-DUMF_USE_ASAN=${{matrix.sanitizers.asan}}
-DUMF_USE_UBSAN=${{matrix.sanitizers.ubsan}}
-DUMF_USE_TSAN=${{matrix.sanitizers.tsan}}
-DUMF_BUILD_EXAMPLES=ON
-DUMF_TESTS_FAIL_ON_SKIP=ON

- name: Build UMF
run: |
${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }}
cmake --build ${{env.BUILD_DIR}} -j $(nproc)

- name: Run tests
working-directory: ${{env.BUILD_DIR}}
env:
ASAN_OPTIONS: allocator_may_return_null=1
TSAN_OPTIONS: allocator_may_return_null=1
run: while ctest --output-on-failure; do date; done && exit 1
Loading