@@ -2,65 +2,67 @@ name: CI (Main)
22
33on :
44 push :
5- branches : ["master"]
5+ branches : [ "master" ]
66 paths-ignore :
77 - " docs/**"
88 - " **.md"
99 pull_request :
10- branches : ["master"]
10+ branches : [ "master" ]
1111 paths-ignore :
1212 - " docs/**"
1313 - " **.md"
1414
1515jobs :
1616 build-and-test :
1717 runs-on : ubuntu-26.04
18- timeout-minutes : 20
18+ timeout-minutes : 30
1919
2020 strategy :
2121 fail-fast : false
2222 matrix :
2323 compiler :
2424 - { cc: clang, cxx: clang++ }
2525 - { cc: gcc, cxx: g++ }
26- generator :
27- - Ninja
28- - Unix Makefiles
29- build-type :
30- - Debug
31- - Release
26+ sanitizer : [ tsan, asan ]
3227
3328 steps :
3429 - name : Checkout Repository
3530 uses : actions/checkout@v4
3631 with :
3732 submodules : recursive # condy lives in third_party/condy
3833
34+ - name : Load ublk Driver
35+ run : |
36+ sudo modprobe ublk_drv 2>/dev/null || true
37+ if [ ! -e /dev/ublk-control ]; then
38+ echo "::error:: /dev/ublk-control is not available on this runner"
39+ exit 1
40+ fi
41+
3942 - name : Configure CMake
4043 run : |
4144 COMPILER=$(${{matrix.compiler.cc}} --version | head -n 1)
4245 echo "Using compiler: $COMPILER"
46+ SANITIZER_FLAG=""
47+ if [ "${{ matrix.sanitizer }}" = "tsan" ]; then
48+ SANITIZER_FLAG="-DUBLKCPP_TESTS_TSAN=ON"
49+ elif [ "${{ matrix.sanitizer }}" = "asan" ]; then
50+ SANITIZER_FLAG="-DUBLKCPP_TESTS_ASAN=ON"
51+ fi
4352 cmake -B ${{github.workspace}}/build \
44- -G "${{ matrix.generator }}" \
53+ -G Ninja \
4554 -DUBLKCPP_BUILD_TESTS=ON \
4655 -DUBLKCPP_BUILD_UBLKCTL=ON \
47- -DUBLKCPP_TESTS_ASAN=ON \
56+ -DUBLKCPP_EXECUTION_BACKEND=stdexec \
57+ $SANITIZER_FLAG \
4858 -DCMAKE_C_COMPILER=${{matrix.compiler.cc}} \
4959 -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} \
50- -DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
60+ -DCMAKE_BUILD_TYPE=RelWithDebInfo
5161
5262 - name : Build
5363 run : cmake --build ${{github.workspace}}/build -j$(nproc)
5464
55- - name : Load ublk Driver
56- run : |
57- sudo modprobe ublk_drv 2>/dev/null || true
58- if [ ! -e /dev/ublk-control ]; then
59- echo "::error:: /dev/ublk-control is not available on this runner"
60- exit 1
61- fi
62-
6365 - name : Run Tests
64- timeout-minutes : 10
66+ timeout-minutes : 15
6567 working-directory : ${{github.workspace}}/build
6668 run : sudo ./tests/tests
0 commit comments