93 lines
3.1 KiB
YAML
93 lines
3.1 KiB
YAML
name: static-graphics-musl
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
skiasharp_version:
|
|
required: true
|
|
type: string
|
|
angle_branch:
|
|
required: true
|
|
type: string
|
|
dotnet_alpine_image:
|
|
required: true
|
|
type: string
|
|
workflow_dispatch:
|
|
inputs:
|
|
skiasharp_version:
|
|
required: true
|
|
default: "3.119.4"
|
|
type: string
|
|
angle_branch:
|
|
required: true
|
|
default: "7922"
|
|
type: string
|
|
dotnet_alpine_image:
|
|
required: true
|
|
default: mcr.microsoft.com/dotnet/sdk:10.0.302-alpine3.23
|
|
type: string
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- rid: linux-musl-x64
|
|
target_cpu: x64
|
|
runner: ubuntu-24.04
|
|
- rid: linux-musl-arm64
|
|
target_cpu: arm64
|
|
runner: ubuntu-24.04-arm
|
|
runs-on: ${{ matrix.runner }}
|
|
env:
|
|
SKIASHARP_VERSION: ${{ inputs.skiasharp_version }}
|
|
ANGLE_BRANCH: ${{ inputs.angle_branch }}
|
|
DOTNET_ALPINE_IMAGE: ${{ inputs.dotnet_alpine_image }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Restore native build cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: External/NativeStatic/.work
|
|
key: native-work-musl-${{ matrix.rid }}-${{ inputs.skiasharp_version }}-${{ inputs.angle_branch }}-${{ hashFiles('External/NativeStatic/patches/*.patch', 'scripts/build-linux-static-graphics.sh') }}
|
|
|
|
- name: Build Linux musl static graphics libraries
|
|
run: |
|
|
docker run --rm \
|
|
-v "$PWD:/workspace" \
|
|
-w /workspace \
|
|
-e RID="${{ matrix.rid }}" \
|
|
-e TARGET_CPU="${{ matrix.target_cpu }}" \
|
|
-e OUTPUT_DIR="/workspace/External/NativeStatic/${{ matrix.rid }}/native" \
|
|
-e SKIASHARP_VERSION="$SKIASHARP_VERSION" \
|
|
-e ANGLE_BRANCH="$ANGLE_BRANCH" \
|
|
-e LLVM_AR=llvm-ar \
|
|
-e DEPOT_TOOLS_BOOTSTRAP_PYTHON3=0 \
|
|
-e VPYTHON_BYPASS="manually managed python not supported by chrome operations" \
|
|
"$DOTNET_ALPINE_IMAGE" \
|
|
sh -lc '
|
|
set -e
|
|
apk add --no-cache bash ca-certificates git python3 py3-httplib2 py3-pysocks py3-six clang compiler-rt lld llvm g++ ninja pkgconf fontconfig-dev glib-dev mesa-dev libx11-dev libxcb-dev libxext-dev pciutils-dev linux-headers perl curl tar xz patch gcompat libc6-compat
|
|
python3 - <<'"'"'PY'"'"'
|
|
import pathlib
|
|
import httplib2
|
|
|
|
path = pathlib.Path(httplib2.__file__).with_name("socks.py")
|
|
if not path.exists():
|
|
path.write_text("from socks import *\n")
|
|
PY
|
|
bash scripts/build-linux-static-graphics.sh all
|
|
'
|
|
|
|
- name: Normalize native build cache ownership
|
|
run: sudo chown -R "$(id -u):$(id -g)" External/NativeStatic/.work
|
|
|
|
- name: Upload Linux musl static archives
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: native-static-${{ matrix.rid }}
|
|
path: External/NativeStatic/${{ matrix.rid }}/*
|
|
if-no-files-found: error
|