ci: create dependency cache layer of interop tests #60
This file contains 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 Testing | |
on: | |
pull_request: | |
push: | |
branches: | |
- "master" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run-multidim-interop: | |
name: Run multidimensional interoperability tests | |
runs-on: ${{ fromJSON(github.repository == 'libp2p/rust-libp2p' && '["self-hosted", "linux", "x64", "4xlarge"]' || '"ubuntu-latest"') }} | |
strategy: | |
matrix: | |
flavour: [chromium, native] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
# This uses the same S3 cache as all test-plans images. Because we use `cargo-chef` in the Dockerfile, we have a layer available with all dependencies built. | |
- name: Build ${{ matrix.flavour }} image | |
run: | | |
docker buildx build \ | |
--load \ | |
--cache-to type=s3,mode=max,bucket=libp2p-by-tf-aws-bootstrap,region=us-east-1,prefix=buildCache,name=${{ matrix.flavour }}-rust-libp2p-head \ | |
--cache-from type=s3,mode=max,bucket=libp2p-by-tf-aws-bootstrap,region=us-east-1,prefix=buildCache,name=${{ matrix.flavour }}-rust-libp2p-head \ | |
-t ${{ matrix.flavour }}-rust-libp2p-head \ | |
. \ | |
-f interop-tests/Dockerfile.${{ matrix.flavour }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{ vars.TEST_PLANS_BUILD_CACHE_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_PLANS_BUILD_CACHE_KEY }} | |
- name: Run ${{ matrix.flavour }} tests | |
uses: libp2p/test-plans/.github/actions/run-interop-ping-test@master | |
with: | |
test-filter: ${{ matrix.flavour }}-rust-libp2p-head | |
extra-versions: ${{ github.workspace }}/interop-tests/${{ matrix.flavour }}-ping-version.json | |
s3-cache-bucket: libp2p-by-tf-aws-bootstrap | |
s3-access-key-id: ${{ vars.TEST_PLANS_BUILD_CACHE_KEY_ID }} | |
s3-secret-access-key: ${{ secrets.TEST_PLANS_BUILD_CACHE_KEY }} | |
worker-count: 16 |