Skip to content

Commit

Permalink
Adds android GitHub build actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
tommie committed Dec 23, 2023
1 parent 76aa1a3 commit 5824aa4
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/v8build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ on: workflow_dispatch

jobs:
build:
name: Build V8 for ${{ matrix.platform }} ${{ matrix.arch }}
name: Build V8 for ${{ matrix.os }} ${{ matrix.arch }}
strategy:
fail-fast: false
matrix:
# We use macos-11 over macos-latest because macos-latest defaults to Catalina(10.15) and not Big Sur(11.0)
# We can switch to macos-latest whenever Big Sur becomes the default
# See https://github.com/actions/virtual-environments#available-environments
#
# We need xcode 12.4 or newer to cross compile between arm64/amd64
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md#xcode
platform: [ubuntu-22.04, macos-11]
os: [android, darwin, linux]
arch: [x86_64, arm64]
include:
- os: android
platform: ubuntu-latest
- os: linux
platform: ubuntu-latest
- os: darwin
platform: macos-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout
Expand All @@ -27,19 +28,19 @@ jobs:
run: cd deps/depot_tools && git config --unset-all remote.origin.fetch; git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
shell: bash
- name: Install g++-aarch64-linux-gnu
if: matrix.platform == 'ubuntu-22.04' && matrix.arch == 'arm64'
if: matrix.os == 'linux' && matrix.arch == 'arm64'
run: sudo apt update && sudo apt install g++-aarch64-linux-gnu -y
- name: Build V8 linux
if: matrix.platform == 'ubuntu-22.04'
run: cd deps && ./build.py --no-clang --arch ${{ matrix.arch }}
- name: Build V8 macOS
if: matrix.platform == 'macos-11'
run: cd deps && ./build.py --arch ${{ matrix.arch }}
- name: Build V8 (${{ matrix.os }})
if: matrix.os == 'linux'
run: cd deps && ./build.py --no-clang --arch ${{ matrix.arch }} --os ${{ matrix.os }}
- name: Build V8 (${{ matrix.os }})
if: matrix.os == 'darwin' || matrix.os == 'android'
run: cd deps && ./build.py --arch ${{ matrix.arch }} --os ${{ matrix.os }}
- name: Create PR
uses: peter-evans/create-pull-request@v3
with:
commit-message: Update V8 static library for ${{ matrix.platform }} ${{ matrix.arch }}
commit-message: Update V8 static library for ${{ matrix.os }} ${{ matrix.arch }}
branch-suffix: random
delete-branch: true
title: V8 static library for ${{ matrix.platform }} ${{ matrix.arch }}
body: Auto-generated pull request to build V8 for ${{ matrix.platform }} ${{ matrix.arch }}
title: V8 static library for ${{ matrix.os }} ${{ matrix.arch }}
body: Auto-generated pull request to build V8 for ${{ matrix.os }} ${{ matrix.arch }}

0 comments on commit 5824aa4

Please sign in to comment.