Skip to content

Commit d046802

Browse files
committed
Add CI to gossipsub-interop tests
1 parent ad5014f commit d046802

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Gossipsub Interoperability Tests (PR)
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'gossipsub-interop/**'
7+
- '.github/workflows/gossipsub-interop-pr.yml'
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-22.04
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version-file: gossipsub-interop/go-libp2p/go.mod
25+
cache: true
26+
27+
- name: Set up Rust
28+
uses: dtolnay/rust-toolchain@stable
29+
30+
- name: Install uv
31+
run: |
32+
curl -LsSf https://astral.sh/uv/install.sh | sh
33+
echo "$HOME/.local/bin" >> $GITHUB_PATH
34+
35+
- name: Install Shadow simulator
36+
run: |
37+
# Install Shadow dependencies
38+
sudo apt-get update
39+
sudo apt-get install -y \
40+
cmake \
41+
findutils \
42+
libclang-dev \
43+
libc-dbg \
44+
libglib2.0-0 \
45+
libglib2.0-dev \
46+
make \
47+
netbase \
48+
python3 \
49+
python3-networkx \
50+
xz-utils
51+
52+
# Build and install Shadow v3.2.0 from source
53+
git clone --depth 1 --branch v3.2.0 https://github.com/shadow/shadow.git shadow-simulator
54+
cd shadow-simulator
55+
git checkout v3.2.0
56+
./setup build --clean
57+
./setup install
58+
echo "$HOME/.local/bin" >> $GITHUB_PATH
59+
60+
- name: Run gossipsub interop tests
61+
working-directory: gossipsub-interop
62+
run: make test

0 commit comments

Comments
 (0)