Skip to content

Commit

Permalink
ci: deprecate the build-axon workflow (#1447)
Browse files Browse the repository at this point in the history
* ci: deprecate the `build-axon` workflow

due to PR #1446 and issue #1387

* ci: update the cache key for `cargo build`
  • Loading branch information
Flouse authored Sep 25, 2023
1 parent 83ea6f2 commit 9ce5aa0
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 99 deletions.
40 changes: 24 additions & 16 deletions .github/workflows/axon-start-with-short-genesis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,14 +18,21 @@ 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-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build

- name: Start a single Axon node
env:
Expand Down Expand Up @@ -63,7 +65,6 @@ jobs:
${{ runner.temp }}/${{ matrix.os }}-single-axon-node.log
multi-nodes:
needs: build-axon
strategy:
matrix:
# Supported GitHub-hosted runners and hardware resources
Expand All @@ -73,14 +74,21 @@ 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-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
- name: Build Axon in the development profile
run: cargo build

- name: Start multiple Axon nodes
env:
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/build.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-build
${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo
- uses: lyricwulf/abc@v1
with:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/openzeppelin_test_11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -106,7 +101,9 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
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
run: cargo build

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/openzeppelin_test_16_19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -106,7 +101,9 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
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
run: cargo build

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/openzeppelin_test_1_5_and_12_15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -107,7 +102,9 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
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
run: cargo build

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/openzeppelin_test_6_10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -106,7 +101,9 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
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
run: cargo build

Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/v3_core_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -94,7 +89,9 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
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
run: cargo build

Expand Down

0 comments on commit 9ce5aa0

Please sign in to comment.