Skip to content

Commit b73f838

Browse files
authored
Merge pull request #6424 from wileyj/fix/6390
Reduce gha cache usage from ~3.7GB -> ~1.0 GB
2 parents d22bad7 + 0324b8d commit b73f838

File tree

4 files changed

+35
-32
lines changed

4 files changed

+35
-32
lines changed

.github/workflows/cargo-hack-check.yml

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,12 @@ jobs:
3838
with:
3939
persist-credentials: false
4040

41-
- name: Setup Rust with Cache
41+
- name: Setup Rust
4242
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
4343
with:
4444
toolchain: ${{ needs.setup.outputs.rust-toolchain }}
4545
target: x86_64-pc-windows-gnu,x86_64-unknown-linux-gnu
46-
cache: true
47-
cache-key: cargo-hack-native-${{ needs.setup.outputs.rust-toolchain }}-${{ hashFiles('**/Cargo.lock') }}
46+
cache: false
4847

4948
- name: Install cargo-hack
5049
uses: taiki-e/install-action@2383334cf567d78771fc7d89b6b3802ef1412cf6 # v2.56.8
@@ -66,54 +65,49 @@ jobs:
6665
--target x86_64-pc-windows-gnu \
6766
--target x86_64-unknown-linux-gnu
6867
69-
# WASM targets - separate cache since dependencies differ
68+
# WASM targets - No caching needed as it runs in parallel with longer jobs
7069
wasm-targets:
71-
name: ${{ matrix.name }}
70+
name: WASM targets
7271
runs-on: ubuntu-latest
7372
needs: setup
74-
strategy:
75-
fail-fast: false
76-
matrix:
77-
include:
78-
- name: "Clarity & Stacks-Common WASM Web"
79-
command: |
80-
cargo hack check \
81-
-p clarity-serialization \
82-
-p stacks-common \
83-
--each-feature \
84-
--no-dev-deps \
85-
--exclude-features=default,rusqlite,ctrlc-handler,wasm-deterministic \
86-
--features=wasm-web
87-
88-
- name: "Clarity & Stacks-Common WASM Deterministic"
89-
command: |
90-
cargo hack check \
91-
-p clarity-serialization \
92-
-p stacks-common \
93-
--each-feature \
94-
--no-dev-deps \
95-
--include-features=wasm-deterministic,slog_json \
96-
--features=wasm-deterministic
97-
9873
steps:
9974
- name: Checkout
10075
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
10176
with:
10277
persist-credentials: false
10378

104-
- name: Setup Rust with Cache
79+
- name: Setup Rust
10580
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
10681
with:
10782
toolchain: ${{ needs.setup.outputs.rust-toolchain }}
10883
target: wasm32-unknown-unknown
109-
cache: true
110-
cache-key: cargo-hack-wasm-${{ matrix.name }}-${{ needs.setup.outputs.rust-toolchain }}-${{ hashFiles('**/Cargo.lock') }}
84+
cache: false
11185

11286
- name: Install cargo-hack
11387
uses: taiki-e/install-action@2383334cf567d78771fc7d89b6b3802ef1412cf6 # v2.56.8
11488
with:
11589
tool: cargo-hack
11690

91+
- name: Run cargo hack check (WASM Web)
92+
run: |
93+
cargo hack check \
94+
-p clarity-serialization \
95+
-p stacks-common \
96+
--each-feature \
97+
--no-dev-deps \
98+
--exclude-features=default,rusqlite,ctrlc-handler,wasm-deterministic \
99+
--features=wasm-web
100+
101+
- name: Run cargo hack check (WASM Deterministic)
102+
run: |
103+
cargo hack check \
104+
-p clarity-serialization \
105+
-p stacks-common \
106+
--each-feature \
107+
--no-dev-deps \
108+
--include-features=wasm-deterministic,slog_json \
109+
--features=wasm-deterministic
110+
117111
- name: Run cargo hack check
118112
run: ${{ matrix.command }}
119113

@@ -130,6 +124,7 @@ jobs:
130124
uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1.13.0
131125
with:
132126
toolchain: nightly
127+
cache: false
133128

134129
- name: Check fuzz targets
135130
run: |

.github/workflows/clippy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ jobs:
2626
- name: Checkout the latest code
2727
id: git_checkout
2828
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
2930
- name: Define Rust Toolchain
3031
id: define_rust_toolchain
3132
run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
33+
3234
- name: Setup Rust Toolchain
3335
id: setup_rust_toolchain
3436
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
3537
with:
3638
toolchain: ${{ env.RUST_TOOLCHAIN }}
3739
components: clippy
40+
cache: false
41+
3842
- name: Clippy
3943
id: clippy
4044
run: cargo clippy-stacks

.github/workflows/constants-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ jobs:
1717
- name: Checkout the latest code
1818
id: git_checkout
1919
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
2021
- name: Define Rust Toolchain
2122
id: define_rust_toolchain
2223
run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
24+
2325
- name: Setup Rust Toolchain
2426
id: setup_rust_toolchain
2527
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
2628
with:
2729
toolchain: ${{ env.RUST_TOOLCHAIN }}
30+
cache: false
2831

2932
- name: Dump constants JSON
3033
id: consts-dump

.github/workflows/nix-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ jobs:
3838
- uses: DeterminateSystems/magic-nix-cache-action@e1c1dae8e170ed20fd2e6aaf9979ca2d3905d636 # v12
3939
with:
4040
use-flakehub: false # Remove error when trying to authenticate without credentials
41+
use-gha-cache: false # Disable uploading cache to gha cache
4142
- run: nix flake check ./contrib/nix

0 commit comments

Comments
 (0)