-
Notifications
You must be signed in to change notification settings - Fork 31
72 lines (60 loc) · 1.73 KB
/
ci.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
62
63
64
65
66
67
68
69
70
71
72
name: CI
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
schedule:
- cron: "0 6 * * 1-5"
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: install zenoh-cpp
shell: bash
run: |
mkdir -p build_install && cd build_install
cmake ../install -DCMAKE_INSTALL_PREFIX=~/local
cmake --install .
- name: make examples
shell: bash
run: |
mkdir -p build && cd build
cmake ..
cmake --build . --target examples
- name: make examples with zenoh-cpp as subbroject
shell: bash
run: |
mkdir -p build_examples_subproj && cd build_examples_subproj
cmake ../examples -DCMAKE_BUILD_TYPE=Debug
cmake --build . --config Debug
- name: make examples with zenoh-cpp as installed package
shell: bash
run: |
mkdir -p build_examples_findproj && cd build_examples_findproj
cmake ../examples -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/local -DZENOHCXX_SOURCE=PACKAGE
cmake --build . --config Release
- name: make tests
shell: bash
run: |
cd build
cmake --build . --target tests
- name: run tests
shell: bash
run: |
cd build
ctest
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
# Artifact name
name: zenoh-cpp-${{ matrix.os }}
# Directory containing files to upload
path: |
target/release/examples