Skip to content

Commit 7008189

Browse files
committed
chore(ci): test ffi
1 parent c42b956 commit 7008189

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

.github/workflows/netsim_integration.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,35 @@ jobs:
4545
git clone https://github.com/n0-computer/iroh.git
4646
cd iroh
4747
cargo build --release
48+
49+
- name: Fetch and build iroh-ffi
50+
run: |
51+
git clone https://github.com/n0-computer/iroh-ffi.git
52+
cd iroh-ffi
53+
echo "iroh = { path = \"../iroh\" }" >> Cargo.toml
54+
pip3 install maturin uniffi-bindgen
55+
maturin build --release
4856
4957
- name: Copy binaries to right location
5058
run: |
5159
cp target/release/chuck netsim/bins/chuck
5260
cp iroh/target/release/iroh netsim/bins/iroh
61+
cp iroh-ffi/target/wheels/iroh-*-py3-none-manylinux_2_34_x86_64.whl ./netsim/bins/
62+
63+
- name: Setup python venv
64+
run: |
65+
cd netsim
66+
python3 -m venv venv
67+
source venv/bin/activate
68+
pip3 install bins/iroh-*.whl
5369
5470
- name: Run tests
5571
run: |
5672
cd netsim
5773
sudo kill -9 $(pgrep ovs)
5874
sudo mn --clean
5975
sudo python3 main.py --integration sims/standard/iroh.json
76+
sudo python3 main.py --integration sims/example/playbook.json
6077
6178
- name: Setup Environment (PR)
6279
if: ${{ github.event_name == 'pull_request' }}

netsim/playbooks/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
iroh==0.2.0
1+
# iroh==0.2.0
22
requests==2.31.0

netsim/sims/example/playbook.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "iroh",
2+
"name": "iroh_playbook",
33
"cases": [
44
{
55
"name": "1_to_1",

0 commit comments

Comments
 (0)