-
Notifications
You must be signed in to change notification settings - Fork 969
73 lines (62 loc) · 2.45 KB
/
Copy pathmacos-build.yml
File metadata and controls
73 lines (62 loc) · 2.45 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
name: 🍎 MacOS
on:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
macos-build:
name: "Universal"
runs-on: macos-26
timeout-minutes: 240
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Use Xcode 26.4
run: sudo xcode-select -s /Applications/Xcode_26.4.app
- name: Download Metal Toolchain
run: xcodebuild -downloadComponent MetalToolchain
- name: Download Dependencies
run: |
DEPS_VERSION=$(cat dep/PREBUILT-VERSION)
cd dep/prebuilt
curl --fail --retry 5 --retry-all-errors -LO "https://github.com/duckstation/dependencies/releases/download/$DEPS_VERSION/deps-macos-universal.tar.xz"
sha256sum --check --ignore-missing ../PREBUILT-SHA256SUMS
tar -xf "deps-macos-universal.tar.xz"
rm "deps-macos-universal.tar.xz"
- name: Download Patch Archives
shell: bash
run: |
cd data/resources
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/cheats.zip"
curl --retry 5 --retry-all-errors -LO "https://github.com/duckstation/chtdb/releases/download/latest/patches.zip"
- name: Tag as Preview Release
if: github.ref == 'refs/heads/master'
run: |
echo '#pragma once' > src/scmversion/tag.h
echo '#define UPDATER_RELEASE_CHANNEL "preview"' >> src/scmversion/tag.h
echo '#define UPDATER_RELEASE_IS_OFFICIAL 1' >> src/scmversion/tag.h
- name: Tag as Stable Release
if: github.ref == 'refs/heads/dev'
run: |
echo '#pragma once' > src/scmversion/tag.h
echo '#define UPDATER_RELEASE_CHANNEL "latest"' >> src/scmversion/tag.h
echo '#define UPDATER_RELEASE_IS_OFFICIAL 1' >> src/scmversion/tag.h
- name: Compile and Zip .app
shell: bash
run: |
mkdir build
cd build
export MACOSX_DEPLOYMENT_TARGET=13.3
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_BUILD_TYPE=Release -DBUILD_MACOS_BUNDLE=ON -DENABLE_OPENGL=OFF -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -G Ninja ..
cmake --build . --parallel
mv bin/DuckStation.app .
codesign -s - --deep -f -v DuckStation.app
zip -9 -r duckstation-mac-release.zip DuckStation.app/
- name: Upload MacOS .app
uses: actions/upload-artifact@v7
with:
path: "build/duckstation-mac-release.zip"
archive: false
if-no-files-found: error