@@ -130,20 +130,40 @@ jobs:
130
130
if-no-files-found : error
131
131
132
132
build-macos :
133
- runs-on : macos-11
133
+ runs-on : ubuntu-latest
134
134
name : MacOS Build
135
135
136
136
env :
137
- GCC_VERSION : " 13"
138
- MACOSX_DEPLOYMENT_TARGET : 10.15
137
+ MACOSX_DEPLOYMENT_TARGET : ${{inputs.macosx-deployment-target}}
139
138
steps :
140
- - uses : actions/checkout@v3
141
- - uses : actions/setup-python@v3
139
+ - uses : actions/checkout@v4
140
+ - uses : actions/setup-python@v5
141
+ with :
142
+ python-version : " 3.x"
142
143
143
- - name : " Install Dependencies"
144
- uses : melusina-org/setup-macports@v1
144
+ - name : " Install Osxcross"
145
+ id : osxcross
146
+ uses : ./.github/actions/osxcross
147
+ with :
148
+ osx-version : ${{ inputs.osx-version }}
149
+
150
+ - name : " Cache Dependencies"
151
+ uses : actions/cache@v4
145
152
with :
146
- parameters : " .github/parameters/macports.yml"
153
+ key : ${{runner.os}}-${{inputs.osx-version}}-macports
154
+ path : ${{env.OSXCROSS_FOLDER}}/target/macports
155
+
156
+ - name : " Install Dependencies"
157
+ env :
158
+ OSXCROSS_MACPORTS_MIRROR : " https://packages.macports.org"
159
+ run : |
160
+ echo "::group::Installing mac deps"
161
+ omp install libsdl2 onetbb lz4 libpng minizip luajit flac
162
+ echo "OSXCROSS_PKG_CONFIG_PATH=${{env.OSXCROSS_TARGET}}/macports/pkgs/opt/local/libexec/onetbb/lib/pkgconfig" >> $GITHUB_ENV
163
+ echo "::endgroup::"
164
+ echo "::group::Installing meson"
165
+ pip install meson ninja
166
+ echo "::endgroup::"
147
167
148
168
- name : Set Version
149
169
if : ${{inputs.new_release_version}}
@@ -153,23 +173,19 @@ jobs:
153
173
github_token : ${{ secrets.GITHUB_TOKEN }}
154
174
155
175
- name : ccache
156
- uses :
hendrikmuhs/[email protected]
176
+ uses :
hendrikmuhs/[email protected] .11
157
177
with :
158
178
key : ${{ github.job }}-${{ matrix.os }}
159
179
160
180
- name : Setup Meson
161
181
env :
162
- CC : " ccache gcc-${{env.GCC_VERSION}}"
163
- CXX : " ccache g++-${{env.GCC_VERSION}}"
164
182
LDFLAGS : " -static-libgcc -static-libstdc++"
165
183
run : |
166
- meson setup --buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
184
+ meson setup --cross-file=${{steps.osxcross.outputs.meson-osxcross}} -- buildtype=${{inputs.build_type}} -Ddebug_type=${{inputs.debug_level}} -Db_lto=false build
167
185
168
186
- name : Configure for App Bundle
169
187
if : ${{inputs.upload_artefacts}}
170
188
env :
171
- CC : " ccache gcc-${{env.GCC_VERSION}}"
172
- CXX : " ccache g++-${{env.GCC_VERSION}}"
173
189
LDFLAGS : " -static-libgcc -static-libstdc++"
174
190
run : |
175
191
meson configure \
@@ -180,8 +196,6 @@ jobs:
180
196
181
197
- name : Build
182
198
env :
183
- CC : " ccache gcc-${{env.GCC_VERSION}}"
184
- CXX : " ccache g++-${{env.GCC_VERSION}}"
185
199
LDFLAGS : " -static-libgcc -static-libstdc++"
186
200
run : |
187
201
meson compile -C build
@@ -194,7 +208,6 @@ jobs:
194
208
- name : Tar files
195
209
if : ${{inputs.upload_artefacts}}
196
210
run : |
197
- tree /tmp/
198
211
cd /tmp/
199
212
tar -cvf CortexCommand.tar "Cortex Command.app"
200
213
@@ -204,7 +217,7 @@ jobs:
204
217
205
218
- name : Artifact Deploy
206
219
if : ${{inputs.upload_artefacts}}
207
- uses : actions/upload-artifact@v3
220
+ uses : actions/upload-artifact@v4
208
221
with :
209
222
name : CortexCommand (macOS)
210
223
path : |
0 commit comments