From 65d9accdbf8e154e493fcb2103bb09d4d3800dfd Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Thu, 12 Sep 2024 21:42:04 +0200 Subject: [PATCH 1/7] Pass S3 variables for caching into interop workflow. --- .github/workflows/interop.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index 8290a6c39c..a71d7907ef 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -32,6 +32,11 @@ jobs: with: test-filter: nim-libp2p-head extra-versions: ${{ github.workspace }}/tests/transport-interop/version.json + with: + 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 @@ -46,3 +51,8 @@ jobs: with: test-filter: nim-libp2p-head extra-versions: ${{ github.workspace }}/tests/hole-punching-interop/version.json + with: + 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 }} From 50c93e439e9ead4a397eabc2cf9ec7ed248b40a0 Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Thu, 12 Sep 2024 22:24:47 +0200 Subject: [PATCH 2/7] Remove duplicated keyword --- .github/workflows/interop.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index a71d7907ef..fd05b481cf 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -32,7 +32,6 @@ jobs: with: test-filter: nim-libp2p-head extra-versions: ${{ github.workspace }}/tests/transport-interop/version.json - with: 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 }} @@ -51,7 +50,6 @@ jobs: with: test-filter: nim-libp2p-head extra-versions: ${{ github.workspace }}/tests/hole-punching-interop/version.json - with: 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 }} From 2c5aee160dfdc6f25acf137530841da624842373 Mon Sep 17 00:00:00 2001 From: Alejandro Cabeza Romero Date: Wed, 25 Sep 2024 16:11:33 +0200 Subject: [PATCH 3/7] Deduplicate args. --- .github/workflows/interop.yml | 51 ++++++++++++++--------------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index fd05b481cf..9c72df54b8 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -13,43 +13,32 @@ concurrency: cancel-in-progress: true jobs: - run-transport-interop: - name: Run transport interoperability tests + run-interop-tests: + name: Run ${{ matrix.test-type }} Tests runs-on: ubuntu-22.04 + if: success() || failure() + strategy: + matrix: + test-type: + - transport-interop + - hole-punching-interop + steps: - - name: Free Disk Space (Ubuntu) - # For some reason the original job (libp2p/test-plans) has enough disk space, but this one doesn't. - uses: jlumbroso/free-disk-space@v1.3.1 - with: - tool-cache: true + - name: Checkout Code + uses: actions/checkout@v4 - - uses: actions/checkout@v4 - - uses: docker/setup-buildx-action@v3 - - name: Build image - run: docker buildx build --load -t nim-libp2p-head -f tests/transport-interop/Dockerfile . - - name: Run tests - uses: libp2p/test-plans/.github/actions/run-transport-interop-test@master - with: - test-filter: nim-libp2p-head - extra-versions: ${{ github.workspace }}/tests/transport-interop/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 }} + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 - run-hole-punching-interop: - name: Run hole-punching interoperability tests - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@v4 - - uses: docker/setup-buildx-action@v3 - - name: Build image - run: docker buildx build --load -t nim-libp2p-head -f tests/hole-punching-interop/Dockerfile . - - name: Run tests - uses: libp2p/test-plans/.github/actions/run-interop-hole-punch-test@master + - name: Build Docker Image + run: | + docker buildx build --load -t nim-libp2p-head -f tests/${{ matrix.test-type }}/Dockerfile . + + - name: Run Tests + uses: libp2p/test-plans/.github/actions/run-${{ matrix.test-type == 'transport-interop' && 'transport-interop-test' || 'interop-hole-punch-test' }}@master with: test-filter: nim-libp2p-head - extra-versions: ${{ github.workspace }}/tests/hole-punching-interop/version.json + extra-versions: ${{ github.workspace }}/tests/${{ matrix.test-type }}/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 }} From a26aa1af9d21b043ff086b8ad9ac49aae4d07b86 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 25 Sep 2024 19:52:11 +0200 Subject: [PATCH 4/7] fix simplify yml --- .github/workflows/interop.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index 9c72df54b8..b4f9a08f43 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -20,8 +20,10 @@ jobs: strategy: matrix: test-type: - - transport-interop - - hole-punching-interop + - folder: transport-interop + action: run-transport-interop-test + - folder: hole-punching-interop + action: run-interop-hole-punch-test steps: - name: Checkout Code @@ -32,10 +34,10 @@ jobs: - name: Build Docker Image run: | - docker buildx build --load -t nim-libp2p-head -f tests/${{ matrix.test-type }}/Dockerfile . + docker buildx build --load -t nim-libp2p-head -f tests/${{ matrix.test-type.folder }}/Dockerfile . - name: Run Tests - uses: libp2p/test-plans/.github/actions/run-${{ matrix.test-type == 'transport-interop' && 'transport-interop-test' || 'interop-hole-punch-test' }}@master + uses: libp2p/test-plans/.github/actions/${{ matrix.test-type.action }}@master with: test-filter: nim-libp2p-head extra-versions: ${{ github.workspace }}/tests/${{ matrix.test-type }}/version.json From d8b6b64d52125e9f73faff31497ce4b9f6f4bd12 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 25 Sep 2024 20:04:51 +0200 Subject: [PATCH 5/7] Revert "fix simplify yml" This reverts commit a26aa1af9d21b043ff086b8ad9ac49aae4d07b86. --- .github/workflows/interop.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index b4f9a08f43..9c72df54b8 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -20,10 +20,8 @@ jobs: strategy: matrix: test-type: - - folder: transport-interop - action: run-transport-interop-test - - folder: hole-punching-interop - action: run-interop-hole-punch-test + - transport-interop + - hole-punching-interop steps: - name: Checkout Code @@ -34,10 +32,10 @@ jobs: - name: Build Docker Image run: | - docker buildx build --load -t nim-libp2p-head -f tests/${{ matrix.test-type.folder }}/Dockerfile . + docker buildx build --load -t nim-libp2p-head -f tests/${{ matrix.test-type }}/Dockerfile . - name: Run Tests - uses: libp2p/test-plans/.github/actions/${{ matrix.test-type.action }}@master + uses: libp2p/test-plans/.github/actions/run-${{ matrix.test-type == 'transport-interop' && 'transport-interop-test' || 'interop-hole-punch-test' }}@master with: test-filter: nim-libp2p-head extra-versions: ${{ github.workspace }}/tests/${{ matrix.test-type }}/version.json From 524da613411c07e781077cd74030977c3ecbcbe8 Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 25 Sep 2024 20:05:04 +0200 Subject: [PATCH 6/7] Revert "Deduplicate args." This reverts commit 2c5aee160dfdc6f25acf137530841da624842373. --- .github/workflows/interop.yml | 51 +++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index 9c72df54b8..fd05b481cf 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -13,32 +13,43 @@ concurrency: cancel-in-progress: true jobs: - run-interop-tests: - name: Run ${{ matrix.test-type }} Tests + run-transport-interop: + name: Run transport interoperability tests runs-on: ubuntu-22.04 - if: success() || failure() - strategy: - matrix: - test-type: - - transport-interop - - hole-punching-interop - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Free Disk Space (Ubuntu) + # For some reason the original job (libp2p/test-plans) has enough disk space, but this one doesn't. + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: true - - name: Build Docker Image - run: | - docker buildx build --load -t nim-libp2p-head -f tests/${{ matrix.test-type }}/Dockerfile . + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - name: Build image + run: docker buildx build --load -t nim-libp2p-head -f tests/transport-interop/Dockerfile . + - name: Run tests + uses: libp2p/test-plans/.github/actions/run-transport-interop-test@master + with: + test-filter: nim-libp2p-head + extra-versions: ${{ github.workspace }}/tests/transport-interop/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 }} - - name: Run Tests - uses: libp2p/test-plans/.github/actions/run-${{ matrix.test-type == 'transport-interop' && 'transport-interop-test' || 'interop-hole-punch-test' }}@master + run-hole-punching-interop: + name: Run hole-punching interoperability tests + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - name: Build image + run: docker buildx build --load -t nim-libp2p-head -f tests/hole-punching-interop/Dockerfile . + - name: Run tests + uses: libp2p/test-plans/.github/actions/run-interop-hole-punch-test@master with: test-filter: nim-libp2p-head - extra-versions: ${{ github.workspace }}/tests/${{ matrix.test-type }}/version.json + extra-versions: ${{ github.workspace }}/tests/hole-punching-interop/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 }} From 5a06f864625ea3c17a491a92298e7b444b5b97dc Mon Sep 17 00:00:00 2001 From: Diego Date: Wed, 25 Sep 2024 20:06:08 +0200 Subject: [PATCH 7/7] remove free disk step --- .github/workflows/interop.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index fd05b481cf..acd238f32c 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -17,12 +17,6 @@ jobs: name: Run transport interoperability tests runs-on: ubuntu-22.04 steps: - - name: Free Disk Space (Ubuntu) - # For some reason the original job (libp2p/test-plans) has enough disk space, but this one doesn't. - uses: jlumbroso/free-disk-space@v1.3.1 - with: - tool-cache: true - - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - name: Build image