e Update to doctest 2.4.11 to fix mac CI builds #1647
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: build | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
schedule: | |
- cron: '16 0 * * 3,6' # <https://crontab.guru/#16_0_*_*_3,6> - "At 00:16 on Wednesday and Saturday." | |
jobs: | |
clang-format: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- uses: DoozyX/[email protected] | |
with: | |
source: '.' | |
exclude: './third_party' | |
inplace: True | |
clangFormatVersion: 9 | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: Clang GitHub Action | |
author_email: [email protected] | |
message: 'r Reformat with clang-format' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Commented-out, as it keeps failing with http 429 error - too many requests | |
# e.g. https://github.com/approvals/ApprovalTests.cpp/runs/541867195 | |
# markdown-link-check: | |
# runs-on: ubuntu-20.04 | |
# steps: | |
# - uses: actions/checkout@master | |
# - uses: actions/setup-node@v1 | |
# with: | |
# node-version: '12.x' | |
# - name: Install markdown-link-check | |
# run: npm i -g markdown-link-check | |
# - name: Run markdown-link-check on *.md files | |
# run: ./scripts/check_links.sh | |
Linux: | |
needs: clang-format | |
if: false # Disable this platform temporarily | |
runs-on: ubuntu-${{ matrix.os-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- job-name: 'clang10' | |
os-version: '20.04' | |
c-compiler: 'clang-10' | |
cxx-compiler: 'clang++-10' | |
generator: '"Unix Makefiles"' | |
relative_build_dir_path: '' | |
- job-name: 'clang11' | |
os-version: '20.04' | |
c-compiler: 'clang-11' | |
cxx-compiler: 'clang++-11' | |
generator: '"Unix Makefiles"' | |
relative_build_dir_path: '' | |
- job-name: 'clang12' | |
os-version: '20.04' | |
c-compiler: 'clang-12' | |
cxx-compiler: 'clang++-12' | |
generator: '"Unix Makefiles"' | |
relative_build_dir_path: '' | |
- job-name: 'gcc9' | |
os-version: '20.04' | |
c-compiler: 'gcc-9' | |
cxx-compiler: 'g++-9' | |
generator: '"Unix Makefiles"' | |
relative_build_dir_path: '' | |
- job-name: 'gcc10' | |
os-version: '20.04' | |
c-compiler: 'gcc-10' | |
cxx-compiler: 'g++-10' | |
generator: '"Unix Makefiles"' | |
relative_build_dir_path: '' | |
- job-name: 'gcc10 unity' | |
os-version: '20.04' | |
c-compiler: 'gcc-10' | |
cxx-compiler: 'g++-10' | |
generator: '"Unix Makefiles" -DCMAKE_UNITY_BUILD=yes' | |
relative_build_dir_path: '' | |
- job-name: 'gcc10 ninja in-source' | |
os-version: '20.04' | |
c-compiler: 'gcc-10' | |
cxx-compiler: 'g++-10' | |
generator: '"Ninja"' | |
relative_build_dir_path: '' | |
- job-name: 'gcc10 ninja out-of-source' | |
os-version: '20.04' | |
c-compiler: 'gcc-10' | |
cxx-compiler: 'g++-10' | |
generator: '"Ninja"' | |
relative_build_dir_path: '../' | |
- job-name: 'gcc10 ninja-unity' | |
os-version: '20.04' | |
c-compiler: 'gcc-10' | |
cxx-compiler: 'g++-10' | |
generator: '"Ninja" -DCMAKE_UNITY_BUILD=yes' | |
relative_build_dir_path: '' | |
name: Linux ${{ matrix.job-name }} | |
env: | |
BUILD_PATH: ${{ github.workspace }}/${{ matrix.relative_build_dir_path }}build_space | |
CC: ${{ matrix.c-compiler }} | |
CXX: ${{ matrix.cxx-compiler }} | |
steps: | |
- uses: actions/checkout@master | |
- uses: seanmiddleditch/gha-setup-ninja@v3 | |
if: contains(matrix.generator, 'Ninja') | |
- name: install boost | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y libboost-all-dev | |
- uses: ./.github/actions/build-and-test | |
macOS: | |
needs: clang-format | |
# if: false # Disable this platform temporarily | |
runs-on: macos-${{ matrix.os-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- job-name: xcode-14.2 | |
os-version: 'latest' | |
xcode-version: '14.2' | |
generator: '"Unix Makefiles"' | |
relative_build_dir_path: '' | |
- job-name: 'xcode-14.2-ninja in-source' | |
xcode-version: '14.2' | |
os-version: 'latest' | |
generator: '"Ninja"' | |
relative_build_dir_path: '' | |
- job-name: 'xcode-14.2-ninja out-of-source' | |
xcode-version: '14.2' | |
os-version: 'latest' | |
generator: '"Ninja"' | |
relative_build_dir_path: '../' | |
name: macOS ${{ matrix.job-name }} | |
env: | |
BUILD_PATH: ${{ github.workspace }}/${{ matrix.relative_build_dir_path }}build_space | |
HOMEBREW_NO_ANALYTICS: 1 | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
DEVELOPER_DIR: '/Applications/Xcode_${{ matrix.xcode-version }}.app/Contents/Developer' | |
steps: | |
- uses: actions/checkout@master | |
- uses: seanmiddleditch/gha-setup-ninja@v3 | |
if: contains(matrix.generator, 'Ninja') | |
- name: install boost | |
run: | | |
brew install boost | |
- uses: ./.github/actions/build-and-test | |
Windows: | |
needs: clang-format | |
if: false # Disable this platform temporarily | |
runs-on: windows-${{ matrix.os-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- job-name: VS-2019 | |
os-version: '2019' | |
generator: '"Visual Studio 16 2019"' | |
- job-name: VS-2019 (clangcl) | |
os-version: '2019' | |
generator: '"Visual Studio 16 2019" -T "clangcl"' | |
- job-name: VS-latest | |
os-version: 'latest' | |
generator: '"Visual Studio 17 2022"' | |
- job-name: VS-latest (clangcl) | |
os-version: 'latest' | |
generator: '"Visual Studio 17 2022" -T "clangcl"' | |
name: Windows ${{ matrix.job-name }} | |
env: | |
BUILD_PATH: ${{ github.workspace }}/build_space | |
steps: | |
- uses: actions/checkout@master | |
# - name: set up python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.x' | |
# - uses: ./.github/actions/setup-conan | |
# - name: install boost | |
# run: | | |
# ${boostroot} = "${env:GITHUB_WORKSPACE}\boost_install" | |
# conan install boost/1.72.0@ -o boost:header_only=True -g deploy --install-folder ${boostroot} | |
# echo "BOOST_ROOT=${boostroot}\boost" >> ${env:GITHUB_ENV} | |
# DOS paths - with backslashes - are not compatible with the github bash | |
# shell that is invoked in build-and-test/actions.yml - so sadly the code | |
# in that file is pasted in here | |
# - uses: ./.github/actions/build-and-test | |
- name: configure | |
run: | | |
mkdir ${{ env.BUILD_PATH }} | |
cd ${{ env.BUILD_PATH }} | |
cmake --version | |
cmake -G ${{ matrix.generator }} ${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug | |
- name: build | |
run: | | |
cd ${{ env.BUILD_PATH }} | |
cmake --build . --parallel 4 | |
- name: test | |
run: | | |
cd ${{ env.BUILD_PATH }} | |
ctest --verbose --output-on-failure -C Debug |