This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (58 loc) · 2.02 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
name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
RUST_LOG: trace
jobs:
build_and_examples:
strategy:
matrix:
platform: [ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.platform }}
env:
QT_QPA_PLATFORM: offscreen
steps:
- uses: actions/checkout@v3
- uses: r7kamura/[email protected]
- run: cargo --version --verbose
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: humble
- run: 'source /opt/ros/humble/setup.bash && echo AMENT_PREFIX_PATH=${AMENT_PREFIX_PATH} >> "$GITHUB_ENV"'
- name: "Build examples"
timeout-minutes: 30
run: cargo build --examples
- name: "Rust standalone"
timeout-minutes: 30
run: |
source /opt/ros/humble/setup.bash && ros2 run turtlesim turtlesim_node &
cargo run --example random_turtle --features="ros2-examples"
- name: "Rust Dataflow example"
timeout-minutes: 30
run: |
source /opt/ros/humble/setup.bash && ros2 run turtlesim turtlesim_node &
cargo build -p rust-ros2-dataflow-example-node --features ros2
cargo run --example rust-ros2-dataflow --features="ros2-examples"
- name: "Python Dataflow example"
timeout-minutes: 30
run: |
source /opt/ros/humble/setup.bash && ros2 run turtlesim turtlesim_node &
pip3 install -r ./examples/python-ros2-dataflow/requirements.txt
maturin build -m python/Cargo.toml
pip install target/wheels/*.whl
cargo run --example python-ros2-dataflow --features="ros2-examples"
- name: "Python Standalone"
timeout-minutes: 30
run: |
source /opt/ros/humble/setup.bash && ros2 run turtlesim turtlesim_node &
python3 -m venv examples/.env &&
source examples/.env/bin/activate &&
python3 examples/python-standalone-bridge/random_turtle.py