From e88d85b95a22968862b783207249292523aac275 Mon Sep 17 00:00:00 2001 From: aalu1418 <50029043+aalu1418@users.noreply.github.com> Date: Mon, 5 Aug 2024 13:12:30 -0600 Subject: [PATCH] cleanup duplicate workflow + fix dir --- .../build_contract_artifacts/action.yml | 76 +++++++++---------- .github/workflows/e2e_custom_cl.yml | 1 + 2 files changed, 39 insertions(+), 38 deletions(-) diff --git a/.github/actions/build_contract_artifacts/action.yml b/.github/actions/build_contract_artifacts/action.yml index 155f1bcb4..b39ef7cc1 100644 --- a/.github/actions/build_contract_artifacts/action.yml +++ b/.github/actions/build_contract_artifacts/action.yml @@ -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/anchor-go@v0.2.3 - ./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/anchor-go@v0.2.3 + # ./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 diff --git a/.github/workflows/e2e_custom_cl.yml b/.github/workflows/e2e_custom_cl.yml index 36e9b8d1f..489b24599 100644 --- a/.github/workflows/e2e_custom_cl.yml +++ b/.github/workflows/e2e_custom_cl.yml @@ -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