Task coroutine #197
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: Build and Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
# Indicates the location of the vcpkg as a Git submodule of the project repository. | |
VCPKG_ROOT: ${{ github.workspace }}/vcpkg | |
# Tells vcpkg where binary packages are stored. | |
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg/bincache | |
# Use specific vcpkg version | |
VCPKG_COMMIT_ID: '5568f110b509a9fd90711978a7cb76bae75bb092' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | |
sudo apt-get update | |
sudo apt-get install -y \ | |
gpg wget curl zip unzip tar git pkg-config \ | |
ninja-build make clang-tidy cppcheck ccache \ | |
doctest-dev clang-17 lld-17 | |
- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'" | |
run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE | |
shell: bash | |
- name: Restore artifacts, or setup vcpkg | |
uses: lukka/get-cmake@latest | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v10 | |
with: | |
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}' | |
vcpkgJsonGlob: 'vcpkg.json' | |
- name: Run cmake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePresetAdditionalArgs: "['-DCMAKE_C_COMPILER=clang-17', '-DCMAKE_CXX_COMPILER=clang++-17']" | |
configurePreset: 'ninja-multi-vcpkg' | |
buildPreset: 'ninja-vcpkg-deb' | |
testPreset: 'ninja-vcpkg-deb' |