Skip to content

Commit bfa6f55

Browse files
committed
ci: remove container usage and download v8 from release
1 parent 5fb25cf commit bfa6f55

File tree

5 files changed

+70
-68
lines changed

5 files changed

+70
-68
lines changed

.github/actions/install/action.yml

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,72 @@
11
name: "Browsercore install"
22
description: "Install deps for the project browsercore"
33

4+
inputs:
5+
zig:
6+
description: 'Zig version to install'
7+
required: false
8+
default: '0.12.1'
9+
arch:
10+
description: 'CPU arch used to select the v8 lib'
11+
required: false
12+
default: 'x86_64'
13+
os:
14+
description: 'OS used to select the v8 lib'
15+
required: false
16+
default: 'linux'
17+
zig-v8:
18+
description: 'zig v8 version to install'
19+
required: false
20+
default: 'v0.1.5'
21+
v8:
22+
description: 'v8 version to install'
23+
required: false
24+
default: '11.1.134'
25+
cache-dir:
26+
description: 'cache dir to use'
27+
required: false
28+
default: '~/.cache'
29+
430
runs:
531
using: "composite"
632

733
steps:
34+
- name: Install apt deps
35+
shell: bash
36+
run: sudo apt-get install -y wget xz-utils python3 ca-certificates git pkg-config libglib2.0-dev gperf libexpat1-dev cmake clang
37+
38+
- uses: mlugg/setup-zig@v1
39+
with:
40+
version: ${{ inputs.zig }}
41+
42+
- name: Cache v8
43+
id: cache-v8
44+
uses: actions/cache@v3
45+
env:
46+
cache-name: cache-v8
47+
with:
48+
path: ${{ inputs.cache-dir }}/v8
49+
key: libc_v8_${{ inputs.v8 }}_${{ inputs.os }}_${{ inputs.arch }}.a
50+
51+
- if: ${{ steps.cache-v8.outputs.cache-hit != 'true' }}
52+
shell: bash
53+
run: |
54+
mkdir -p ${{ inputs.cache-dir }}/v8
55+
56+
wget -O ${{ inputs.cache-dir }}/v8/libc_v8.a https://github.com/lightpanda-io/zig-v8-fork/releases/download/${{ inputs.zig-v8 }}/libc_v8_${{ inputs.v8 }}_${{ inputs.os }}_${{ inputs.arch }}.a
57+
858
- name: install v8
959
shell: bash
1060
run: |
11-
mkdir -p vendor/zig-js-runtime/vendor/v8/${{env.ARCH}}/debug
12-
ln -s /usr/local/lib/libc_v8.a vendor/zig-js-runtime/vendor/v8/${{env.ARCH}}/debug/libc_v8.a
61+
mkdir -p vendor/zig-js-runtime/vendor/v8/${{inputs.arch}}-${{inputs.os}}/debug
62+
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a vendor/zig-js-runtime/vendor/v8/${{inputs.arch}}-${{inputs.os}}/debug/libc_v8.a
1363
14-
mkdir -p vendor/zig-js-runtime/vendor/v8/${{env.ARCH}}/release
15-
ln -s /usr/local/lib/libc_v8.a vendor/zig-js-runtime/vendor/v8/${{env.ARCH}}/release/libc_v8.a
64+
mkdir -p vendor/zig-js-runtime/vendor/v8/${{inputs.arch}}-${{inputs.os}}/release
65+
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a vendor/zig-js-runtime/vendor/v8/${{inputs.arch}}-${{inputs.os}}/release/libc_v8.a
1666
1767
- name: libiconv
1868
shell: bash
19-
run: |
20-
ln -s /usr/local/lib/libiconv vendor/libiconv
69+
run: make install-libiconv
2170

2271
- name: build mimalloc
2372
shell: bash

.github/workflows/build.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: nightly build
22

3-
env:
4-
ARCH: x86_64-linux
5-
63
on:
74
schedule:
85
- cron: "2 2 * * *"
@@ -12,26 +9,14 @@ on:
129

1310
permissions:
1411
contents: write
15-
packages: read
1612

1713
jobs:
18-
build:
19-
name: nightly build
20-
21-
strategy:
22-
matrix:
23-
target:
24-
- x86_64-linux
25-
include:
26-
- target: x86_64-linux
27-
os: ubuntu-latest
28-
29-
runs-on: ${{ matrix.os }}
30-
container:
31-
image: ghcr.io/lightpanda-io/zig-browsercore:0.12.1
32-
credentials:
33-
username: ${{ github.actor }}
34-
password: ${{ secrets.GITHUB_TOKEN }}
14+
build-linux-x86_64:
15+
env:
16+
ARCH: x86_64
17+
OS: linux
18+
19+
runs-on: ubuntu-latest
3520

