This repository was archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
160 lines (141 loc) · 5.47 KB
/
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
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
149
150
151
152
153
154
155
156
157
158
159
160
name: MacOS
on:
workflow_dispatch:
push:
branches:
- "master"
paths-ignore:
- "**/README.md"
pull_request:
branches:
- "*"
paths-ignore:
- "**/README.md"
schedule:
- cron: "0 12 * * *"
env:
BASE_BRANCH: master
SCONS_CACHE_LIMIT: 7168
jobs:
macos-templates:
runs-on: "macos-latest"
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: macOS Editor
cache-name: macos-editor-sp
editor: true
- name: macOS Template
cache-name: macos-template-sp
template: true
steps:
- name: Checkout Godot
uses: actions/checkout@v3
with:
repository: WeaselGames/godot
ref: 2109b77eed825a6b6325d9f45e9c75b900f65719
- name: Checkout LuaAPI
uses: actions/checkout@v3
with:
repository: WeaselGames/godot_luaAPI
ref: main
submodules: recursive
path: modules/luaAPI
- name: Checkout Voxel
uses: actions/checkout@v3
with:
repository: Zylann/godot_voxel
ref: master
path: modules/voxel
- name: Checkout GodotSteam
uses: actions/checkout@v3
with:
repository: Gramps/GodotSteam
ref: godot4
path: modules/godotsteam
- name: Delete SDK Folder
run: |
rm -rf modules/godotsteam/sdk
- name: Checkout SteamWorks SDK
uses: actions/checkout@v3
with:
lfs: "true"
repository: ${{ secrets.steamworks_sdk_repo }}
ref: master
token: ${{ secrets.steamworks_sdk_repo_token }}
path: modules/godotsteam/sdk
- name: Setup Vulkan SDK
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh
- name: Load .scons_cache directory
uses: actions/cache@v2
with:
path: ${{github.workspace}}/.scons_cache/
key: ${{matrix.cache-name}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{matrix.cache-name}}-${{env.BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{matrix.cache-name}}-${{env.BASE_BRANCH}}-${{github.ref}}
${{matrix.cache-name}}-${{env.BASE_BRANCH}}
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: "3.x"
architecture: "x64"
- name: Configuring Python packages
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
python --version
scons --version
- name: Compilation (editor)
if: ${{ matrix.editor }}
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
BUILD_NAME: "SP"
run: |
scons platform=macos arch=x86_64 target=editor
scons platform=macos arch=arm64 target=editor
- name: Compilation (template)
if: ${{ matrix.template }}
env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
BUILD_NAME: "SP"
run: |
scons platform=macos arch=x86_64 target=template_debug
scons platform=macos arch=arm64 target=template_debug
scons platform=macos arch=x86_64 target=template_release
scons platform=macos arch=arm64 target=template_release
- name: Bundle architectures and pack (editor)
if: ${{ matrix.editor }}
run: |
lipo -create bin/godot.macos.editor.x86_64 bin/godot.macos.editor.arm64 -output bin/godot.macos.editor.universal
strip bin/godot.macos.editor.universal
mkdir app
cp -r misc/dist/macos_tools.app app/GodotSP.app
mkdir -p app/GodotSP.app/Contents/MacOS
cp bin/godot.macos.editor.universal app/GodotSP.app/Contents/MacOS/godot.macos.editor.universal
chmod +x app/GodotSP.app/Contents/MacOS/godot.macos.editor.universal
cp modules/godotsteam/sdk/redistributable_bin/osx/libsteam_api.dylib app/GodotSP.app/Contents/MacOS/libsteam_api.dylib
echo "480" > app/GodotSP.app/Contents/MacOS/steam_appid.txt
- name: Bundle architectures and pack (template)
if: ${{ matrix.template }}
run: |
lipo -create bin/godot.macos.template_debug.x86_64 bin/godot.macos.template_debug.arm64 -output bin/godot.macos.template_debug.universal
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
strip bin/godot.*
mkdir app
cp -r misc/dist/macos_template.app app/macos_template.app
mkdir -p app/macos_template.app/Contents/MacOS
cp bin/godot.macos.template_debug.universal app/macos_template.app/Contents/MacOS/godot.macos.template_debug.universal
cp bin/godot.macos.template_release.universal app/macos_template.app/Contents/MacOS/godot.macos.template_release.universal
chmod +x app/macos_template.app/Contents/MacOS/godot.macos.template_debug.universal
chmod +x app/macos_template.app/Contents/MacOS/godot.macos.template_release.universal
cp modules/godotsteam/sdk/redistributable_bin/osx/libsteam_api.dylib app/macos_template.app/Contents/MacOS/libsteam_api.dylib
echo "480" > app/macos_template.app/Contents/MacOS/steam_appid.txt
- name: Prepare artifact
uses: actions/upload-artifact@v2
with:
name: ${{matrix.cache-name}}
path: app