v8 version 12.4 #35
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
name: build and publish v8 libs | |
on: [push] | |
env: | |
V8_VERSION: "12.4" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-linux: | |
# if: ${{ false }} # disable | |
name: linux | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [x64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: setup v8 build tools | |
run: | | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
gclient | |
fetch v8 | |
- name: fetch beta branch | |
run: | | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
cd $GITHUB_WORKSPACE/v8 | |
git checkout branch-heads/$V8_VERSION | |
gclient sync | |
mkdir -p out.gn/${{ matrix.platform }}.release/ | |
- name: Compress headers | |
run: | | |
tar -zcvf include.tar.gz v8/include | |
- name: Upload headers | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ github.workspace }}/include.tar.gz | |
name: include.tar.gz | |
- name: Compress source | |
run: | | |
tar -zcvf src.tar.gz v8/src | |
- name: Upload source | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ github.workspace }}/src.tar.gz | |
name: src.tar.gz | |
- name: build v8 static library | |
run: | | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
cp args.linux.${{ matrix.platform }}.gn $GITHUB_WORKSPACE/v8/out.gn/${{ matrix.platform }}.release/args.gn | |
cd $GITHUB_WORKSPACE/v8 | |
build/linux/sysroot_scripts/install-sysroot.py --arch=${{ matrix.platform }} | |
gn gen out.gn/${{ matrix.platform }}.release | |
ninja -j 4 v8_monolith -C out.gn/${{ matrix.platform }}.release/ | |
- name: Compress static library | |
run: | | |
gzip -9 -c ${{ github.workspace }}/v8/out.gn/${{ matrix.platform }}.release/obj/libv8_monolith.a > libv8_monolith-linux-${{ matrix.platform }}.a.gz | |
- name: Upload static library | |
uses: actions/upload-artifact@v3 | |
with: | |
path: libv8_monolith-linux-${{ matrix.platform }}.a.gz | |
name: libv8_monolith-linux-${{ matrix.platform }}.a.gz | |
- name: Compress generated source | |
run: | | |
tar -zcvf gen-linux-${{ matrix.platform }}.tar.gz v8/out.gn/${{ matrix.platform }}.release/gen | |
- name: Upload generated source | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ github.workspace }}/gen-linux-${{ matrix.platform }}.tar.gz | |
name: gen-linux-${{ matrix.platform }}.tar.gz | |
build-linux-arm: | |
# if: ${{ false }} # disable | |
name: linux-arm | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [x64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: setup v8 build tools | |
run: | | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
gclient | |
fetch v8 | |
- name: fetch beta branch | |
run: | | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
cd $GITHUB_WORKSPACE/v8 | |
git checkout branch-heads/$V8_VERSION | |
gclient sync | |
mkdir -p out.gn/arm64.release/ | |
- name: build v8 static library | |
run: | | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
cp args.linux.arm64.gn $GITHUB_WORKSPACE/v8/out.gn/arm64.release/args.gn | |
cd $GITHUB_WORKSPACE/v8 | |
build/linux/sysroot_scripts/install-sysroot.py --arch=arm64 | |
gn gen out.gn/arm64.release | |
ninja -j 4 v8_monolith -C out.gn/arm64.release/ | |
- name: Compress static library | |
run: | | |
gzip -9 -c ${{ github.workspace }}/v8/out.gn/arm64.release/obj/libv8_monolith.a > libv8_monolith-linux-arm64.a.gz | |
- name: Upload static library | |
uses: actions/upload-artifact@v3 | |
with: | |
path: libv8_monolith-linux-arm64.a.gz | |
name: libv8_monolith-linux-arm64.a.gz | |
- name: Compress generated source | |
run: | | |
tar -zcvf gen-linux-arm64.tar.gz v8/out.gn/arm64.release/gen | |
- name: Upload generated source | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ github.workspace }}/gen-linux-arm64.tar.gz | |
name: gen-linux-arm64.tar.gz | |
build-mac: | |
# if: ${{ false }} # disable | |
name: mac | |
runs-on: macos-12 | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [x64, arm64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: setup v8 build tools | |
run: | | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
gclient | |
fetch v8 | |
- name: fetch beta branch | |
run: | | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
cd $GITHUB_WORKSPACE/v8 | |
git checkout branch-heads/$V8_VERSION | |
gclient sync | |
mkdir -p out.gn/${{ matrix.platform }}.release/ | |
- name: build v8 static library | |
run: | | |
export PATH="$GITHUB_WORKSPACE/depot_tools:${PATH}" | |
cp args.mac.${{ matrix.platform }}.gn $GITHUB_WORKSPACE/v8/out.gn/${{ matrix.platform }}.release/args.gn | |
cd $GITHUB_WORKSPACE/v8 | |
gn gen out.gn/${{ matrix.platform }}.release | |
ninja -j 4 v8_monolith -C out.gn/${{ matrix.platform }}.release/ | |
- name: Compress static library | |
run: | | |
gzip -9 -c ${{ github.workspace }}/v8/out.gn/${{ matrix.platform }}.release/obj/libv8_monolith.a > libv8_monolith-mac-${{ matrix.platform }}.a.gz | |
- name: Upload static library | |
uses: actions/upload-artifact@v3 | |
with: | |
path: libv8_monolith-mac-${{ matrix.platform }}.a.gz | |
name: libv8_monolith-mac-${{ matrix.platform }}.a.gz | |
- name: Compress generated source | |
run: | | |
tar -zcvf gen-mac-${{ matrix.platform }}.tar.gz v8/out.gn/${{ matrix.platform }}.release/gen | |
- name: Upload generated source | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ github.workspace }}/gen-mac-${{ matrix.platform }}.tar.gz | |
name: gen-mac-${{ matrix.platform }}.tar.gz | |
build-windows: | |
# if: ${{ false }} # disable | |
name: windows | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [x64] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10 | |
- name: Install MSVC/MCBuild (Windows) | |
uses: microsoft/[email protected] | |
- name: setup v8 build tools | |
shell: pwsh | |
run: | | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
echo "$pwd/depot_tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "DEPOT_TOOLS_WIN_TOOLCHAIN=0" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: fetch v8 source | |
run: | | |
export DEPOT_TOOLS_WIN_TOOLCHAIN=0 | |
gclient | |
fetch v8 | |
cd v8 | |
git checkout branch-heads/$V8_VERSION | |
gclient sync | |
- name: build v8 static library | |
shell: pwsh | |
run: | | |
Set-Location -Path v8 | |
New-Item -ItemType directory -Path ./out.gn/${{ matrix.platform }}.release/ | |
Copy-Item "../args.win.${{ matrix.platform }}.gn" -Destination "./out.gn/${{ matrix.platform }}.release/args.gn" -force | |
gn gen out.gn/${{ matrix.platform }}.release | |
ninja -j 4 v8_monolith -C out.gn/${{ matrix.platform }}.release/ | |
- name: Compress static library | |
shell: pwsh | |
run: | | |
Compress-Archive -Path v8/out.gn/${{ matrix.platform }}.release/obj/v8_monolith.lib -Destination libv8_monolith-win-${{ matrix.platform }}.zip | |
- name: Upload static library | |
uses: actions/upload-artifact@v3 | |
with: | |
path: libv8_monolith-win-${{ matrix.platform }}.zip | |
name: libv8_monolith-win-${{ matrix.platform }}.zip | |
- name: Compress generated source | |
shell: pwsh | |
run: | | |
Compress-Archive -Path v8/out.gn/${{ matrix.platform }}.release/gen -Destination gen-win-${{ matrix.platform }}.zip | |
- name: Upload generated source | |
uses: actions/upload-artifact@v3 | |
with: | |
path: ${{ github.workspace }}/gen-win-${{ matrix.platform }}.zip | |
name: gen-win-${{ matrix.platform }}.zip |