-
Notifications
You must be signed in to change notification settings - Fork 20
165 lines (139 loc) · 5.46 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: CMake
on:
push:
branches: [main, v1.x]
pull_request:
branches: [main, v1.x]
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-ubuntu-22:
# Use GitHub-hosted Ubuntu 22.04 runner
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make install
- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)
- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)
build-ubuntu-20:
# Use GitHub-hosted Ubuntu 20.04 runner
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make install
- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)
- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)
build-macos-12:
# Use self-hosted macOS 12 runner with arm64 processor
runs-on: [self-hosted, macos-12, ARM64]
steps:
- uses: actions/checkout@v2
- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(sysctl -n hw.ncpu)
- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make install
- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(sysctl -n hw.ncpu)
- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(sysctl -n hw.ncpu)
build-windows-2022:
# Use GitHub-hosted Windows 2022 runner
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --target install --config Release
- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --config Release -j $(nproc)
- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --config Release -j $(nproc)