Skip to content

Commit

Permalink
CI: build previous artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Aug 2, 2024
1 parent 02a42e0 commit 8b2c37c
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,51 @@ jobs:
image: backpackapp/build
image-version: ${{ needs.get_projectserum_version.outputs.projectserum_version }}

e2e_custom_build_previous_artifacts:
name: E2E Build Previous Release Artifacts
environment: integration
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest-32cores-128GB
needs: [e2e_custom_build_artifacts]
steps:
- name: Checkout previous release
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
ref: v1.0.2
- uses: actions/download-artifact@v4
with:
name: artifacts
path: ./temp/artifacts
- name: build contracts
run: |
# TODO: make dynamic container
docker run -d -v $(pwd):/repo --name build-container projectserum/build:v0.25.0 tail -f /dev/null
# build with keys
docker exec build-container bash -c "\
export RUSTUP_HOME=\"/root/.rustup\" &&\
cd /repo &&\
./scripts/programs-keys-gen.sh &&\
cd ./contracts &&\
anchor build &&\
chown -R $(id -u):$(id -g) /repo"
# clean up the container
docker stop build-container
docker rm build-container
- name: compare hashes
run: |
echo "current: $(sha1sum ./temp/artifacts/* | sha1sum)" # get hash of current artifacts
mkdir -p temp/artifacts/previous
cp ${{ env.CONTRACT_ARTIFACTS_PATH }}/* temp/artifacts/previous
echo "previous: $(sha1sum ${{ env.CONTRACT_ARTIFACTS_PATH }}/* | sha1sum)" # get hash of previous artifacts
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: ./temp/artifacts/ # combine artifacts
overwrite: true

e2e_custom_build_custom_chainlink_image:
name: E2E Custom Build Custom CL Image
runs-on: ubuntu-latest-16cores-64GB
Expand Down

0 comments on commit 8b2c37c

Please sign in to comment.