Skip to content

renaming tests.yml to pipeline.yml #1

renaming tests.yml to pipeline.yml

renaming tests.yml to pipeline.yml #1

Workflow file for this run

name: Libdbc Tests
on: [push, pull_request]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
linux-builds:
name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
runs-on: ubuntu-latest
strategy:
matrix:
cxx:
- g++-13
- clang++-16
build_type: [Debug, Release]
std: [11]
include:
- cxx: g++-13
other_pkgs: g++-13
- cxx: clang++-16
other_pkgs: clang-16
steps:
- uses: actions/checkout@v4
- name: Prepare environment
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ${{matrix.other_pkgs}}
- name: Configure build
working-directory: ${{runner.workspace}}
env:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
run: |
cmake -Bbuild -H$GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
-DCMAKE_CXX_EXTENSIONS=ON \
-DDBC_TEST_LOCALE_INDEPENDENCE=ON
- name: Build tests + lib
working-directory: ${{runner.workspace}}
run: cmake --build build
- name: Run tests
env:
CTEST_OUTPUT_ON_FAILURE: 1
working-directory: ${{runner.workspace}}
run: ctest --output-on-failure --test-dir build -j `nproc`
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test format with clang format
run: ./scripts/fmt.sh