Weekly #4
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
# Various non-standard tests, requiring e.g. very long runs or just not required to be run very often. | |
name: Weekly | |
# 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" | |
N_ITER_SAN : 400 # Number of iterations for sanitizers looped job | |
permissions: | |
contents: read | |
jobs: | |
# Check code with looped compilers' sanitizers. With 1000 iterations it should take around 4,5 hours. | |
sanitizers-looped: | |
name: Sanitizers looped | |
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 .github/scripts/install_oneAPI.sh | |
- 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=OFF | |
-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: for i in {1..${{env.N_ITER_SAN}}}; do echo ">>> ITERATION no. ${i}" ; ctest --output-on-failure || exit 1; date; done |