-
Notifications
You must be signed in to change notification settings - Fork 53
78 lines (76 loc) · 2.62 KB
/
build-macos.yml
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
name: build-macos
on:
push:
paths-ignore:
- '**/README.md'
pull_request:
paths-ignore:
- '**/README.md'
jobs:
build-macos-platforms:
runs-on: macos-14
strategy:
matrix:
bundle: [1, 2, 3]
env:
TARGET: "osx"
BUNDLE: ${{ matrix.bundle }}
DEVELOPER_DIR: "/Applications/Xcode_15.2.app/Contents/Developer"
steps:
- name: Determine Release
id: vars
shell: bash
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "release=nightly" >> $GITHUB_ENV
echo "prerelease=false" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
echo "release=bleeding" >> $GITHUB_ENV
echo "prerelease=true" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
- name: Scripts Calc Formula - ${{ env.TARGET }} Bundle ${{ matrix.bundle }}
run: ./scripts/calculate_formulas.sh
- name: Scripts Install
run: ./scripts/osx/install.sh
- name: Build macOS x86_64
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: scripts/build.sh
env:
TARGET: "osx"
BUNDLE: ${{ matrix.bundle }}
ARCH: x86_64
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
- name: Build macOS arm64
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: scripts/build.sh
env:
TARGET: "osx"
BUNDLE: ${{ matrix.bundle }}
ARCH: arm64
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
- name: List output directory
run: ls -lah out/
- name: Merge our libaries into XC Framework
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: scripts/osx/xcframework_all.sh
env:
TARGET: "osx"
BUNDLE: ${{ matrix.bundle }}
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
- name: Package final
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: scripts/package.sh
env:
TARGET: "osx"
BUNDLE: ${{ matrix.bundle }}
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
- name: Update Release
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: johnwbyrd/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.release }}
release: ${{ env.release }}
prerelease: ${{ env.prerelease }}
files: out/openFrameworksLibs_${{ env.release }}_${{ env.TARGET }}_${{ matrix.bundle }}.tar.bz2