Skip to content

CI: Upgrade clang-format 10 -> 11 #52

CI: Upgrade clang-format 10 -> 11

CI: Upgrade clang-format 10 -> 11 #52

Workflow file for this run

name: Build and test
on: [push, pull_request]
env:
buildDir: ${{ github.workspace }}/build/
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
triplet: x64-linux
- os: windows-2019
triplet: x64-windows
- os: macos-latest
triplet: x64-osx
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- uses: BSFishy/pip-action@v1
with:
packages: PyYAML
- uses: lukka/get-cmake@latest
# Restore from cache the previously built ports. If a "cache miss"
# occurs, then vcpkg is bootstrapped. Since a the vcpkg.json is
# being used later on to install the packages when run-cmake runs,
# no packages are installed at this time and the input 'setupOnly:true
# is mandatory.
- name: Restore artifacts / setup vcpkg
uses: lukka/run-vcpkg@v7
with:
# Just install vcpkg for now, do not install any ports
# in this step yet.
setupOnly: true
vcpkgGitCommitId: 3166bcc15b156b57667d9e573fba9775ceef3eb1
# Since the cache must be invalidated when content of the
# vcpkg.json file changes, let's compute its hash and append
# this to the computed cache's key.
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
vcpkgTriplet: ${{ matrix.triplet }}
# Ensure the vcpkg artifacts are cached, they are generated in the
# 'CMAKE_BINARY_DIR/vcpkg_installed' directory.
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
- name: Build
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
buildDirectory: ${{ env.buildDir }}
# This input tells run-cmake to consume the vcpkg.cmake toolchain
# file set by run-vcpkg.
useVcpkgToolchainFile: true
buildWithCMake: true
cmakeAppendedArgs: -Dtests=ON
- name: Test
run: cd "${{ env.buildDir }}"; ctest --output-on-failure --timeout 10
shell: bash