feat(kad): client mode #5868
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Interoperability Tests | |
| on: | |
| pull_request: | |
| merge_group: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run-transport-interop: | |
| name: Run transport interoperability tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Free Disk Space | |
| # For some reason we have space issues while running this action. Likely while building the image. | |
| # This action will free up some space to avoid the issue. | |
| uses: jlumbroso/[email protected] | |
| with: | |
| tool-cache: true | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Build image | |
| run: docker buildx build --load -t nim-libp2p-transport-head -f interop/transport/Dockerfile . | |
| - name: Run tests | |
| uses: libp2p/test-plans/.github/actions/run-transport-interop-test@f58b7472d85aa053ce2ba8e9135bcc126a6fed3e | |
| with: | |
| test-filter: nim-libp2p-transport-head | |
| # without suffix action fails because "hole-punching-interop" artifacts have | |
| # the same name as "transport-interop" artifacts | |
| test-results-suffix: transport-interop | |
| extra-versions: ${{ github.workspace }}/interop/transport/version.json | |
| s3-cache-bucket: ${{ vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME }} | |
| s3-access-key-id: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_ACCESS_KEY_ID }} | |
| s3-secret-access-key: ${{ secrets.S3_LIBP2P_BUILD_CACHE_AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_REGION }} | |
| # run-hole-punching-interop: | |
| # name: Run hole punching interoperability tests | |
| # runs-on: ubuntu-22.04 | |
| # steps: | |
| # - name: Free Disk Space | |
| # # For some reason we have space issues while running this action. Likely while building the image. | |
| # # This action will free up some space to avoid the issue. | |
| # uses: jlumbroso/[email protected] | |
| # with: | |
| # tool-cache: true | |
| # - uses: actions/checkout@v4 | |
| # - uses: docker/setup-buildx-action@v3 | |
| # - name: Build image | |
| # run: docker buildx build --load -t nim-libp2p-hp-head -f interop/hole-punching/Dockerfile . | |
| # - name: Run tests | |
| # uses: libp2p/test-plans/.github/actions/run-interop-hole-punch-test@master | |
| # with: | |
| # test-filter: nim-libp2p-hp-head | |
| # test-ignore: rust | |
| # extra-versions: ${{ github.workspace }}/interop/hole-punching/version.json | |
| # s3-cache-bucket: ${{ vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME }} | |
| # s3-access-key-id: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_ACCESS_KEY_ID }} | |
| # s3-secret-access-key: ${{ secrets.S3_LIBP2P_BUILD_CACHE_AWS_SECRET_ACCESS_KEY }} | |
| # aws-region: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_REGION }} | |
| run-autonatv2-interop: | |
| name: Run AutoNATv2 interoperability tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Set up Nim | |
| uses: jiro4989/setup-nim-action@v1 | |
| with: | |
| nim-version: "stable" | |
| - name: Run Go and Nim together | |
| run: | | |
| nimble install | |
| cd interop/autonatv2/go-peer | |
| git clone https://github.com/libp2p/go-libp2p | |
| cd go-libp2p | |
| git apply ../disable-filtering-of-private-ip-addresses.patch | |
| cd .. | |
| go mod tidy | |
| go run testautonatv2.go & | |
| cd ../nim-peer | |
| nim r src/nim_peer.nim $(cat ../go-peer/peer.id) | |
| run-kad-interop: | |
| name: Run Kademlia DHT interoperability tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| - name: Set up Nim | |
| uses: jiro4989/setup-nim-action@v1 | |
| with: | |
| nim-version: "stable" | |
| - name: Set up Rust | |
| uses: actions/setup-rust@v1 | |
| with: | |
| rust-version: stable | |
| - name: Run Go, Rust and Nim together | |
| run: | | |
| nimble install | |
| cd interop/kad/go-peer | |
| go mod tidy | |
| go run testkad.go & | |
| cd interop/kad/rust-peer | |
| cargo run testkad.rs & | |
| cd ../nim-peer | |
| nim r src/testkad.nim $(cat ../go-peer/peer.id) $(cat ../rust-peer/peer.id) |