-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (82 loc) · 3.88 KB
/
Copy pathrelease.yml
File metadata and controls
98 lines (82 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Release
on:
push:
tags: [ "v*.*.*" ]
permissions:
contents: write
env:
# Objectively is a source dependency (resolved via ObjectivelyGPU.xcworkspace).
# Override to point a GPU release/branch at a specific Objectively ref.
# SDL3 / curl versions live in fetch-sdl3.sh / build-libcurl.sh, not here.
OBJECTIVELY_REF: "main"
jobs:
release-xcframework:
runs-on: macos-14
steps:
# Objectively's Xcode "Configure" build phase runs autoreconf/configure when
# built from source (i.e. whenever Config.h isn't already present); the
# macOS runner image doesn't ship autotools by default. configure.ac
# hard-requires check (via pkg-config) even though release builds don't run
# the test suite.
- name: Install autotools
run: brew install autoconf automake libtool pkg-config check
- name: Checkout Objectively
uses: actions/checkout@v6
with:
repository: jdolan/Objectively
ref: ${{ env.OBJECTIVELY_REF }}
path: Objectively
- name: Checkout ObjectivelyGPU
uses: actions/checkout@v6
with:
path: ObjectivelyGPU
# curl ships no prebuilt xcframework; build it so the iOS slices have curl
# headers for the Objectively source dependency. macOS uses system curl.
- name: Build libcurl.xcframework
working-directory: Objectively
run: bash ./Frameworks/build-libcurl.sh
- name: Fetch SDL3.xcframework
working-directory: ObjectivelyGPU
run: ./Frameworks/fetch-sdl3.sh
# Archive the framework target (single source of truth — no duplicated file
# list) per platform, then combine. iOS compiles the Objectively dep from
# source, so feed curl's headers with an additive -I.
- name: Build ObjectivelyGPU.xcframework
working-directory: ObjectivelyGPU
run: |
set -euo pipefail
rm -rf build
curl_ios="$GITHUB_WORKSPACE/Objectively/Frameworks/libcurl.xcframework/ios-arm64/Headers"
curl_sim="$GITHUB_WORKSPACE/Objectively/Frameworks/libcurl.xcframework/ios-arm64_x86_64-simulator/Headers"
xcodebuild archive -workspace ObjectivelyGPU.xcworkspace -scheme ObjectivelyGPU \
-destination "generic/platform=macOS" -archivePath build/macOS \
SKIP_INSTALL=NO CODE_SIGNING_ALLOWED=NO
xcodebuild archive -workspace ObjectivelyGPU.xcworkspace -scheme ObjectivelyGPU \
-destination "generic/platform=iOS" -archivePath build/iOS \
SKIP_INSTALL=NO CODE_SIGNING_ALLOWED=NO \
OTHER_CFLAGS="\$(inherited) -I$curl_ios"
xcodebuild archive -workspace ObjectivelyGPU.xcworkspace -scheme ObjectivelyGPU \
-destination "generic/platform=iOS Simulator" -archivePath build/iOS_Simulator \
SKIP_INSTALL=NO CODE_SIGNING_ALLOWED=NO \
OTHER_CFLAGS="\$(inherited) -I$curl_sim"
xcodebuild -create-xcframework \
-framework build/macOS.xcarchive/Products/Library/Frameworks/ObjectivelyGPU.framework \
-framework build/iOS.xcarchive/Products/Library/Frameworks/ObjectivelyGPU.framework \
-framework build/iOS_Simulator.xcarchive/Products/Library/Frameworks/ObjectivelyGPU.framework \
-output Frameworks/ObjectivelyGPU.xcframework
- name: Zip xcframeworks
working-directory: ObjectivelyGPU/Frameworks
run: |
zip -r "$GITHUB_WORKSPACE/SDL3.xcframework.zip" SDL3.xcframework
zip -r "$GITHUB_WORKSPACE/ObjectivelyGPU.xcframework.zip" ObjectivelyGPU.xcframework
- name: Create release
working-directory: ObjectivelyGPU
run: |
gh release delete ${{ github.ref_name }} --yes || true
gh release create ${{ github.ref_name }} \
--title "ObjectivelyGPU ${{ github.ref_name }}" \
--generate-notes \
"$GITHUB_WORKSPACE/SDL3.xcframework.zip" \
"$GITHUB_WORKSPACE/ObjectivelyGPU.xcframework.zip"
env:
GH_TOKEN: ${{ github.token }}