-
Notifications
You must be signed in to change notification settings - Fork 4
61 lines (51 loc) · 1.83 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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'
# Setup clang
CC: clang-17
CXX: clang++-17
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 add-apt-repository ppa:ubuntu-toolchain-r/test
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 cpp-13 g++-13 gcc-13 gcc-13-base libgcc-13-dev libstdc++-13-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 --slave /usr/bin/g++ g++ /usr/bin/g++-13
- 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
run: |
echo | clang++-17 -E -Wp,-v -
ls /usr/include/c++/13/
clang-17 -v
cmake --workflow --preset ci