-
Notifications
You must be signed in to change notification settings - Fork 438
115 lines (113 loc) · 4.39 KB
/
build_test.yaml
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
name: Lint Build and Test
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install deps
run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev libgtest-dev clang-format
- name: cpp-lint
run: ./clang-linting.sh
- name: install python
run: sudo apt install python3 python3-pip
- name: install python-deps one
run: cd python && python3 setup.py egg_info && pip3 install `grep -v '^\[' src/*.egg-info/requires.txt`
- name: install python-deps
run: pip3 install mypy flake8
- name: python-lint
run: cd python && mypy ./src ./tests && flake8
linux-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install deps
run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev libgtest-dev clang-format
- name: cmake configure
run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON
- name: cmake build
run: cmake --build build -j4
- name: run tests
run: cd build/ && ctest -j4 --output-on-failure
linux-python-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install python
run: sudo apt install python3 python3-pip
- name: install deps
run: sudo apt install build-essential cmake libjsoncpp-dev libeigen3-dev libcurl4-openssl-dev libtins-dev libpcap-dev libglfw3-dev libglew-dev libspdlog-dev libflatbuffers-dev
- name: install python-deps
run: pip3 install pytest pytest-xdist
- name: build python
run: cd python && sudo python3 -m pip install -e .[test]
- name: run tests
run: cd python/tests && pytest -n4
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: vcpkg build
uses: johnwason/vcpkg-action@v6
id: vcpkg
with:
pkgs: jsoncpp eigen3 curl libtins glfw3 glew spdlog libpng flatbuffers gtest
triplet: x64-windows
revision: 2024.04.26
token: ${{ github.token }}
github-binarycache: true
- name: cmake configure
run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON -DCMAKE_TOOLCHAIN_FILE=D:/a/ouster-sdk/ouster-sdk/vcpkg/scripts/buildsystems/vcpkg.cmake
- name: cmake build
run: cmake --build build -j4
- name: run tests
run: cd build/ && ctest -j4 -C Debug --output-on-failure
windows-python-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: ilammy/msvc-dev-cmd@v1
- name: vcpkg build
uses: johnwason/vcpkg-action@v6
id: vcpkg
with:
pkgs: jsoncpp eigen3 curl libtins glfw3 glew spdlog libpng flatbuffers gtest
triplet: x64-windows
revision: 2024.04.26
token: ${{ github.token }}
github-binarycache: true
- name: install python-deps
run: pip3 install pytest pytest-xdist
- name: build python
run: cd python && python3 -m pip install -e .[test]
env:
OUSTER_SDK_CMAKE_ARGS: '-DCMAKE_TOOLCHAIN_FILE=D:/a/ouster-sdk/ouster-sdk/vcpkg/scripts/buildsystems/vcpkg.cmake'
- name: run tests
run: cd python/tests && pytest -n3
mac-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: install deps
run: brew install cmake pkg-config jsoncpp eigen curl libtins glfw glew spdlog flatbuffers googletest
- name: cmake configure
run: cmake . -B build -DBUILD_TESTING=ON -DBUILD_EXAMPLES=ON
- name: cmake build
run: cmake --build build -j3
- name: run tests
run: cd build/ && ctest -j3 --output-on-failure
mac-python-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: install deps
run: brew install cmake pkg-config jsoncpp eigen curl libtins glfw glew spdlog flatbuffers
- name: install python-deps
run: pip3 install pytest pytest-xdist --break-system-packages
- name: build python
run: cd python && python3 -m pip install -e .[test] --break-system-packages
- name: set netparams
run: sudo sysctl -w net.inet.udp.maxdgram=65535
- name: run tests
run: cd python/tests && pytest -n3