-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update actions/cache to v4.0.2 * chore: update actions/checkout to v4.1.4 * chore: update actions/download-artifact to v4.1.7 * chore: update actions/setup-go to v5.0.1 * chore: update actions/setup-node to v4.0.2 * chore: update actions/upload-artifact to v4.3.3 * chore: update cachix/cachix-action to v14 * chore: update cachix/install-nix-action to v26 * chore: update dawidd6/action-download-artifact to v3.1.4 * chore: update dorny/paths-filter to v3.0.2 * chore: update github/codeql-action/analyze to v3.25.3 * chore: update github/codeql-action/autobuild to v3.25.3 * chore: update github/codeql-action/init to v3.25.3 * chore: update peter-evans/create-pull-request to v6.0.5 * chore: update planetscale/ghcommit-action to v0.1.37 * chore: update reviewdog/action-actionlint to v1.45.0 * chore: update setup-github-token to [email protected] * chore: update chainlink-testing-framework/* to v2.3.16 * chore: update smartcontractkit/push-gha-metrics-action to v3.0.0 * chore: update softprops/action-gh-release to v2.0.5 * chore: update sonarsource/sonarqube-scan-action to v2.0.2 * chore: update tj-actions/branch-names to v8.0.1 * chore: fix contracts build w/ outdated container * fix: use should_checkout for build-images * Use a docker run command to build contracts This temporarily gets around node issues for building contracts * update checkout version * cleanup issues and debug block * add github workspace arg to script * Use safe git path within container * break up the docker commands to use github git diff since it doesn't play nice in the container * move git install into section where we only do it when running inside of the container * remove interactive mode * adjust artifact permissions after docker build for upload * fix action format error * fix rust lint and test * path and lint fixes * chore: full bump after node20 solana build * fix: use download-artifact * fix: comment out container fields --------- Co-authored-by: Tate <[email protected]>
- Loading branch information
Showing
19 changed files
with
300 additions
and
159 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,51 @@ inputs: | |
ref: | ||
required: false | ||
description: The chainlink-solana ref to use | ||
image: | ||
required: false | ||
description: docker image to use to build | ||
image-version: | ||
required: false | ||
description: docker image version/tag to use for build | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout solana | ||
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | ||
with: | ||
repository: smartcontractkit/chainlink-solana | ||
ref: ${{ inputs.ref }} | ||
|
||
# temporary docker run to build artifacts | ||
- name: Docker Builder | ||
if: ${{ inputs.image != '' && inputs.image-version != '' }} | ||
env: | ||
image: ${{ inputs.image }} | ||
image_version: ${{ inputs.image-version }} | ||
shell: bash | ||
run: | | ||
# start container | ||
docker run -d -v $(pwd):/repo --name build-container "${image}":"${image_version}" tail -f /dev/null | ||
# generate go bindings | ||
docker exec build-container bash -c "/repo/scripts/build-contract-artifacts-action.sh" | ||
# check go bindings | ||
git diff --stat --exit-code | ||
# 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 | ||
# should be used again after moving from projectserum/build to backpackapp/build | ||
- name: Install latest Git version (>= 2.18.0) for actions/checkout | ||
if: ${{ inputs.image == '' && inputs.image-version == '' }} | ||
shell: bash | ||
run: | | ||
apt-get update | ||
|
@@ -17,37 +57,37 @@ runs: | |
apt update | ||
apt install git -y | ||
git config --global --add safe.directory "$GITHUB_WORKSPACE" | ||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 | ||
with: | ||
repository: smartcontractkit/chainlink-solana | ||
ref: ${{ inputs.ref }} | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
if: ${{ inputs.image == '' && inputs.image-version == '' }} | ||
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | ||
with: | ||
go-version-file: "go.mod" | ||
check-latest: true | ||
- name: yarn install | ||
shell: bash | ||
run: yarn install --frozen-lockfile | ||
- name: Generate build artifacts for go bindings check | ||
if: ${{ inputs.image == '' && inputs.image-version == '' }} | ||
shell: bash | ||
run: anchor build | ||
working-directory: contracts | ||
- name: Check generated go bindings are up to date | ||
if: ${{ inputs.image == '' && inputs.image-version == '' }} | ||
shell: bash | ||
run: | | ||
go install github.com/gagliardetto/[email protected] | ||
./scripts/anchor-go-gen.sh | ||
git diff --stat --exit-code | ||
- name: Generate program_ids | ||
if: ${{ inputs.image == '' && inputs.image-version == '' }} | ||
shell: bash | ||
run: ./scripts/programs-keys-gen.sh | ||
- name: Generate build artifacts with custom program_ids | ||
if: ${{ inputs.image == '' && inputs.image-version == '' }} | ||
shell: bash | ||
run: anchor build | ||
working-directory: contracts | ||
|
||
#save the contracts artifacts | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: artifacts | ||
path: contracts/target/deploy |
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
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
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
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
Oops, something went wrong.