Skip to content

v0.1

v0.1 #10

Workflow file for this run

name: CI (Main)
on:
push:
branches: ["master"]
paths-ignore:
- "docs/**"
- "**.md"
pull_request:
branches: ["master"]
paths-ignore:
- "docs/**"
- "**.md"
jobs:
build-and-test:
runs-on: ubuntu-26.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
compiler:
- { cc: clang, cxx: clang++ }
- { cc: gcc, cxx: g++ }
generator:
- Ninja
- Unix Makefiles
build-type:
- Debug
- Release
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive # condy lives in third_party/condy
- name: Configure CMake
run: |
COMPILER=$(${{matrix.compiler.cc}} --version | head -n 1)
echo "Using compiler: $COMPILER"
cmake -B ${{github.workspace}}/build \
-G "${{ matrix.generator }}" \
-DUBLKCPP_BUILD_TESTS=ON \
-DUBLKCPP_BUILD_UBLKCTL=ON \
-DUBLKCPP_TESTS_ASAN=ON \
-DCMAKE_C_COMPILER=${{matrix.compiler.cc}} \
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }}
- name: Build
run: cmake --build ${{github.workspace}}/build -j$(nproc)
- name: Load ublk Driver
run: |
sudo modprobe ublk_drv 2>/dev/null || true
if [ ! -e /dev/ublk-control ]; then
echo "::error:: /dev/ublk-control is not available on this runner"
exit 1
fi
- name: Run Tests
timeout-minutes: 10
working-directory: ${{github.workspace}}/build
run: sudo ./tests/tests