Skip to content

Commit 6599d9d

Browse files
committed
ci: update install workflow according to v8 changes
1 parent 9bcf045 commit 6599d9d

File tree

6 files changed

+12
-31
lines changed

6 files changed

+12
-31
lines changed

.github/actions/install/action.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@ runs:
6161
- name: install v8
6262
shell: bash
6363
run: |
64-
mkdir -p v8/out/${{ inputs.os }}/debug/obj/zig/
65-
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/debug/obj/zig/libc_v8.a
66-
67-
mkdir -p v8/out/${{ inputs.os }}/release/obj/zig/
68-
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/release/obj/zig/libc_v8.a
64+
mkdir -p v8
65+
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/libc_v8.a
6966
7067
- name: Cache libiconv
7168
id: cache-libiconv

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
arch: ${{env.ARCH}}
3939

4040
- name: zig build
41-
run: zig build --release=safe -Doptimize=ReleaseSafe -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
41+
run: zig build -Dprebuilt_v8_path=v8 -Doptimize=ReleaseSafe -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
4242

4343
- name: Rename binary
4444
run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }}
@@ -76,7 +76,7 @@ jobs:
7676
arch: ${{env.ARCH}}
7777

7878
- name: zig build
79-
run: zig build --release=safe -Doptimize=ReleaseSafe -Dcpu=generic -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
79+
run: zig build -Dprebuilt_v8_path=v8 -Doptimize=ReleaseSafe -Dcpu=generic -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
8080

8181
- name: Rename binary
8282
run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }}
@@ -116,7 +116,7 @@ jobs:
116116
arch: ${{env.ARCH}}
117117

118118
- name: zig build
119-
run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
119+
run: zig build -Dprebuilt_v8_path=v8 -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
120120

121121
- name: Rename binary
122122
run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }}
@@ -159,7 +159,7 @@ jobs:
159159
arch: ${{env.ARCH}}
160160

161161
- name: zig build
162-
run: zig build --release=safe -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
162+
run: zig build -Dprebuilt_v8_path=v8 -Doptimize=ReleaseSafe -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
163163

164164
- name: Rename binary
165165
run: mv zig-out/bin/lightpanda lightpanda-${{ env.ARCH }}-${{ env.OS }}

.github/workflows/e2e-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- uses: ./.github/actions/install
5959

6060
- name: zig build release
61-
run: zig build -Doptimize=ReleaseFast -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
61+
run: zig build -Dprebuilt_v8_path=v8 -Doptimize=ReleaseFast -Dcpu=x86_64 -Dgit_commit=$(git rev-parse --short ${{ github.sha }})
6262

6363
- name: upload artifact
6464
uses: actions/upload-artifact@v4

.github/workflows/zig-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- uses: ./.github/actions/install
5757

5858
- name: zig build debug
59-
run: zig build
59+
run: zig build -Dprebuilt_v8_path=v8
6060

6161
- name: upload artifact
6262
uses: actions/upload-artifact@v4
@@ -104,7 +104,7 @@ jobs:
104104
- uses: ./.github/actions/install
105105

106106
- name: zig build test
107-
run: zig build test -- --json > bench.json
107+
run: zig build -Dprebuilt_v8_path=v8 test -- --json > bench.json
108108

109109
- name: write commit
110110
run: |

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ RUN case $TARGETPLATFORM in \
5050
*) ARCH="x86_64" ;; \
5151
esac && \
5252
curl --fail -L -o libc_v8.a https://github.com/lightpanda-io/zig-v8-fork/releases/download/${ZIG_V8}/libc_v8_${V8}_linux_${ARCH}.a && \
53-
mkdir -p v8/out/linux/release/obj/zig/ && \
54-
mv libc_v8.a v8/out/linux/release/obj/zig/libc_v8.a
53+
mkdir -p v8/ && \
54+
mv libc_v8.a v8/libc_v8.a
5555

5656
# build release
57-
RUN make build
57+
RUN zig build -Doptimize=ReleaseSafe -Dprebuilt_v8_path=v8 -Dgit_commit=$$(git rev-parse --short HEAD)
5858

5959
FROM debian:stable-slim
6060

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -246,22 +246,6 @@ Note: when Mimalloc is built in dev mode, you can dump memory stats with the
246246
env var `MIMALLOC_SHOW_STATS=1`. See
247247
[https://microsoft.github.io/mimalloc/environment.html](https://microsoft.github.io/mimalloc/environment.html).
248248

249-
**v8**
250-
251-
First, get the tools necessary for building V8, as well as the V8 source code:
252-
253-
```
254-
make get-v8
255-
```
256-
257-
Next, build v8. This build task is very long and cpu consuming, as you will build v8 from sources.
258-
259-
```
260-
make build-v8
261-
```
262-
263-
For dev env, use `make build-v8-dev`.
264-
265249
## Test
266250

267251
### Unit Tests

0 commit comments

Comments
 (0)