From 7d1e6c5d0bc5cb483b465d97e387b74d5c5a65e4 Mon Sep 17 00:00:00 2001 From: Flouse <1297478+Flouse@users.noreply.github.com> Date: Fri, 22 Sep 2023 01:40:04 +0000 Subject: [PATCH] ci: deprecate the `build-axon` workflow due to PR #1446 and issue #1387 --- .../axon-start-with-short-genesis.yml | 36 +++++++------ .github/workflows/build.yml | 52 ------------------- .github/workflows/openzeppelin_test_11.yml | 5 -- .github/workflows/openzeppelin_test_16_19.yml | 5 -- .../openzeppelin_test_1_5_and_12_15.yml | 5 -- .github/workflows/openzeppelin_test_6_10.yml | 5 -- .github/workflows/v3_core_test.yml | 5 -- 7 files changed, 20 insertions(+), 93 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/axon-start-with-short-genesis.yml b/.github/workflows/axon-start-with-short-genesis.yml index b3796e93c..9ec521dee 100644 --- a/.github/workflows/axon-start-with-short-genesis.yml +++ b/.github/workflows/axon-start-with-short-genesis.yml @@ -7,13 +7,8 @@ on: workflow_dispatch: jobs: - # Build Axon and cache the binary - build-axon: - uses: ./.github/workflows/build.yml - # Start a single Axon node single-node: - needs: build-axon strategy: matrix: # Supported GitHub-hosted runners and hardware resources @@ -23,14 +18,19 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Cache of the axon binary - id: axon-bin-cache + + - name: Cache of Cargo uses: actions/cache@v3 with: path: | - target/debug/axon - target/release/axon - key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-axon-${{ github.sha }} + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Build Axon in the development profile + run: cargo build - name: Start a single Axon node env: @@ -63,7 +63,6 @@ jobs: ${{ runner.temp }}/${{ matrix.os }}-single-axon-node.log multi-nodes: - needs: build-axon strategy: matrix: # Supported GitHub-hosted runners and hardware resources @@ -73,14 +72,19 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Cache of the axon binary - id: axon-bin-cache + + - name: Cache of Cargo uses: actions/cache@v3 with: path: | - target/debug/axon - target/release/axon - key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-axon-${{ github.sha }} + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Build Axon in the development profile + run: cargo build - name: Start multiple Axon nodes env: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 51b541152..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build Axon Binary - -on: - workflow_dispatch: - # Rather than copying and pasting from one workflow to another, you can make workflows reusable. - # See https://docs.github.com/en/actions/using-workflows/reusing-workflows - workflow_call: - -jobs: - build-and-cache: - strategy: - matrix: - # Supported GitHub-hosted runners and hardware resources - # see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources - os: [ubuntu-22.04] - fail-fast: false - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v4 - - - name: Cache of the Axon binary - id: axon-bin-cache - uses: actions/cache@v3 - with: - path: | - target/debug/axon - target/release/axon - key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-axon-${{ github.sha }} - - - name: Cache of Cargo - uses: actions/cache@v3 - if: steps.axon-bin-cache.outputs.cache-hit != 'true' - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build - - - name: Build Axon in the development profile - if: steps.axon-bin-cache.outputs.cache-hit != 'true' - run: cargo build - - # TOOD: not sure if this step is required - # - name: Build a release version of Axon - # if: steps.axon-bin-cache.outputs.cache-hit != 'true' - # run: cargo build --release diff --git a/.github/workflows/openzeppelin_test_11.yml b/.github/workflows/openzeppelin_test_11.yml index c368fa0a7..c593c2042 100644 --- a/.github/workflows/openzeppelin_test_11.yml +++ b/.github/workflows/openzeppelin_test_11.yml @@ -12,12 +12,7 @@ on: required: true jobs: - # Build Axon and cache the binary - build-axon: - uses: ./.github/workflows/build.yml - openzeppelin-contracts-1: - needs: build-axon strategy: matrix: # Supported GitHub-hosted runners and hardware resources diff --git a/.github/workflows/openzeppelin_test_16_19.yml b/.github/workflows/openzeppelin_test_16_19.yml index 1aac71085..014e70e16 100644 --- a/.github/workflows/openzeppelin_test_16_19.yml +++ b/.github/workflows/openzeppelin_test_16_19.yml @@ -12,12 +12,7 @@ on: required: true jobs: - # Build Axon and cache the binary - build-axon: - uses: ./.github/workflows/build.yml - openzeppelin-contracts-1: - needs: build-axon strategy: matrix: # Supported GitHub-hosted runners and hardware resources diff --git a/.github/workflows/openzeppelin_test_1_5_and_12_15.yml b/.github/workflows/openzeppelin_test_1_5_and_12_15.yml index 67b92f845..2263d2599 100644 --- a/.github/workflows/openzeppelin_test_1_5_and_12_15.yml +++ b/.github/workflows/openzeppelin_test_1_5_and_12_15.yml @@ -12,12 +12,7 @@ on: required: true jobs: - # Build Axon and cache the binary - build-axon: - uses: ./.github/workflows/build.yml - openzeppelin-contracts-1: - needs: build-axon strategy: matrix: # Supported GitHub-hosted runners and hardware resources diff --git a/.github/workflows/openzeppelin_test_6_10.yml b/.github/workflows/openzeppelin_test_6_10.yml index ff3f62693..cc45574e7 100644 --- a/.github/workflows/openzeppelin_test_6_10.yml +++ b/.github/workflows/openzeppelin_test_6_10.yml @@ -12,12 +12,7 @@ on: required: true jobs: - # Build Axon and cache the binary - build-axon: - uses: ./.github/workflows/build.yml - openzeppelin-contracts-1: - needs: build-axon strategy: matrix: # Supported GitHub-hosted runners and hardware resources diff --git a/.github/workflows/v3_core_test.yml b/.github/workflows/v3_core_test.yml index 581ff0dcc..020254240 100644 --- a/.github/workflows/v3_core_test.yml +++ b/.github/workflows/v3_core_test.yml @@ -12,12 +12,7 @@ on: required: true jobs: - # Build Axon and cache the binary - build-axon: - uses: ./.github/workflows/build.yml - v3-core-test: - needs: build-axon strategy: matrix: # Supported GitHub-hosted runners and hardware resources