-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (50 loc) · 1.43 KB
/
zig-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
# Configure git:
# * use ssh to clone repo instead of https
# * set up the git safe directory
- name: configure git
run: |
git config --global [email protected]:.insteadof https://github.com/
git config --global --add safe.directory `pwd`
- name: configure ssh agent
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.SSH_DEPLOY_KEY }}'
- name: install git submodules
run: |
git submodule init
git submodule update
- 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 test -Dengine=v8