-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab75644
commit f182615
Showing
4 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: wpt | ||
|
||
env: | ||
ARCH: x86_64-linux | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "src/**/*.zig" | ||
- "src/*.zig" | ||
pull_request: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
wpt: | ||
name: web platform tests | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/browsercore/zig-v8:0.11.0 | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_CI_PAT }} | ||
submodules: true | ||
|
||
- name: install v8 | ||
run: | | ||
mkdir -p vendor/v8/${{env.ARCH}}/debug | ||
ln -s /usr/local/lib/libc_v8.a vendor/v8/${{env.ARCH}}/debug/libc_v8.a | ||
mkdir -p vendor/v8/${{env.ARCH}}/release | ||
ln -s /usr/local/lib/libc_v8.a vendor/v8/${{env.ARCH}}/release/libc_v8.a | ||
- run: zig build wpt -Dengine=v8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: wpt | ||
|
||
env: | ||
ARCH: x86_64-linux | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "src/**/*.zig" | ||
- "src/*.zig" | ||
pull_request: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
wpt: | ||
name: web platform tests | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/browsercore/zig-v8:0.11.0 | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_CI_PAT }} | ||
submodules: true | ||
|
||
- name: install v8 | ||
run: | | ||
mkdir -p vendor/v8/${{env.ARCH}}/debug | ||
ln -s /usr/local/lib/libc_v8.a vendor/v8/${{env.ARCH}}/debug/libc_v8.a | ||
mkdir -p vendor/v8/${{env.ARCH}}/release | ||
ln -s /usr/local/lib/libc_v8.a vendor/v8/${{env.ARCH}}/release/libc_v8.a | ||
- run: make install-lexbor | ||
- run: make install-netsurf | ||
|
||
- run: zig build wpt -Dengine=v8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: zig-fmt | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
zig-fmt: | ||
name: zig fmt | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/browsercore/zig:0.11.0 | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
outputs: | ||
zig_fmt_errs: ${{ steps.fmt.outputs.zig_fmt_errs }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run zig fmt | ||
id: fmt | ||
run: | | ||
zig fmt --check ./*.zig ./**/*.zig 2> zig-fmt.err > zig-fmt.err2 || echo "Failed" | ||
delimiter="$(openssl rand -hex 8)" | ||
echo "zig_fmt_errs<<${delimiter}" >> "${GITHUB_OUTPUT}" | ||
if [ -s zig-fmt.err ]; then | ||
echo "// The following errors occurred:" >> "${GITHUB_OUTPUT}" | ||
cat zig-fmt.err >> "${GITHUB_OUTPUT}" | ||
fi | ||
if [ -s zig-fmt.err2 ]; then | ||
echo "// The following files were not formatted:" >> "${GITHUB_OUTPUT}" | ||
cat zig-fmt.err2 >> "${GITHUB_OUTPUT}" | ||
fi | ||
echo "${delimiter}" >> "${GITHUB_OUTPUT}" | ||
- name: Fail the job | ||
if: steps.fmt.outputs.zig_fmt_errs != '' | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: zig-test | ||
|
||
env: | ||
ARCH: x86_64-linux | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "src/**/*.zig" | ||
- "src/*.zig" | ||
pull_request: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
zig-test: | ||
name: zig test | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/browsercore/zig-v8:0.11.0 | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_CI_PAT }} | ||
submodules: true | ||
|
||
- name: install v8 | ||
run: | | ||
mkdir -p vendor/v8/${{env.ARCH}}/debug | ||
ln -s /usr/local/lib/libc_v8.a vendor/v8/${{env.ARCH}}/debug/libc_v8.a | ||
mkdir -p vendor/v8/${{env.ARCH}}/release | ||
ln -s /usr/local/lib/libc_v8.a vendor/v8/${{env.ARCH}}/release/libc_v8.a | ||
- run: make install-lexbor | ||
- run: make install-netsurf | ||
|
||
- run: zig build test -Dengine=v8 |