Skip to content

Commit 511e6a5

Browse files
committed
chore: add submodules
1 parent ab1e60a commit 511e6a5

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
submodule-cache-key: submodule-${{ steps.create-cache-key.outputs.submodule-cache-key}}
4545

4646
build:
47+
needs: checkout-submodules
4748
runs-on: ubuntu-24.04
4849

4950
steps:
@@ -64,6 +65,12 @@ jobs:
6465

6566
- run: pnpm -v && command -v pnpm
6667

68+
- name: Restore ethereum-tests submodule
69+
uses: actions/cache/restore@v4
70+
with:
71+
path: ${{github.workspace}}/packages/ethereum-tests
72+
key: ${{ needs.checkout-submodules.outputs.submodule-cache-key }}
73+
6774
- name: Install deps
6875
run: pnpm install --frozen-lockfile
6976

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,49 @@ name: CI
22
on:
33
pull_request:
44

5+
env:
6+
cwd: ${{github.workspace}}
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-ci
10+
cancel-in-progress: true
11+
512
jobs:
13+
checkout-submodules:
14+
runs-on: ubuntu-24.04
15+
16+
steps:
17+
- uses: actions/checkout@v5
18+
with:
19+
submodules: recursive
20+
21+
- id: create-cache-key
22+
run: echo "submodule-cache-key=$(git submodule | head -n 1)" >> $GITHUB_OUTPUT
23+
shell: bash
24+
25+
- uses: actions/cache/restore@v4
26+
id: submodules-cache-restore
27+
with:
28+
key: submodule-${{ steps.create-cache-key.outputs.submodule-cache-key }}
29+
path: ${{github.workspace}}/packages/ethereum-tests
30+
31+
- if: steps.submodules-cache-restore.outputs.cache-hit != 'true'
32+
uses: actions/cache/save@v4
33+
id: submodule-cache-save
34+
with:
35+
path: ${{github.workspace}}/packages/ethereum-tests
36+
key: submodule-${{ steps.create-cache-key.outputs.submodule-cache-key}}
37+
38+
outputs:
39+
submodule-cache-key: submodule-${{ steps.create-cache-key.outputs.submodule-cache-key}}
40+
641
build:
42+
needs: checkout-submodules
743
runs-on: ubuntu-24.04
844
steps:
945
- uses: actions/checkout@v5
46+
with:
47+
submodules: recursive
1048

1149
- name: Install pnpm
1250
uses: pnpm/action-setup@v4
@@ -21,6 +59,12 @@ jobs:
2159

2260
- run: pnpm -v && command -v pnpm
2361

62+
- name: Restore ethereum-tests submodule
63+
uses: actions/cache/restore@v4
64+
with:
65+
path: ${{github.workspace}}/packages/ethereum-tests
66+
key: ${{ needs.checkout-submodules.outputs.submodule-cache-key }}
67+
2468
- name: Install deps
2569
run: pnpm install --frozen-lockfile
2670

@@ -32,3 +76,6 @@ jobs:
3276

3377
- name: Test
3478
run: pnpm test
79+
80+
outputs:
81+
dep-cache-key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}

0 commit comments

Comments
 (0)