Skip to content

Attempt getting clang installed and working first in the pipeline #2

Attempt getting clang installed and working first in the pipeline

Attempt getting clang installed and working first in the pipeline #2

Workflow file for this run

name: Libdbc Tests
on: [push]
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
continue-on-error: true
strategy:
matrix:
cxx:
# - g++-13
- clang++-16
build_type: [Debug, Release]
std: [11]
include:
# - cxx: g++-13
- cxx: clang++-16
llvm_version: 16
steps:
- uses: actions/checkout@v4
- name: Install clang
if: ${{ matrix.llvm_version }} != ""
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh ${{ matrix.llvm_version }}
- 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