-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (40 loc) · 1.13 KB
/
ccpp.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
name: C/C++ CI
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v1
- name: install dependencies
run: sudo apt-get install -y cmake check
- name: configure cmake
run: cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DENABLE_TESTS=OFF -B./build -G "Unix Makefiles"
- name: build with cmake
run: cmake --build ./build --config Debug --target all
- name: Generate packages with CPack
run: make package
working-directory: ./build
- uses: actions/upload-artifact@v1
with:
name: build
path: build
test:
runs-on: ubuntu-22.04
needs: build
steps:
- uses: actions/checkout@v1
- uses: actions/download-artifact@v1
with:
name: build
path: build
- name: install dependencies
run: sudo apt-get install check
- name: configure
run: cmake .. -DENABLE_TESTS=ON
working-directory: ./build
- name: make
run: make
working-directory: ./build
- name: make test
run: make test
working-directory: ./build