Skip to content

Commit

Permalink
Test s3 caching (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo authored Feb 8, 2023
1 parent 2565a91 commit 411c6e0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/multidim-interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
uses: "./.github/workflows/run-testplans.yml"
with:
dir: "multidim-interop"
secrets: inherit
run-multidim-interop-ng:
runs-on: ubuntu-latest
steps:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/run-testplans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
runs-on: ubuntu-latest
env:
TEST_PLAN_DIR: ${{ inputs.dir }}
AWS_BUCKET: ${{ vars.S3_BUCKET_NAME }}
AWS_REGION: us-east-1
defaults:
run:
shell: bash
Expand All @@ -41,6 +43,12 @@ jobs:
path: test-plans
repository: "libp2p/test-plans"
ref: ${{ inputs.test-plans_ref }}
- name: Configure AWS credentials for S3 build cache
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ vars.S3_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
# Download input data
- uses: actions/download-artifact@v3
if: ${{ inputs.extra-versions != '' }}
Expand Down
7 changes: 5 additions & 2 deletions multidim-interop/dockerBuildWrapper.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#!/usr/bin/env /bin/bash

# TODO replace bucket name here

# If in CI use caching
if [[ -n "${CI}" ]]; then
docker buildx build \
--load \
-t $IMAGE_NAME \
--cache-to type=gha,mode=max,scope=$GITHUB_REF_NAME-$IMAGE_NAME \
--cache-from type=gha,scope=$GITHUB_REF_NAME-$IMAGE_NAME "$@"
--cache-to type=s3,mode=max,bucket=$AWS_BUCKET,region=$AWS_REGION,prefix=buildCache,name=$IMAGE_NAME \
--cache-from type=s3,mode=max,bucket=$AWS_BUCKET,region=$AWS_REGION,prefix=buildCache,name=$IMAGE_NAME \
"$@"
else
docker build -t $IMAGE_NAME "$@"
fi
Expand Down
14 changes: 7 additions & 7 deletions multidim-interop/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ export type Version = {
}

export const versions: Array<Version> = [
{
id: "rust-v0.50.0",
containerImageID: rustv050.imageID,
transports: ["ws", "tcp", "quic-v1", "webrtc"],
secureChannels: ["tls", "noise"],
muxers: ["mplex", "yamux"],
},
// {
// id: "rust-v0.50.0",
// containerImageID: rustv050.imageID,
// transports: ["ws", "tcp", "quic-v1", "webrtc"],
// secureChannels: ["tls", "noise"],
// muxers: ["mplex", "yamux"],
// },
{
id: "js-v0.41.0",
containerImageID: jsV041.imageID,
Expand Down

0 comments on commit 411c6e0

Please sign in to comment.