Split static graphics release workflows
This commit is contained in:
1 parent
cabf4363f2
commit
2fc99a5c09
7 files changed
+500
-205
No files matched your search
@@ -0,0 +1,74 @@
|
||||
name: static-graphics-macos
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
skiasharp_version:
|
||||
required: true
|
||||
type: string
|
||||
angle_branch:
|
||||
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
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- rid: osx-x64
|
||||
target_cpu: x64
|
||||
- rid: osx-arm64
|
||||
target_cpu: arm64
|
||||
runs-on: macos-15
|
||||
env:
|
||||
SKIASHARP_VERSION: ${{ inputs.skiasharp_version }}
|
||||
ANGLE_BRANCH: ${{ inputs.angle_branch }}
|
||||
RID: ${{ matrix.rid }}
|
||||
TARGET_CPU: ${{ matrix.target_cpu }}
|
||||
WORK_DIR: ${{ github.workspace }}/External/NativeStatic/.work
|
||||
OUTPUT_DIR: ${{ github.workspace }}/External/NativeStatic/${{ matrix.rid }}/native
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Restore native build cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: External/NativeStatic/.work
|
||||
key: native-work-macos-${{ matrix.rid }}-${{ inputs.skiasharp_version }}-${{ inputs.angle_branch }}-${{ hashFiles('External/NativeStatic/patches/*.patch', 'scripts/build-macos-static-graphics.sh') }}
|
||||
|
||||
- name: Install native build dependencies
|
||||
run: brew install ninja
|
||||
|
||||
- name: Install Xcode Metal toolchain
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cat > /tmp/staticlink-metal-check.metal <<'EOF'
|
||||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
kernel void staticlink_metal_check(device float* values [[buffer(0)]], uint id [[thread_position_in_grid]]) { values[id] = 0; }
|
||||
EOF
|
||||
if ! xcrun metal -c /tmp/staticlink-metal-check.metal -o /tmp/staticlink-metal-check.air >/dev/null 2>&1; then
|
||||
sudo xcodebuild -downloadComponent MetalToolchain
|
||||
fi
|
||||
xcrun metal -c /tmp/staticlink-metal-check.metal -o /tmp/staticlink-metal-check.air >/dev/null
|
||||
|
||||
- name: Build macOS static graphics libraries
|
||||
run: bash ./scripts/build-macos-static-graphics.sh all
|
||||
|
||||
- name: Upload macOS static archives
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: native-static-${{ matrix.rid }}
|
||||
path: External/NativeStatic/${{ matrix.rid }}/*
|
||||
if-no-files-found: error
|
||||
Reference in new issue
Block a user