-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.8 KB
/
cpp.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
name: C/C++ CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
lfs: true
- name: Install dependencies
shell: bash
if: startsWith(matrix.os,'ubuntu-latest')
run: |
sudo apt-get -y update
sudo apt-get -y install build-essential libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev \
xorg-dev libx11-dev cmake ninja-build libglfw3-dev libglfw3 \
clang libsodium-dev libmbedtls-dev
- name: Download libraries' binaries
uses: actions/checkout@v3
with:
repository: knot-alot/knoting-libs
path: lib
token: ${{ secrets.KNOTING_CLONE_LIBS }}
- name: Enable Developer Command Prompt
uses: ilammy/[email protected]
if: startsWith(matrix.os,'windows')
- name: Build CMake project
shell: bash
env:
GITHUB_OS: ${{ matrix.os }}
run: |
mkdir build
cd build
if [ "$GITHUB_OS" == "ubuntu-latest" ];
then
export CC=clang
export CXX=clang++
fi
cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release --parallel