Use CMake to detect if std format is available (#544) #4
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: gcc-12 | |
on: | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
pull_request: | |
env: | |
BUILD_TYPE: Debug | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install apt-get dependencies | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install -y g++-12 ninja-build build-essential | |
- name: Initialize submodules | |
run: git submodule update --init --recursive | |
- name: Configure CMake | |
run: | | |
cmake -B ${{github.workspace}}/build \ | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ | |
-DCMAKE_CXX_COMPILER=g++-12 \ | |
-GNinja | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest --output-on-failure |