3621
steps:
3722
- uses: actions/checkout@v4
@@ -47,11 +32,11 @@ jobs:
4732
run: zig build --release=safe -Doptimize=ReleaseSafe -Dengine=v8
4833

4934
- name: Rename binary
50-
run: mv zig-out/bin/browsercore-get lightpanda-get-${{ matrix.target }}
35+
run: mv zig-out/bin/browsercore-get lightpanda-get-${{ env.ARCH }}-${{ env.OS }}
5136

5237
- name: Upload the build
5338
uses: ncipollo/release-action@v1
5439
with:
5540
allowUpdates: true
56-
artifacts: lightpanda-get-${{ matrix.target }}
41+
artifacts: lightpanda-get-${{ env.ARCH }}-${{ env.OS }}
5742
tag: nightly

.github/workflows/wpt.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: wpt
22

33
env:
4-
ARCH: x86_64-linux
54
AWS_ACCESS_KEY_ID: ${{ vars.LPD_PERF_AWS_ACCESS_KEY_ID }}
65
AWS_SECRET_ACCESS_KEY: ${{ secrets.LPD_PERF_AWS_SECRET_ACCESS_KEY }}
76
AWS_BUCKET: ${{ vars.LPD_PERF_AWS_BUCKET }}
@@ -46,16 +45,6 @@ jobs:
4645
if: github.event.pull_request.draft == false
4746

4847
runs-on: ubuntu-latest
49-
container:
50-
image: ghcr.io/lightpanda-io/zig-browsercore:0.12.1
51-
credentials:
52-
username: ${{ github.actor }}
53-
password: ${{ secrets.GITHUB_TOKEN }}
54-
55-
# docker blocks io_uring syscalls by default now.
56-
# see https://github.com/tigerbeetle/tigerbeetle/pull/1995
57-
# see https://github.com/moby/moby/pull/46762
58-
options: "--security-opt seccomp=unconfined"
5948

6049
steps:
6150
- uses: actions/checkout@v4

.github/workflows/zig-fmt.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: zig-fmt
22

3+
env:
4+
ZIG_VERSION: 0.12.1
5+
36
on:
47
pull_request:
58

@@ -26,15 +29,12 @@ jobs:
2629
if: github.event.pull_request.draft == false
2730

2831
runs-on: ubuntu-latest
29-
container:
30-
image: ghcr.io/lightpanda-io/zig:0.12.1
31-
credentials:
32-
username: ${{ github.actor }}
33-
password: ${{ secrets.GITHUB_TOKEN }}
34-
outputs:
35-
zig_fmt_errs: ${{ steps.fmt.outputs.zig_fmt_errs }}
3632

3733
steps:
34+
- uses: mlugg/setup-zig@v1
35+
with:
36+
version: ${{ env.ZIG_VERSION }}
37+
3838
- uses: actions/checkout@v4
3939
with:
4040
fetch-depth: 0

.github/workflows/zig-test.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: zig-test
22

33
env:
4-
ARCH: x86_64-linux
54
AWS_ACCESS_KEY_ID: ${{ vars.LPD_PERF_AWS_ACCESS_KEY_ID }}
65
AWS_SECRET_ACCESS_KEY: ${{ secrets.LPD_PERF_AWS_SECRET_ACCESS_KEY }}
76
AWS_BUCKET: ${{ vars.LPD_PERF_AWS_BUCKET }}
@@ -44,11 +43,6 @@ jobs:
4443
if: github.event.pull_request.draft == false
4544

4645
runs-on: ubuntu-latest
47-
container:
48-
image: ghcr.io/lightpanda-io/zig-browsercore:0.12.1
49-
credentials:
50-
username: ${{ github.actor }}
51-
password: ${{ secrets.GITHUB_TOKEN }}
5246

5347
steps:
5448
- uses: actions/checkout@v4
@@ -70,11 +64,6 @@ jobs:
7064
if: github.event_name != 'pull_request'
7165

7266
runs-on: ubuntu-latest
73-
container:
74-
image: ghcr.io/lightpanda-io/zig-browsercore:0.12.1
75-
credentials:
76-
username: ${{ github.actor }}
77-
password: ${{ secrets.GITHUB_TOKEN }}
7867

7968
steps:
8069
- uses: actions/checkout@v4
@@ -96,16 +85,6 @@ jobs:
9685
if: github.event.pull_request.draft == false
9786

9887
runs-on: ubuntu-latest
99-
container:
100-
image: ghcr.io/lightpanda-io/zig-browsercore:0.12.1
101-
credentials:
102-
username: ${{ github.actor }}
103-
password: ${{ secrets.GITHUB_TOKEN }}
104-
105-
# docker blocks io_uring syscalls by default now.
106-
# see https://github.com/tigerbeetle/tigerbeetle/pull/1995
107-
# see https://github.com/moby/moby/pull/46762
108-
options: "--security-opt seccomp=unconfined"
10988

11089
steps:
11190
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)