-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.23 KB
/
cmake.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
---
name: C++ CMake Test
on:
# every day-of-month 1st at 00:00 UTC
schedule:
# prettier-ignore
- cron: '0 0 1 * *'
workflow_dispatch:
env:
BUILD_TYPE: Release
jobs:
check-links:
uses: ./.github/workflows/link-check.yml
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set variables
run: |
echo "BUILD_TYPE_LOWERCASE=$(echo ${BUILD_TYPE} | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
- name: Install dependencies
run: |
sudo apt install -y ninja-build
- name: Setup vcpkg
working-directory: /usr/local/share/vcpkg
run: |
git fetch --all
git reset --hard origin/master
./bootstrap-vcpkg.sh
- name: Install packages
working-directory: /usr/local/bin
run: ./vcpkg install gsl:x64-linux gtest:x64-linux benchmark:x64-linux fmt:x64-linux
- name: Configure CMake
working-directory: ${{github.workspace}}/cpp-algorithm
run: make configure
- name: Build
working-directory: ${{github.workspace}}/cpp-algorithm
run: make build
- name: Test
working-directory: ${{github.workspace}}/cpp-algorithm
run: make test