Skip to content

Commit 446c81d

Browse files
committed
Add workflow to show example
Signed-off-by: Jorge J. Perez <jjperez@ekumenlabs.com>
1 parent 24c9af8 commit 446c81d

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Test automatic selection of deps
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
name: Build & Test
15+
runs-on: ubuntu-24.04
16+
17+
steps:
18+
19+
# Code of this repo
20+
- name: Checkout this repo
21+
uses: actions/checkout@v4
22+
with:
23+
path: root
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.11'
29+
30+
- name: Install pallet-patcher from dev branch
31+
run: |
32+
pip install git+https://github.com/cottsay/pallet-patcher.git@blast545/smarter_pallet_patcher
33+
pallet-patcher -h
34+
35+
- name: Install colcon-cargo from this branch
36+
run: |
37+
cd $GITHUB_WORKSPACE/root
38+
pip install .
39+
pip install colcon-common-extensions
40+
pip freeze
41+
42+
- name: Install Rust toolchain
43+
uses: dtolnay/rust-toolchain@stable
44+
45+
- name: Install some Rust system crates
46+
run: |
47+
sudo apt-get install librust-serde-dev librust-tokio-dev librust-crc32fast-dev
48+
49+
- name: colcon build example project with a tokio crate available in workspace_ws/deps
50+
run: |
51+
ls $GITHUB_WORKSPACE/root/
52+
cd $GITHUB_WORKSPACE/root/test/pallet_patcher_ws/
53+
ls
54+
colcon --log-level debug build --event-handlers console_direct+
55+
56+
- name: Take a look to our Cargo.lock file for hello_world2
57+
run: |
58+
ls $GITHUB_WORKSPACE/root/test/pallet_patcher_ws/
59+
ls $GITHUB_WORKSPACE/root/test/pallet_patcher_ws/hello_world2/
60+
cat $GITHUB_WORKSPACE/root/test/pallet_patcher_ws/hello_world2/Cargo.lock

0 commit comments

Comments
 (0)