-
Notifications
You must be signed in to change notification settings - Fork 152
77 lines (64 loc) · 2.25 KB
/
build-macos.yml
File metadata and controls
77 lines (64 loc) · 2.25 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
name: Build macOS
on:
workflow_call:
inputs:
generator:
required: false
type: string
default: Xcode
enable-sanitizers:
required: false
type: boolean
default: false
xcode-version:
required: false
type: string
default: '16.4'
runs-on:
required: false
type: string
default: macos-latest
env:
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:symbolize=1
ASAN_OPTIONS: abort_on_error=1
jobs:
build:
runs-on: ${{ inputs.runs-on }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- name: Select Xcode ${{ inputs.xcode-version }}
run: sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer
- name: Generate macOS solution
run: |
cmake -G "${{ inputs.generator }}" -B build/macOS \
-D BABYLON_DEBUG_TRACE=ON \
-D ENABLE_SANITIZERS=${{ inputs.enable-sanitizers && 'ON' || 'OFF' }} \
-D BABYLON_NATIVE_TESTS_USE_NOOP_METAL_DEVICE=ON
- name: Build Playground macOS
run: cmake --build build/macOS --target Playground --config RelWithDebInfo
- name: Build UnitTests macOS
run: cmake --build build/macOS --target UnitTests --config RelWithDebInfo
- name: Build ModuleLoadTest macOS
run: cmake --build build/macOS --target ModuleLoadTest --config RelWithDebInfo
- name: Enable Core Dump
run: sudo sysctl -w kern.corefile=%N.core.%P
- name: Run UnitTests macOS
run: |
cd build/macOS/Apps/UnitTests/RelWithDebInfo
ulimit -c unlimited
./UnitTests
- name: Run ModuleLoadTest macOS
if: ${{ !inputs.enable-sanitizers }}
run: |
cd build/macOS/Apps/ModuleLoadTest/RelWithDebInfo
ulimit -c unlimited
./ModuleLoadTest
- name: Upload UnitTests Core Dumps
if: failure()
uses: actions/upload-artifact@v6
with:
name: macos-${{ inputs.generator }}${{ inputs.enable-sanitizers && '-sanitizer' || '' }}-core-dumps
path: |
build/macOS/Apps/UnitTests/RelWithDebInfo/UnitTests
build/macOS/Apps/UnitTests/RelWithDebInfo/*.core.*