Skip to content

Build

Build #831

Workflow file for this run

name: Build
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
schedule:
- cron: "0 0 * * *" # Daily
push:
jobs:
build-unix:
strategy:
fail-fast: false
matrix:
config: [Debug, Release]
os: [ubuntu-24.04]
compiler: [
#{ CC: gcc-9, CXX: g++-9, STD: 17 },
#{ CC: gcc-9, CXX: g++-9, STD: 20 },
#{ CC: gcc-10, CXX: g++-10, STD: 17 },
#{ CC: gcc-10, CXX: g++-10, STD: 20 },
#{ CC: gcc-11, CXX: g++-11, STD: 17 },
#{ CC: gcc-11, CXX: g++-11, STD: 20 },
#{ CC: gcc-11, CXX: g++-11, STD: 23 },
{ CC: gcc-12, CXX: g++-12, STD: 17 },
{ CC: gcc-12, CXX: g++-12, STD: 20 },
{ CC: gcc-12, CXX: g++-12, STD: 23 },
{ CC: gcc-13, CXX: g++-13, STD: 17 },
{ CC: gcc-13, CXX: g++-13, STD: 20 },
{ CC: gcc-13, CXX: g++-13, STD: 23 },
{ CC: gcc-14, CXX: g++-14, STD: 17 },
{ CC: gcc-14, CXX: g++-14, STD: 20 },
{ CC: gcc-14, CXX: g++-14, STD: 23 },
#{ CC: clang-11, CXX: clang++-11, STD: 17 },
#{ CC: clang-11, CXX: clang++-11, STD: 20 },
#{ CC: clang-12, CXX: clang++-12, STD: 17 },
#{ CC: clang-12, CXX: clang++-12, STD: 20 },
#{ CC: clang-12, CXX: clang++-12, STD: 23 },
#{ CC: clang-13, CXX: clang++-13, STD: 17 },
#{ CC: clang-13, CXX: clang++-13, STD: 20 },
#{ CC: clang-13, CXX: clang++-13, STD: 23 },
#{ CC: clang-14, CXX: clang++-14, STD: 17 },
#{ CC: clang-14, CXX: clang++-14, STD: 20 },
#{ CC: clang-14, CXX: clang++-14, STD: 23 },
#{ CC: clang-15, CXX: clang++-15, STD: 17 },
#{ CC: clang-15, CXX: clang++-15, STD: 20 },
#{ CC: clang-15, CXX: clang++-15, STD: 23 },
{ CC: clang-16, CXX: clang++-16, STD: 17 },
{ CC: clang-16, CXX: clang++-16, STD: 20 },
#{ CC: clang-16, CXX: clang++-16, STD: 23 },
{ CC: clang-17, CXX: clang++-17, STD: 17 },
{ CC: clang-17, CXX: clang++-17, STD: 20 },
#{ CC: clang-17, CXX: clang++-17, STD: 23 },
{ CC: clang-18, CXX: clang++-18, STD: 17 },
{ CC: clang-18, CXX: clang++-18, STD: 20 },
{ CC: clang-18, CXX: clang++-18, STD: 23 }
]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: CCache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.config }}-${{ matrix.compiler.CXX }}-${{ matrix.compiler.STD }}
- name: Configure
env:
CXX: ${{ matrix.compiler.CXX }}
CC: ${{ matrix.compiler.CC }}
run: |
which ${{ matrix.compiler.CC }} || sudo apt install ${{ matrix.compiler.CC }} || true
which ${{ matrix.compiler.CXX }} || sudo apt install ${{ matrix.compiler.CXX }} || true
cmake -S . -B build -DDINGO_DEVELOPMENT_MODE=ON -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_STANDARD=${{ matrix.compiler.STD }}
- name: Check Formatting
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
run: |
python -m pip install mdformat
cmake --build build -t md-verify
- name: Build
run: |
cmake --build build -j 2
- name: Test
env:
ASAN_OPTIONS: use_sigaltstack=false
run: |
cd build && ctest --verbose
- name: Benchmark
if: ${{ matrix.config == 'Release' }}
run: |
cd build && ./dingo_benchmark
- name: FetchContent
run: |
cmake -S test/fetchcontent -B fetchcontent-build -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_STANDARD=${{ matrix.compiler.STD }}
cmake --build fetchcontent-build -j 2
build-windows:
strategy:
fail-fast: false
matrix:
config: [Debug, Release]
os: [windows-2019, windows-2022]
std: [17, 20, 23]
runs-on: ${{ matrix.os }}
steps:
- name: MSBuild
uses: microsoft/setup-msbuild@v2
with:
vs-version: ${{ matrix.vs_version }}
msbuild-architecture: x64
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: |
cmake -S . -B build -DDINGO_DEVELOPMENT_MODE=ON -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_STANDARD=${{ matrix.std }}
- name: Check Formatting
run: |
python3 -m pip install mdformat
cmake --build build -t md-verify
- name: Build
run: |
cmake --build build --config ${{ matrix.config }} -j 2
- name: Test
run: |
build/${{ matrix.config }}/dingo_test
- name: Benchmark
if: ${{ matrix.config == 'Release' && matrix.os == 'windows-2019' }}
run: |
build/${{ matrix.config }}/dingo_benchmark
- name: FetchContent
run: |
cmake -S test/fetchcontent -B fetchcontent-build -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_STANDARD=${{ matrix.std }}
cmake --build fetchcontent-build -j 2