Skip to content

build-release

build-release #28

Workflow file for this run

name: build-release
on:
push:
tags:
- "**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
env:
ZIG_VERSION: 0.15.1
V8_REVISION: 14.0.365.4
jobs:
# build-x86_64-linux:
# env:
# OS: linux
# ARCH: x86_64
# runs-on: ubuntu-22.04
# steps:
# - uses: mlugg/setup-zig@v2
# with:
# version: ${{ env.ZIG_VERSION }}
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 0
# - run: |
# sudo apt-get update
# sudo apt-get install -yq libglib2.0-dev
# - run: zig build get-v8
# - run: zig build -Doptimize=ReleaseSafe build-v8
# - run: mv v8/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
# - name: Upload the build
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
# build-aarch64-macos:
# env:
# OS: macos
# ARCH: aarch64
# runs-on: macos-latest
# steps:
# - uses: mlugg/setup-zig@v2
# with:
# version: ${{ env.ZIG_VERSION }}
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 0
# - run: zig build get-v8
# - run: zig build -Doptimize=ReleaseSafe build-v8
# - run: mv v8/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
# - name: Upload the build
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
# build-arm64-linux:
# env:
# OS: linux
# ARCH: aarch64
# runs-on: ubuntu-22.04-arm
# steps:
# - uses: mlugg/setup-zig@v2
# with:
# version: ${{ env.ZIG_VERSION }}
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 0
# - run: |
# sudo apt-get update
# sudo apt-get install -yq libglib2.0-dev lld
# wget https://apt.llvm.org/llvm.sh
# chmod +x llvm.sh
# sudo ./llvm.sh 21
# sudo ln -nsf /usr/lib/llvm-21/lib/clang/21/lib/linux/libclang_rt.builtins-aarch64.a /usr/lib/llvm-21/lib/clang/21/lib/linux/libclang_rt.builtins.a && \
# sudo ln -nsf /usr/lib/llvm-21/lib/clang/21/lib/linux/ /usr/lib/llvm-21/lib/clang/21/lib/aarch64-unknown-linux-gnu
# - run: zig build get-v8
# - run: zig build -Doptimize=ReleaseSafe build-v8
# - run: mv v8/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
# - name: Upload the build
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
# build-x86_64-macos:
# env:
# OS: macos
# ARCH: x86_64
# runs-on: macos-15-large
# steps:
# - uses: mlugg/setup-zig@v2
# with:
# version: ${{ env.ZIG_VERSION }}
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 0
# - run: zig build get-v8
# - run: zig build -Doptimize=ReleaseSafe build-v8
# - run: mv v8/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
# - name: Upload the build
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
# build-aarch64-ios:
# env:
# OS: ios
# ARCH: aarch64
# TARGET_ENVIRONMENT: simulator
# runs-on: macos-latest
# steps:
# - uses: mlugg/setup-zig@v2
# with:
# version: ${{ env.ZIG_VERSION }}
# - uses: actions/setup-python@v5
# with:
# python-version: '3.11'
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# fetch-depth: 0
# - run: OS=macos zig build get-v8 # We force the OS to macos here b/c ios is not supported by get-v8
# - run: zig build -Doptimize=ReleaseSafe build-v8
# - run: mv v8/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.TARGET_ENVIRONMENT }}_${{ env.ARCH }}.a
# - name: Upload the build
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
build-android:
env:
OS: android
ARCH: arm64
ANDROID_NDK_VERSION: r28
HOST_ARCH: x64
runs-on: ubuntu-22.04
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# - name: Setup Android SDK
# uses: android-actions/setup-android@v3
- uses: nttld/setup-ndk@v1
with:
ndk-version: ${{ env.ANDROID_NDK_VERSION }}
- uses: mlugg/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- run: OS=linux zig build get-v8 # We force the OS to macos here b/c ios is not supported by get-v8
- run: zig build -Doptimize=ReleaseSafe build-v8
- run: mv v8/out/${{ env.OS }}/release/obj/zig/libc_v8.a libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a
- name: Upload the build
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: libc_v8_${{ env.V8_REVISION }}_${{ env.OS }}_${{ env.ARCH }}.a