Skip to content

Commit

Permalink
chore(ci): test ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu committed Oct 13, 2023
1 parent c42b956 commit 7008189
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/netsim_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,35 @@ jobs:
git clone https://github.com/n0-computer/iroh.git
cd iroh
cargo build --release
- name: Fetch and build iroh-ffi
run: |
git clone https://github.com/n0-computer/iroh-ffi.git
cd iroh-ffi
echo "iroh = { path = \"../iroh\" }" >> Cargo.toml
pip3 install maturin uniffi-bindgen
maturin build --release
- name: Copy binaries to right location
run: |
cp target/release/chuck netsim/bins/chuck
cp iroh/target/release/iroh netsim/bins/iroh
cp iroh-ffi/target/wheels/iroh-*-py3-none-manylinux_2_34_x86_64.whl ./netsim/bins/
- name: Setup python venv
run: |
cd netsim
python3 -m venv venv
source venv/bin/activate
pip3 install bins/iroh-*.whl
- name: Run tests
run: |
cd netsim
sudo kill -9 $(pgrep ovs)
sudo mn --clean
sudo python3 main.py --integration sims/standard/iroh.json
sudo python3 main.py --integration sims/example/playbook.json
- name: Setup Environment (PR)
if: ${{ github.event_name == 'pull_request' }}
Expand Down
2 changes: 1 addition & 1 deletion netsim/playbooks/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
iroh==0.2.0
# iroh==0.2.0
requests==2.31.0
2 changes: 1 addition & 1 deletion netsim/sims/example/playbook.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "iroh",
"name": "iroh_playbook",
"cases": [
{
"name": "1_to_1",
Expand Down

0 comments on commit 7008189

Please sign in to comment.