Skip to content

Commit

Permalink
cleanup duplicate workflow + fix dir
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Aug 5, 2024
1 parent d1cd6fe commit e88d85b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 38 deletions.
76 changes: 38 additions & 38 deletions .github/actions/build_contract_artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,44 +46,44 @@ runs:
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
apt-get install software-properties-common -y
add-apt-repository ppa:git-core/ppa
apt update
apt install git -y
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Setup go
if: ${{ inputs.image == '' && inputs.image-version == '' }}
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: "go.mod"
check-latest: true
- 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
# # 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
# apt-get install software-properties-common -y
# add-apt-repository ppa:git-core/ppa
# apt update
# apt install git -y
# git config --global --add safe.directory "$GITHUB_WORKSPACE"
# - name: Setup go
# if: ${{ inputs.image == '' && inputs.image-version == '' }}
# uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
# with:
# go-version-file: "go.mod"
# check-latest: true
# - 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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e_custom_cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ jobs:
docker rm build-container
# copy + save hash
mkdir ./temp/artifacts/previous
cp ${{ env.CONTRACT_ARTIFACTS_PATH }}/* ./temp/artifacts/previous
cd ./temp/artifacts/previous # need to be in directory for hashes to compare without path differences
# shellcheck disable=SC2035
Expand Down

0 comments on commit e88d85b

Please sign in to comment.