Skip to content

build v8

build v8 #175

Workflow file for this run

name: build v8
on:
workflow_dispatch:
inputs:
tag_date:
description: 'tag date'
type: string
default: ""
required: false
v8_revision:
description: 'V8 TAG(Branch) to build'
type: choice
options:
- "9.4.146.24"
- "10.6.194"
- "11.8.172"
default: '9.4.146.24'
required: true
wrap_new:
description: 'wrap new/delete'
type: choice
options:
- "with_new_wrap"
- ""
default: ""
required: false
build_android:
description: 'Build for Android platform'
type: boolean
default: true
required: false
build_ohos:
description: 'Build for OHOS platform'
type: boolean
default: true
required: false
build_ios:
description: 'Build for iOS platform'
type: boolean
default: true
required: false
build_windows:
description: 'Build for Windows platform'
type: boolean
default: true
required: false
build_macos:
description: 'Build for MacOS platform'
type: boolean
default: true
required: false
build_macos_silicon:
description: 'Build for MacOS(silicon) platform'
type: boolean
default: true
required: false
build_linux:
description: 'Build for Linux platform'
type: boolean
default: true
required: false
jobs:
build_android_arm_v8:
if: github.event.inputs.build_android == 'true'
name: Android (arm64-v8a)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
npm i
bash ./android_armv8.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_android_arm_v7:
if: github.event.inputs.build_android == 'true'
name: Android (armeabi-v7a)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
npm i
bash ./android_armv7.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_android_x86_64:
if: github.event.inputs.build_android == 'true'
name: Android (x86_64)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
npm i
bash ./android_x64.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_ohos_arm_v8:
if: github.event.inputs.v8_revision != '8.4.371.19' && github.event.inputs.build_ohos == 'true'
name: OHOS (arm64-v8a)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install NDK
run: |
cd ~
curl -O https://repo.huaweicloud.com/harmonyos/os/4.1-Release/ohos-sdk-windows_linux-public.tar.gz
tar xvfz ohos-sdk-windows_linux-public.tar.gz
rm ohos-sdk-windows_linux-public.tar.gz
rm -rf ohos-sdk/windows
cd ohos-sdk/linux
unzip -o -d ./ native-linux-x64-4.1.7.5-Release.zip
rm *.zip
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
npm i
OHOS_NDK_HOME=~/ohos-sdk/linux/native bash ./ohos_armv8.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_ohos_arm_v7:
if: github.event.inputs.v8_revision != '8.4.371.19' && github.event.inputs.build_ohos == 'true'
name: OHOS (armeabi-v7a)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install NDK
run: |
cd ~
curl -O https://repo.huaweicloud.com/harmonyos/os/4.1-Release/ohos-sdk-windows_linux-public.tar.gz
tar xvfz ohos-sdk-windows_linux-public.tar.gz
rm ohos-sdk-windows_linux-public.tar.gz
rm -rf ohos-sdk/windows
cd ohos-sdk/linux
unzip -o -d ./ native-linux-x64-4.1.7.5-Release.zip
rm *.zip
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
npm i
OHOS_NDK_HOME=~/ohos-sdk/linux/native bash ./ohos_armv7.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
# build_ohos_x86_64:
# if: github.event.inputs.v8_revision != '8.4.371.19' && github.event.inputs.build_ohos == 'true'
# name: OHOS (x86_64)
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - name: Install NDK
# run: |
# cd ~
# curl -O https://repo.huaweicloud.com/harmonyos/os/4.1-Release/ohos-sdk-windows_linux-public.tar.gz
# tar xvfz ohos-sdk-windows_linux-public.tar.gz
# rm ohos-sdk-windows_linux-public.tar.gz
# rm -rf ohos-sdk/windows
# cd ohos-sdk/linux
# unzip -o -d ./ native-linux-x64-4.1.7.5-Release.zip
# rm *.zip
# - name: Run build script
# run: |
# cd $GITHUB_WORKSPACE
# npm i
# OHOS_NDK_HOME=~/ohos-sdk/linux/native bash ./ohos_x64.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
# mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
# - uses: actions/upload-artifact@v2
# with:
# name: v8_bin
# path: ~/v8/v8/output/**/*
build_linux:
if: github.event.inputs.build_linux == 'true'
name: Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
npm i
bash ./linux.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_linux_arm64:
if: github.event.inputs.build_linux == 'true'
name: Linux_arm64
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run build script
run: |
cd $GITHUB_WORKSPACE
npm i
bash ./linux_arm64.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_windows:
if: github.event.inputs.build_windows == 'true'
name: Windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: install llvm
if: ${{ github.event.inputs.wrap_new == 'true' }}
shell: pwsh
run: choco install llvm
- uses: ilammy/msvc-dev-cmd@v1
- name: Run build script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call npm i
call .\windows_64.cmd ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
- name: Rename
shell: bash
run: |
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_windows_md:
if: github.event.inputs.build_windows == 'true'
name: Windows-MD
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: install llvm
if: ${{ github.event.inputs.wrap_new == 'true' }}
shell: pwsh
run: choco install llvm
- uses: ilammy/msvc-dev-cmd@v1
- name: Run build script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call npm i
call .\windows_64MD.cmd ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
- name: Rename
shell: bash
run: |
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_windows_md_dll:
if: github.event.inputs.build_windows == 'true'
name: Windows-MD-DLL
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1
- name: Run build script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call npm i
call .\windows_64MD_DLL_94.cmd ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
- name: Rename
shell: bash
run: |
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_windows_32:
if: github.event.inputs.build_windows == 'true'
name: Windows-32
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: install llvm
if: ${{ github.event.inputs.wrap_new == 'true' }}
shell: pwsh
run: choco install llvm
- uses: ilammy/msvc-dev-cmd@v1
- name: Run build script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call npm i
call .\windows_32.cmd ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
- name: Rename
shell: bash
run: |
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_windows_v8cc_arm64:
if: github.event.inputs.build_windows == 'true'
name: Windows-v8cc-arm64
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Run build script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call npm i
call .\windows_v8cc_arm64.cmd ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
- name: Rename
shell: bash
run: |
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_windows_v8cc_arm:
if: github.event.inputs.build_windows == 'true'
name: Windows-v8cc-arm
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Run build script
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
call npm i
call .\windows_v8cc_arm.cmd ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
- name: Rename
shell: bash
run: |
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_macos:
if: github.event.inputs.build_macos == 'true'
name: macOS
runs-on: macos-12
steps:
- name: use python3.9
run: |
brew install [email protected]
pip install virtualenv
- uses: actions/checkout@v2
- name: Run build script
run: |
export PATH=/usr/local/opt/[email protected]/libexec/bin:$PATH
cd $GITHUB_WORKSPACE
npm i
bash ./macos.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_macos_arm64:
if: github.event.inputs.build_macos == 'true' && github.event.inputs.build_macos_silicon == 'true'
name: macOS with apple m1
runs-on: macos-12
steps:
- name: use python3.9
run: |
brew install [email protected]
pip install virtualenv
- uses: actions/checkout@v2
- name: Run build script
run: |
export PATH=/usr/local/opt/[email protected]/libexec/bin:$PATH
cd $GITHUB_WORKSPACE
npm i
bash ./macos_arm64.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_macos_dll:
if: github.event.inputs.build_macos == 'true'
name: macOS-DLL
runs-on: macos-12
steps:
- name: use python3.9
run: |
brew install [email protected]
pip install virtualenv
- uses: actions/checkout@v2
- name: Run build script
run: |
export PATH=/usr/local/opt/[email protected]/libexec/bin:$PATH
cd $GITHUB_WORKSPACE
npm i
bash ./macos_DLL.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_macos_arm64_dll:
if: github.event.inputs.build_macos == 'true' && github.event.inputs.build_macos_silicon == 'true'
name: macOS-DLL with apple m1
runs-on: macos-12
steps:
- name: use python3.9
run: |
brew install [email protected]
pip install virtualenv
- uses: actions/checkout@v2
- name: Run build script
run: |
export PATH=/usr/local/opt/[email protected]/libexec/bin:$PATH
cd $GITHUB_WORKSPACE
npm i
bash ./macos_arm64_DLL.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_ios:
if: github.event.inputs.build_ios == 'true'
name: iOS
runs-on: macos-12
steps:
- name: use python3.9
run: |
brew install [email protected]
pip install virtualenv
- uses: actions/checkout@v2
- name: Run build script
run: |
export PATH=/usr/local/opt/[email protected]/libexec/bin:$PATH
cd $GITHUB_WORKSPACE
npm i
bash ./ios.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
build_ios_simulator:
if: github.event.inputs.build_ios == 'true'
name: iOS simulator
runs-on: macos-12
steps:
- name: use python3.9
run: |
brew install [email protected]
pip install virtualenv
- uses: actions/checkout@v2
- name: Run build script
run: |
export PATH=/usr/local/opt/[email protected]/libexec/bin:$PATH
cd $GITHUB_WORKSPACE
npm i
bash ./ios_simulator.sh ${{github.event.inputs.v8_revision}} ${{github.event.inputs.wrap_new}}
mv ~/v8/v8/output/v8 ~/v8/v8/output/v8_${{github.event.inputs.v8_revision}}
- uses: actions/upload-artifact@v2
with:
name: v8_bin
path: ~/v8/v8/output/**/*
publish_with_ohos:
if: github.event.inputs.tag_date != '' && github.event.inputs.build_ohos == 'true'
runs-on: ubuntu-20.04
needs: [build_android_arm_v8,build_android_arm_v7,build_android_x86_64,build_linux,build_linux_arm64,build_windows,build_windows_32,build_windows_md,build_macos_arm64,build_macos_arm64_dll,build_ios_simulator,build_macos,build_ios,build_windows_md_dll,build_macos_dll,build_ohos_arm_v8,build_ohos_arm_v7,build_windows_v8cc_arm64,build_windows_v8cc_arm]
steps:
- uses: actions/download-artifact@v1
with:
name: v8_bin
path: v8_bin/
- name: Create Release Asset
run: |
cd v8_bin/ && tar cvfz ../v8_bin_${{github.event.inputs.v8_revision}}.tgz v8_${{github.event.inputs.v8_revision}} && cd -
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: V8_${{github.event.inputs.v8_revision}}_${{github.event.inputs.wrap_new}}_${{ github.event.inputs.tag_date }}
release_name: V8_${{github.event.inputs.v8_revision}}_${{github.event.inputs.wrap_new}}_${{ github.event.inputs.tag_date }}
draft: false
prerelease: false
- name: Upload V8
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./v8_bin_${{github.event.inputs.v8_revision}}.tgz
asset_name: v8_bin_${{github.event.inputs.v8_revision}}.tgz
asset_content_type: application/tgz
publish_without_ohos:
if: github.event.inputs.tag_date != '' && github.event.inputs.build_ohos == 'false'
runs-on: ubuntu-20.04
needs: [build_android_arm_v8,build_android_arm_v7,build_android_x86_64,build_linux,build_linux_arm64,build_windows,build_windows_32,build_windows_md,build_macos_arm64,build_macos_arm64_dll,build_ios_simulator,build_macos,build_ios,build_windows_md_dll,build_macos_dll,build_windows_v8cc_arm64,build_windows_v8cc_arm]
steps:
- uses: actions/download-artifact@v1
with:
name: v8_bin
path: v8_bin/
- name: Create Release Asset
run: |
cd v8_bin/ && tar cvfz ../v8_bin_${{github.event.inputs.v8_revision}}.tgz v8_${{github.event.inputs.v8_revision}} && cd -
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: V8_${{github.event.inputs.v8_revision}}_${{github.event.inputs.wrap_new}}_${{ github.event.inputs.tag_date }}
release_name: V8_${{github.event.inputs.v8_revision}}_${{github.event.inputs.wrap_new}}_${{ github.event.inputs.tag_date }}
draft: false
prerelease: false
- name: Upload V8
#id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./v8_bin_${{github.event.inputs.v8_revision}}.tgz
asset_name: v8_bin_${{github.event.inputs.v8_revision}}.tgz
asset_content_type: application/tgz