Attempt to override clang-format link in github and set makeavailable… #33
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Libdbc Pipeline | |
on: [push] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
linux-builds: | |
name: linux ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
cxx: | |
- g++-13 | |
- clang++-16 | |
build_type: [Debug, Release] | |
std: [11] | |
include: | |
- cxx: g++-13 | |
cc: gcc-13 | |
- cxx: clang++-16 | |
cc: 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 locales | |
sudo locale-gen de_DE.UTF-8 | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
source "$HOME/.cargo/env" | |
- name: Configure build | |
working-directory: ${{runner.workspace}} | |
env: | |
CC: ${{matrix.cc}} | |
CXX: ${{matrix.cxx}} | |
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 \ | |
-DDBC_GENERATE_SINGLE_HEADER=ON | |
- name: Build tests + lib | |
working-directory: ${{runner.workspace}} | |
run: cmake --build build --parallel `nproc` | |
- name: Run tests | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
working-directory: ${{runner.workspace}} | |
run: ctest --output-on-failure --test-dir build -j `nproc` | |
windows-build: | |
name: ${{matrix.os}}, ${{matrix.std}}, ${{matrix.build_type}}, ${{matrix.platform}} | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2019, windows-2022] | |
platform: [Win32, x64] | |
build_type: [Debug, Release] | |
std: [11] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure build | |
working-directory: ${{runner.workspace}} | |
run: | | |
cmake -S $Env:GITHUB_WORKSPACE ` | |
-B ${{runner.workspace}}/build ` | |
-A ${{matrix.platform}} ` | |
-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 --config ${{matrix.build_type}} --parallel %NUMBER_OF_PROCESSORS% | |
shell: cmd | |
- name: Run tests | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
working-directory: ${{runner.workspace}} | |
run: ctest --output-on-failure --test-dir build -j %NUMBER_OF_PROCESSORS% | |
shell: cmd | |
macos-builds: | |
name: macos ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
cxx: | |
- g++ | |
- clang++ | |
build_type: [Debug, Release] | |
std: [11] | |
include: | |
- cxx: g++ | |
cc: gcc | |
- cxx: clang++ | |
cc: clang | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure build | |
working-directory: ${{runner.workspace}} | |
env: | |
CC: ${{matrix.cc}} | |
CXX: ${{matrix.cxx}} | |
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 --parallel `sysctl -n hw.ncpu` | |
- name: Run tests | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
working-directory: ${{runner.workspace}} | |
run: ctest --output-on-failure --test-dir build -j `sysctl -n hw.ncpu` | |
format-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install clang-format version | |
run: | | |
wget https://apt.llvm.org/llvm.sh | |
chmod +x llvm.sh | |
sudo ./llvm.sh 16 | |
ln -sf $(which clang-format-16) $(which clang-format) | |
clang-format --version | |
- name: Test format with clang format | |
run: ./scripts/fmt.sh | |