-
Notifications
You must be signed in to change notification settings - Fork 68
224 lines (194 loc) · 5.69 KB
/
ci.yml
File metadata and controls
224 lines (194 loc) · 5.69 KB
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
name: Continuous integration
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
rust_tests:
name: Rust tests (${{ matrix.name }})
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-latest
- name: macOS
os: macos-latest
- name: Windows
os: windows-latest
steps:
- uses: actions/checkout@v5
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
rustflags: ""
- name: Cargo tests
working-directory: rust
run: cargo test
- name: Cargo tests (RP and JEM)
if: runner.os != 'Windows'
working-directory: rust
run: |
cargo test --features rp
cargo test --features jem
python_tests:
name: Python tests (${{ matrix.name }})
needs:
- rust_tests
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-latest
skip_rpi_test: 0
- name: macOS
os: macos-latest
skip_rpi_test: 1
- name: Windows
os: windows-latest
skip_rpi_test: 1
env:
DO_DOCKER: 0
SKIP_RPI_TEST: ${{ matrix.skip_rpi_test }}
steps:
- uses: actions/checkout@v5
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: clippy
rustflags: ""
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: python/pyproject.toml
- uses: egor-tensin/setup-clang@v1
if: runner.os == 'Linux'
- name: Install Linux ARM target
if: runner.os == 'Linux'
run: rustup target add arm-unknown-linux-gnueabihf
- name: Install ARM cross-compiler and C libraries
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
- name: Install LLVM
if: runner.os == 'macOS'
run: brew install llvm
- name: Run Python tests and generated Clippy checks
if: runner.os == 'Linux'
env:
CC_arm_unknown_linux_gnueabihf: arm-linux-gnueabihf-gcc
AR_arm_unknown_linux_gnueabihf: arm-linux-gnueabihf-ar
run: bash ./ci/script.sh python-tests
- name: Run Python tests and generated Clippy checks
if: runner.os == 'macOS'
run: bash ./ci/script.sh python-tests
- name: Install Python package
if: runner.os == 'Windows'
run: |
Set-Location python
python -m pip install --upgrade pip
python -m pip install .
- name: Run Python test.py
if: runner.os == 'Windows'
run: |
Set-Location python
$env:PYTHONPATH = "."
python -W ignore test/test.py -v
ros2_tests:
name: ROS2 tests
needs: python_tests
runs-on: ubuntu-latest
timeout-minutes: 45
container:
image: ubuntu:noble
options: --user 0
env:
DO_DOCKER: 0
steps:
- uses: actions/checkout@v5
- name: Install container bootstrap dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
cmake \
curl \
ca-certificates \
git \
gnupg2 \
locales \
lsb-release
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
rustflags: ""
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Setup ROS 2
# `ros-tooling/setup-ros@v0.7` still runs as a Node.js 20 action.
# Force it onto Node 24 now so CI keeps working as GitHub deprecates
# Node 20, and upgrade `setup-ros` to a Node 24-compatible release
# when one becomes available.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
uses: ros-tooling/setup-ros@v0.7
with:
required-ros-distributions: jazzy
- name: Run ROS2 Python tests
run: bash ./ci/script.sh ros2-tests
ocp_tests:
name: OCP tests (${{ matrix.name }})
needs: python_tests
runs-on: ${{ matrix.os }}
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-latest
- name: macOS
os: macos-latest
- name: Windows
os: windows-latest
env:
DO_DOCKER: 0
steps:
- uses: actions/checkout@v5
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
rustflags: ""
- uses: actions/setup-python@v6
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: python/pyproject.toml
- name: Run OCP Python tests
if: runner.os != 'Windows'
run: bash ./ci/script.sh ocp-tests
- name: Install Python package
if: runner.os == 'Windows'
run: |
Set-Location python
python -m pip install --upgrade pip
python -m pip install .
- name: Run OCP Python tests
if: runner.os == 'Windows'
run: |
Set-Location python
$env:PYTHONPATH = "."
python -W ignore test/test_ocp.py -v