Skip to content

Refacto Env JS execution and result #239

Refacto Env JS execution and result

Refacto Env JS execution and result #239

Workflow file for this run

name: zig-test
env:
ARCH: x86_64-linux
on:
push:
branches:
- main
paths:
- "src/**/*.zig"
- "src/*.zig"
- "*.zig"
- ".github/**"
pull_request:
# By default GH trigger on types opened, synchronize and reopened.
# see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
# Since we skip the job when the PR is in draft state, we want to force CI
# running when the PR is marked ready_for_review w/o other change.
# see https://github.com/orgs/community/discussions/25722#discussioncomment-3248917
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
paths:
- "src/**/*.zig"
- "src/*.zig"
- "*.zig"
- ".github/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
zig-build-dev:
name: zig build dev
# Don't run the CI with draft PR.
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: ghcr.io/lightpanda-io/zig-v8:0.12.1
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
- name: zig build debug
run: zig build -Dengine=v8
zig-build-release:
name: zig build release
# Don't run the CI with draft PR.
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: ghcr.io/lightpanda-io/zig-v8:0.12.1
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
- name: zig build release
run: zig build -Doptimize=ReleaseSafe -Dengine=v8
zig-test:
name: zig test
# Don't run the CI with draft PR.
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: ghcr.io/lightpanda-io/zig-v8:0.12.1
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# docker blocks io_uring syscalls by default now.
# see https://github.com/tigerbeetle/tigerbeetle/pull/1995
# see https://github.com/moby/moby/pull/46762
options: "--security-opt seccomp=unconfined"
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
- name: zig build test
run: zig build test -Dengine=v8