Skip to content

Commit

Permalink
chore: fix contracts build w/ outdated container
Browse files Browse the repository at this point in the history
  • Loading branch information
erikburt committed May 7, 2024
1 parent 3395944 commit cd7ea1a
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 43 deletions.
6 changes: 3 additions & 3 deletions .github/actions/build_contract_artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ runs:
apt update
apt install git -y
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
repository: smartcontractkit/chainlink-solana
ref: ${{ inputs.ref }}
- name: Setup go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
check-latest: true
Expand All @@ -47,7 +47,7 @@ runs:
run: anchor build
working-directory: contracts
- name: Upload Artifacts
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: artifacts
path: contracts/target/deploy
8 changes: 6 additions & 2 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:
FORCE_COLOR: 1
steps:
- name: Checkout the repo
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
# Use v3.6.0 because the custom runner (container configured above)
# doesn't have node20 installed which is required for versions >=4
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Build contracts
uses: ./.github/actions/build_contract_artifacts

Expand Down Expand Up @@ -146,8 +148,10 @@ jobs:
fi
- name: Checkout the repo
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
# Use v3-node20 because the build_contract_artfifacts action must use the node16 actions/upload-artifact@v3
# due to tech-debt. actions/download-artifact@v4 is not compatible with actions/upload-artifact@v3.
- name: Download Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
uses: actions/download-artifact@246d7188e736d3686f6d19628d253ede9697bd55 # v3-node20
with:
name: artifacts
path: ${{ env.CONTRACT_ARTIFACTS_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_testnet_daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
- name: Checkout the solana repo
# Use v3.6.0 because the custom runner (container configured above)
# doesn't have node20 installed which is required for versions >=4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
repository: smartcontractkit/chainlink-solana
ref: ${{ needs.get_solana_sha.outputs.sha }}
Expand Down
73 changes: 36 additions & 37 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,39 @@ jobs:
env:
RUSTUP_HOME: "/root/.rustup"
FORCE_COLOR: 1

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Cache cargo registry
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: contracts/target
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- run: solana-keygen new -o id.json --no-bip39-passphrase
- name: Compile typescript client
run: |
cd ../ts
yarn install --frozen-lockfile
yarn build
- run: yarn install --frozen-lockfile
- run: anchor test
- run: |
cd examples/hello-world
yarn install --frozen-lockfile
anchor test
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Cache cargo registry
uses: actions/cache@v2.1.7
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v2.1.7
with:
path: ~/.cargo/git
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo target dir
uses: actions/cache@v2.1.7
with:
path: contracts/target
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- run: solana-keygen new -o id.json --no-bip39-passphrase
- name: Compile typescript client
run: |
cd ../ts
yarn install --frozen-lockfile
yarn build
- run: yarn install --frozen-lockfile
- run: anchor test
- run: |
cd examples/hello-world
yarn install --frozen-lockfile
anchor test
rust_lint:
name: Rust Lint
runs-on: ubuntu-latest
Expand All @@ -76,21 +75,21 @@ jobs:
FORCE_COLOR: 1

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Cache cargo registry
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@v2.1.7
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo index
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@v2.1.7
with:
path: ~/.cargo/git
key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }}

- name: Cache cargo target dir
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@v2.1.7
with:
path: contracts/target
key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
Expand Down

0 comments on commit cd7ea1a

Please sign in to comment.