-
Notifications
You must be signed in to change notification settings - Fork 2
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
e7fd4b1
commit 512c5a9
Showing
4 changed files
with
78 additions
and
79 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,61 @@ | ||
name: "V8 install" | ||
description: "Install deps for the project" | ||
|
||
inputs: | ||
zig: | ||
description: 'Zig version to install' | ||
required: false | ||
default: '0.12.1' | ||
arch: | ||
description: 'CPU arch used to select the v8 lib' | ||
required: false | ||
default: 'x86_64' | ||
os: | ||
description: 'OS used to select the v8 lib' | ||
required: false | ||
default: 'linux' | ||
zig-v8: | ||
description: 'zig v8 version to install' | ||
required: false | ||
default: 'v0.1.5' | ||
v8: | ||
description: 'v8 version to install' | ||
required: false | ||
default: '11.1.134' | ||
cache-dir: | ||
description: 'cache dir to use' | ||
required: false | ||
default: '~/.cache' | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- uses: mlugg/setup-zig@v1 | ||
with: | ||
version: ${{ inputs.zig }} | ||
|
||
- name: Cache v8 | ||
id: cache-v8 | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-v8 | ||
with: | ||
path: ${{ inputs.cache-dir }}/v8 | ||
key: libc_v8_${{ inputs.v8 }}_${{ inputs.os }}_${{ inputs.arch }}.a | ||
|
||
- if: ${{ steps.cache-v8.outputs.cache-hit != 'true' }} | ||
shell: bash | ||
run: | | ||
mkdir -p ${{ inputs.cache-dir }}/v8 | ||
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 | ||
- name: install v8 | ||
shell: bash | ||
run: | | ||
mkdir -p vendor/v8/${{inputs.arch}}-${{inputs.os}}/debug | ||
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a vendor/v8/${{inputs.arch}}-${{inputs.os}}/debug/libc_v8.a | ||
mkdir -p vendor/v8/${{inputs.arch}}-${{inputs.os}}/release | ||
ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a vendor/v8/${{inputs.arch}}-${{inputs.os}}/release/libc_v8.a |
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
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
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