Skip to content

Commit 042a071

Browse files
mookumskrichprollsch
authored andcommitted
ci: retrieve build result from zig cache
1 parent 3f3e43a commit 042a071

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/build-release.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ permissions:
1313
env:
1414
ZIG_VERSION: 0.15.1
1515
V8_REVISION: 14.0.365.4
16+
ZIG_CACHE: "~/.cache/zig"
1617

1718
jobs:
1819
build-x86_64-linux:
@@ -25,6 +26,7 @@ jobs:
2526
- uses: mlugg/setup-zig@v2
2627
with:
2728
version: ${{ env.ZIG_VERSION }}
29+
cache-key: ${{ env.ZIG_VERSION }}-${{ env.OS }}-${{ env.ARCH }}
2830

2931
- uses: actions/checkout@v4
3032
with:
@@ -36,7 +38,7 @@ jobs:
3638
sudo apt-get install -yq libglib2.0-dev
3739
3840
- run: zig build -Doptimize=ReleaseSafe build-v8
39-
- run: mv .zig-cache/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
41+
- run: mv ${{ env.ZIG_CACHE }}/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
4042

4143
- name: Upload the build
4244
uses: ncipollo/release-action@v1
@@ -54,6 +56,7 @@ jobs:
5456
- uses: mlugg/setup-zig@v2
5557
with:
5658
version: ${{ env.ZIG_VERSION }}
59+
cache-key: ${{ env.ZIG_VERSION }}-${{ env.OS }}-${{ env.ARCH }}
5760

5861
- uses: actions/setup-python@v5
5962
with:
@@ -65,7 +68,7 @@ jobs:
6568
fetch-depth: 0
6669

6770
- run: zig build -Doptimize=ReleaseSafe build-v8
68-
- run: mv .zig-cache/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
71+
- run: mv ${{ env.ZIG_CACHE }}/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
6972

7073
- name: Upload the build
7174
uses: ncipollo/release-action@v1
@@ -82,6 +85,7 @@ jobs:
8285
steps:
8386
- uses: mlugg/setup-zig@v2
8487
with:
88+
cache-key: ${{ env.ZIG_VERSION }}-${{ env.OS }}-${{ env.ARCH }}
8589
version: ${{ env.ZIG_VERSION }}
8690

8791
- uses: actions/checkout@v4
@@ -99,7 +103,7 @@ jobs:
99103
sudo ln -nsf /usr/lib/llvm-21/lib/clang/21/lib/linux/ /usr/lib/llvm-21/lib/clang/21/lib/aarch64-unknown-linux-gnu
100104
101105
- run: zig build -Doptimize=ReleaseSafe build-v8
102-
- run: mv .zig-cache/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
106+
- run: mv ${{ env.ZIG_CACHE }}/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
103107

104108
- name: Upload the build
105109
uses: ncipollo/release-action@v1
@@ -117,6 +121,7 @@ jobs:
117121
- uses: mlugg/setup-zig@v2
118122
with:
119123
version: ${{ env.ZIG_VERSION }}
124+
cache-key: ${{ env.ZIG_VERSION }}-${{ env.OS }}-${{ env.ARCH }}
120125

121126
- uses: actions/setup-python@v5
122127
with:
@@ -128,7 +133,7 @@ jobs:
128133
fetch-depth: 0
129134

130135
- run: zig build -Doptimize=ReleaseSafe build-v8
131-
- run: mv .zig-cache/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
136+
- run: mv ${{ env.ZIG_CACHE }}/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
132137

133138
- name: Upload the build
134139
uses: ncipollo/release-action@v1
@@ -147,7 +152,7 @@ jobs:
147152
- uses: mlugg/setup-zig@v2
148153
with:
149154
version: ${{ env.ZIG_VERSION }}
150-
155+
cache-key: ${{ env.ZIG_VERSION }}-${{ env.OS }}-${{ env.ARCH }}
151156
- uses: actions/setup-python@v5
152157
with:
153158
python-version: '3.11'
@@ -158,7 +163,7 @@ jobs:
158163
fetch-depth: 0
159164

160165
- run: zig build -Doptimize=ReleaseSafe build-v8
161-
- run: mv .zig-cache/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
166+
- run: mv ${{ env.ZIG_CACHE }}/v8-${{ env.V8_REVISION }}/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
162167

163168
- name: Upload the build
164169
uses: ncipollo/release-action@v1

0 commit comments

Comments
 (0)