29
29
new_release_version :
30
30
type : string
31
31
required : false
32
+ osx-version :
33
+ type : string
34
+ required : false
35
+ default : " 11.1"
36
+ macosx-deployment-target :
37
+ type : string
38
+ required : false
39
+ default : " 10.15"
32
40
33
41
# Triggers the workflow when called by a top-level workflow
34
42
workflow_call :
48
56
new_release_version :
49
57
type : string
50
58
required : false
59
+ osx-version :
60
+ type : string
61
+ required : false
62
+ default : " 11.1"
63
+ macosx-deployment-target :
64
+ type : string
65
+ required : false
66
+ default : " 10.15"
51
67
52
68
jobs :
53
69
build-linux :
56
72
57
73
steps :
58
74
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
59
- - uses : actions/checkout@v3
60
- - uses : actions/setup-python@v3
75
+ - uses : actions/checkout@v4
76
+ - uses : actions/setup-python@v5
77
+ with :
78
+ python-version : " 3.x"
61
79
62
80
- name : Install Dependencies
63
81
run : |
66
84
sudo pip install meson
67
85
68
86
- name : ccache
69
- uses :
hendrikmuhs/[email protected]
87
+ uses :
hendrikmuhs/[email protected] .11
70
88
with :
71
89
key : ${{ github.job }}-${{ matrix.os }}
72
90
@@ -82,14 +100,14 @@ jobs:
82
100
CC : " ccache gcc"
83
101
CXX : " ccache g++"
84
102
run : |
85
- meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=true build
103
+ meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
86
104
87
105
- name : Configure for AppImage
88
106
if : ${{inputs.upload_artefacts}}
89
107
env :
90
108
CC : " ccache gcc"
91
109
CXX : " ccache g++"
92
- run : meson configure -Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=/usr/lib/ --prefix=/usr/ build
110
+ run : meson configure -Db_lto=true - Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=/usr/lib/ --prefix=/usr/ build
93
111
94
112
- name : Build
95
113
env :
@@ -123,27 +141,47 @@ jobs:
123
141
124
142
- name : Upload Appimage
125
143
if : ${{inputs.upload_artefacts}}
126
- uses : actions/upload-artifact@v3
144
+ uses : actions/upload-artifact@v4
127
145
with :
128
146
name : CortexCommand (Linux)
129
147
path : CortexCommand.AppImage
130
148
if-no-files-found : error
131
149
132
150
build-macos :
133
- runs-on : macos-11
151
+ runs-on : ubuntu-latest
134
152
name : MacOS Build
135
153
136
154
env :
137
- GCC_VERSION : " 13"
138
- MACOSX_DEPLOYMENT_TARGET : 10.15
155
+ MACOSX_DEPLOYMENT_TARGET : ${{inputs.macosx-deployment-target}}
139
156
steps :
140
- - uses : actions/checkout@v3
141
- - uses : actions/setup-python@v3
157
+ - uses : actions/checkout@v4
158
+ - uses : actions/setup-python@v5
159
+ with :
160
+ python-version : " 3.x"
142
161
143
- - name : " Install Dependencies"
144
- uses : melusina-org/setup-macports@v1
162
+ - name : " Install Osxcross"
163
+ id : osxcross
164
+ uses : ./.github/actions/osxcross
145
165
with :
146
- parameters : " .github/parameters/macports.yml"
166
+ osx-version : ${{ inputs.osx-version }}
167
+
168
+ - name : " Cache Dependencies"
169
+ uses : actions/cache@v4
170
+ with :
171
+ key : ${{runner.os}}-${{inputs.osx-version}}-macports
172
+ path : ${{env.OSXCROSS_FOLDER}}/target/macports
173
+
174
+ - name : " Install Dependencies"
175
+ env :
176
+ OSXCROSS_MACPORTS_MIRROR : " https://packages.macports.org"
177
+ run : |
178
+ echo "::group::Installing mac deps"
179
+ omp install libsdl2 onetbb lz4 libpng minizip luajit flac
180
+ echo "OSXCROSS_PKG_CONFIG_PATH=${{env.OSXCROSS_TARGET}}/macports/pkgs/opt/local/libexec/onetbb/lib/pkgconfig" >> $GITHUB_ENV
181
+ echo "::endgroup::"
182
+ echo "::group::Installing meson"
183
+ pip install meson ninja
184
+ echo "::endgroup::"
147
185
148
186
- name : Set Version
149
187
if : ${{inputs.new_release_version}}
@@ -153,48 +191,43 @@ jobs:
153
191
github_token : ${{ secrets.GITHUB_TOKEN }}
154
192
155
193
- name : ccache
156
- uses :
hendrikmuhs/[email protected]
194
+ uses :
hendrikmuhs/[email protected] .11
157
195
with :
158
196
key : ${{ github.job }}-${{ matrix.os }}
159
197
160
198
- name : Setup Meson
161
199
env :
162
- CC : " ccache gcc-${{env.GCC_VERSION}}"
163
- CXX : " ccache g++-${{env.GCC_VERSION}}"
164
200
LDFLAGS : " -static-libgcc -static-libstdc++"
165
201
run : |
166
- meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
202
+ meson setup --cross-file=${{steps.osxcross.outputs.meson-osxcross}} -- buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
167
203
168
204
- name : Configure for App Bundle
169
205
if : ${{inputs.upload_artefacts}}
170
206
env :
171
- CC : " ccache gcc-${{env.GCC_VERSION}}"
172
- CXX : " ccache g++-${{env.GCC_VERSION}}"
173
207
LDFLAGS : " -static-libgcc -static-libstdc++"
174
208
run : |
175
209
meson configure \
176
210
-Dinstall_data=false -Dinstall_runner=false -Dfmod_dir=Contents/Frameworks \
177
211
--bindir=Contents/MacOS \
178
212
--prefix="/" \
213
+ -Ddylibbundler_args="-ns -s ${{env.OSXCROSS_TARGET}}/macports/pkgs/opt/local/lib/ \
214
+ -s ${{env.OSXCROSS_TARGET}}/macports/pkgs/opt/local/libexec/onetbb/lib/" \
179
215
build
180
216
181
217
- name : Build
182
218
env :
183
- CC : " ccache gcc-${{env.GCC_VERSION}}"
184
- CXX : " ccache g++-${{env.GCC_VERSION}}"
185
219
LDFLAGS : " -static-libgcc -static-libstdc++"
186
220
run : |
187
221
meson compile -C build
188
222
189
223
- name : Create App Bundle
190
224
if : ${{inputs.upload_artefacts}}
191
225
run : |
192
- DESTDIR ="/tmp/Cortex Command.app" meson install -C build
226
+ meson install --destdir ="/tmp/Cortex Command.app" -C build
193
227
194
228
- name : Tar files
195
229
if : ${{inputs.upload_artefacts}}
196
230
run : |
197
- tree /tmp/
198
231
cd /tmp/
199
232
tar -cvf CortexCommand.tar "Cortex Command.app"
200
233
@@ -204,7 +237,7 @@ jobs:
204
237
205
238
- name : Artifact Deploy
206
239
if : ${{inputs.upload_artefacts}}
207
- uses : actions/upload-artifact@v3
240
+ uses : actions/upload-artifact@v4
208
241
with :
209
242
name : CortexCommand (macOS)
210
243
path : |
@@ -216,8 +249,10 @@ jobs:
216
249
name : Windows Build
217
250
218
251
steps :
219
- - uses : actions/checkout@v3
220
- - uses : actions/setup-python@v3
252
+ - uses : actions/checkout@v4
253
+ - uses : actions/setup-python@v5
254
+ with :
255
+ python-version : " 3.x"
221
256
222
257
- name : Install Dependencies
223
258
run : |
0 commit comments