-
Notifications
You must be signed in to change notification settings - Fork 161
81 lines (71 loc) · 2.88 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
73
74
75
76
77
78
79
80
81
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- name: ubuntu-18.04-gcc-5
os: ubuntu-18.04
compiler: gcc
version: 5
steps:
- uses: actions/checkout@v2
- name: Install pybind11
run: |
git clone https://github.com/pybind/pybind11.git
cd pybind11
git checkout v2.6.0
- name: Set compiler version and patch C++11
if: runner.os == 'Linux' && matrix.compiler == 'gcc' && matrix.version == '5'
run: |
sudo apt-get update
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
sh scripts/patch-c++11.sh inplace
- name: Configure and make
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
buildDirectory: "${{ github.workspace }}/build"
cmakeBuildType: 'Release'
cmakeAppendedArgs: '-DBUILD_PYTHON_MODULE=ON -DBUILD_EXAMPLES=ON -DBUILD_BENCHMARK=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=. -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG=.'
- name: Run Examples (Unix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
./build/example-1_position > /dev/null
./build/example-2_position_offline > /dev/null
./build/example-5_velocity > /dev/null
./build/example-6_stop > /dev/null
./build/example-7_minimum_duration > /dev/null
./build/example-8_dynamic_dofs > /dev/null
python3 ./examples/1_position.py > /dev/null
python3 ./examples/2_position_offline.py > /dev/null
python3 ./examples/5_velocity.py > /dev/null
python3 ./examples/6_stop.py > /dev/null
python3 ./examples/7_minimum_duration.py > /dev/null
python3 ./examples/8_dynamic_dofs.py > /dev/null
- name: Run Examples (Windows)
if: matrix.os == 'windows-latest'
run: |
.\build\example-1_position.exe > $null
.\build\example-2_position_offline.exe > $null
.\build\example-5_velocity.exe > $null
.\build\example-6_stop.exe > $null
.\build\example-7_minimum_duration.exe > $null
.\build\example-8_dynamic_dofs.exe > $null
python3 .\examples\1_position.py > $null
python3 .\examples\2_position_offline.py > $null
python3 .\examples\5_velocity.py > $null
python3 .\examples\6_stop.py > $null
python3 .\examples\7_minimum_duration.py > $null
python3 .\examples\8_dynamic_dofs.py > $null
- name: Test
if: matrix.os == 'ubuntu-latest'
run: |
env CTEST_OUTPUT_ON_FAILURE=1 ./build/otg-test 2000000