Files
2026-05-01 13:17:27 +02:00

73 lines
1.7 KiB
YAML

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- "**"
tags-ignore:
- "*"
env:
BUILD_DIR: build-ci
BUILD_TYPE: Release
permissions:
contents: read
jobs:
build-test:
name: Build and test Linux
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsmbclient-dev
- name: Install Conan
run: |
python -m pip install --upgrade pip
python -m pip install "conan>=2,<3"
conan profile detect --force
- name: Cache Conan packages
uses: actions/cache@v4
with:
path: ~/.conan2
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.txt') }}
restore-keys: |
conan-${{ runner.os }}-
- name: Configure CI tests
run: |
cmake \
-S . \
-B "$BUILD_DIR" \
-DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
-DC2CORE_BUILD_TESTS=ON \
-DC2CORE_BUILD_FUNCTIONAL_TESTS=OFF \
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="$GITHUB_WORKSPACE/conan_provider.cmake"
- name: Build
run: cmake --build "$BUILD_DIR" --config "$BUILD_TYPE" --parallel "$(nproc)"
- name: Run CI tests
run: ctest --test-dir "$BUILD_DIR" --output-on-failure --timeout 60
- name: Functional tests
if: ${{ false }}
run: echo "Functional tests require a lab/runtime environment and are intentionally skipped in standard CI."