70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
name: cmake
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- ".github/workflows/cmake.yml"
|
|
- "include/**"
|
|
- "src/**"
|
|
- "tests/**"
|
|
- "CMakeLists.txt"
|
|
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- ".github/workflows/cmake.yml"
|
|
- "include/**"
|
|
- "src/**"
|
|
- "tests/**"
|
|
- "config/**"
|
|
- "CMakeLists.txt"
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-2025
|
|
build_type: RelWithDebInfo
|
|
- os: ubuntu-24.04
|
|
build_type: Debug
|
|
- os: macos-15
|
|
build_type: Debug
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Pixi
|
|
uses: prefix-dev/setup-pixi@v0.9.3
|
|
with:
|
|
pixi-version: v0.59.0
|
|
environments: develop
|
|
activate-environment: true
|
|
cache: true
|
|
locked: true
|
|
|
|
- name: Build clice
|
|
shell: bash
|
|
run: |
|
|
cmake -B build -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
|
|
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain.cmake \
|
|
-DCLICE_ENABLE_TEST=ON \
|
|
-DCLICE_CI_ENVIRONMENT=ON
|
|
cmake --build build
|
|
|
|
- name: Run tests
|
|
shell: bash
|
|
run: |
|
|
EXE_EXT=""
|
|
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
|
EXE_EXT=".exe"
|
|
fi
|
|
./build/bin/unit_tests${EXE_EXT} --test-dir="./tests/data"
|
|
uv run --project tests pytest -s --log-cli-level=INFO tests/integration --executable=./build/bin/clice${EXE_EXT}
|