-
Notifications
You must be signed in to change notification settings - Fork 90
148 lines (130 loc) · 4.75 KB
/
Copy pathapple.yml
File metadata and controls
148 lines (130 loc) · 4.75 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Apple Framework CI
on:
push:
branches:
- main
- dev
tags: ['*']
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/workflows/apple.yml'
- '.github/workflows/apple-release.yml'
pull_request:
workflow_dispatch:
inputs:
cmakeextra:
description: 'Extra CMake options'
required: false
default: ''
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {name: "macOS-latest", os: "macOS-latest", platform: "macos", cmake_extra: "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DLSL_UNITTESTS=ON -DLSL_BENCHMARKS=ON -DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"" }
- {name: "iOS", os: "macOS-latest", platform: "ios", cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=OS64" }
- {name: "iOS Simulator", os: "macOS-latest", platform: "ios-simulator", cmake_extra: "-DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake -DPLATFORM=SIMULATOR64COMBINED -G Xcode" }
steps:
- uses: actions/checkout@v4
with:
# Need full history + tags so the version can be derived from the git tag
fetch-depth: 0
# These are validation artifacts, not signed distribution builds. With signing
# disabled, Xcode needs neither certificates nor an APPLE_DEVELOPMENT_TEAM.
- name: Configure CMake
run: |
cmake --version
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${PWD}/install" \
-DCPACK_PACKAGE_DIRECTORY="${PWD}/package" \
-DLSL_FRAMEWORK=ON \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO \
-Dlslgitrevision=${{ github.sha }} \
-Dlslgitbranch=${{ github.ref }} \
${{ matrix.config.cmake_extra }} \
${{ github.event.inputs.cmakeextra }}
pwd
- name: make
run: cmake --build build --config Release -j
- name: make install
run: cmake --build build --config Release --target install
- name: test install using examples
if: matrix.config.name == 'macOS-latest'
run: |
# Test that the in-tree install was successful by building the examples
cmake -S examples -B examples/build \
-DLSL_INSTALL_ROOT="${PWD}/install" \
-DCMAKE_INSTALL_PREFIX=examples/build/install \
-DLSL_COMFY_DEFAULTS=ON \
${{ matrix.config.cmake_extra }} \
${{ github.event.inputs.cmakeextra }}
cmake --build examples/build --target install --config Release -j
./examples/build/install/bin/HandleMetaData
# run internal tests
- name: unit tests
if: matrix.config.name == 'macOS-latest'
run: |
mkdir -p dumps
install/bin/lsl_test_internal --order rand --wait-for-keypress never --durations yes
install/bin/lsl_test_exported --order rand --wait-for-keypress never --durations yes
timeout-minutes: 10
- name: upload dump
if: failure()
uses: actions/upload-artifact@v4
with:
name: dumps-${{ matrix.config.name }}
path: dumps
- name: Zip LSL Framework
run: |
cd install/Frameworks
zip -ry lsl.framework.zip lsl.framework
cd ../..
- name: Upload unsigned framework
uses: actions/upload-artifact@v4
with:
name: unsigned-${{ matrix.config.platform }}
path: install/Frameworks/lsl.framework.zip
if-no-files-found: error
xcframework:
name: Unsigned XCFramework
needs: build
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: unsigned-*
path: frameworks
- name: Unzip frameworks
run: |
for platform in macos ios ios-simulator; do
unzip "frameworks/unsigned-$platform/lsl.framework.zip" -d "frameworks/$platform"
done
- name: Create unsigned XCFramework
run: |
./scripts/apple_create_xcframework.sh \
--macos frameworks/macos/lsl.framework \
--ios frameworks/ios/lsl.framework \
--ios-simulator frameworks/ios-simulator/lsl.framework \
--skip-signing \
--output package
- uses: actions/upload-artifact@v4
with:
name: unsigned-xcframework
path: package/lsl.xcframework.*.zip
if-no-files-found: error