@@ -90,12 +90,13 @@ jobs:
90
90
name : metacall-tarball-${{ matrix.triplet.arch }}
91
91
path : release/*
92
92
93
- pkg- test :
94
- name : Test Tarball PKG
93
+ test :
94
+ name : Test
95
95
needs : build
96
96
strategy :
97
97
fail-fast : false
98
98
matrix :
99
+ extension : ["tar.gz", "pkg"]
99
100
triplet : [
100
101
{os: macos-13, arch: amd64, install: "/usr/local"},
101
102
{os: macos-14, arch: arm64, install: "/opt/homebrew"}
@@ -158,100 +159,21 @@ jobs:
158
159
with :
159
160
name : metacall-tarball-${{ matrix.triplet.arch }}
160
161
161
- # Install from package
162
- - name : Install MetaCall package
162
+ - name : Install MetaCall from package
163
+ if : ${{ matrix.extension }} == 'pkg'
163
164
run : sudo installer -pkg "metacall-tarball-macos-${{ matrix.triplet.arch }}.pkg" -target /
164
165
165
- # Test the package in a clean environment
166
- - name : Test
167
- run : |
168
- export PATH="${{ matrix.triplet.install }}/bin:$PATH"
169
- ./test.sh
170
-
171
- # Release package
172
- - name : Release
173
- uses : softprops/action-gh-release@v2
174
- if : startsWith(github.ref, 'refs/tags/')
175
- with :
176
- fail_on_unmatched_files : true
177
- files : |
178
- metacall-tarball-macos-${{ matrix.triplet.arch }}.pkg
179
-
180
- tgz-test :
181
- name : Test Tarball TGZ
182
- needs : build
183
- strategy :
184
- fail-fast : false
185
- matrix :
186
- triplet : [
187
- {os: macos-13, arch: amd64, install: "/usr/local"},
188
- {os: macos-14, arch: arm64, install: "/opt/homebrew"}
189
- ]
190
- runs-on : ${{ matrix.triplet.os }}
191
- steps :
192
- - name : Check out the repository
193
- uses : actions/checkout@v4
194
- with :
195
- fetch-depth : 0
196
-
197
- # Clean up previous dependencies in order to avoid conflicts with brew
198
- - name : Uninstall brew completely
199
- run : /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
200
-
201
- - name : Install brew
202
- run : |
203
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
204
- brew uninstall --force --ignore-dependencies node
205
- brew cleanup -s node
206
- brew cleanup --prune-prefix
207
- brew uninstall --force --ignore-dependencies [email protected]
208
-
209
- brew cleanup --prune-prefix
210
- brew uninstall --force --ignore-dependencies [email protected]
211
-
212
- brew cleanup --prune-prefix
213
- brew uninstall --force --ignore-dependencies [email protected]
214
-
215
- brew cleanup --prune-prefix
216
- sudo rm -rf /System/Library/Frameworks/Python.framework/
217
- brew cleanup --prune-prefix
218
- sudo rm -rf /usr/local/bin/2to3
219
- sudo rm -rf /usr/local/bin/2to3-3.11
220
- sudo rm -rf /usr/local/bin/2to3-3.12
221
- sudo rm -rf /usr/local/bin/2to3-3.13
222
- sudo rm -rf /usr/local/bin/idle3
223
- sudo rm -rf /usr/local/bin/idle3.11
224
- sudo rm -rf /usr/local/bin/idle3.12
225
- sudo rm -rf /usr/local/bin/idle3.13
226
- sudo rm -rf /usr/local/bin/pydoc3
227
- sudo rm -rf /usr/local/bin/pydoc3.11
228
- sudo rm -rf /usr/local/bin/pydoc3.12
229
- sudo rm -rf /usr/local/bin/pydoc3.13
230
- sudo rm -rf /usr/local/bin/python3
231
- sudo rm -rf /usr/local/bin/python3-config
232
- sudo rm -rf /usr/local/bin/python3.11
233
- sudo rm -rf /usr/local/bin/python3.12
234
- sudo rm -rf /usr/local/bin/python3.13
235
- sudo rm -rf /usr/local/bin/python3.11-config
236
- sudo rm -rf /usr/local/bin/python3.12-config
237
- sudo rm -rf /usr/local/bin/python3.13-config
238
- brew uninstall --force --ignore-dependencies ruby
239
- brew cleanup -s ruby
240
- brew cleanup --prune-prefix
241
- sudo rm -rf $(brew --repo homebrew/core)
242
-
243
- - name : Download the artifact
244
- uses : actions/download-artifact@v4
245
- with :
246
- name : metacall-tarball-${{ matrix.triplet.arch }}
247
-
248
- # Test the package in a clean environment
249
- - name : Test
166
+ - name : Install MetaCall from tarball
167
+ if : ${{ matrix.extension }} == 'tar.gz'
250
168
run : |
251
169
mkdir distributable
252
170
tar -xvzf metacall-tarball-macos-${{ matrix.triplet.arch }}.tar.gz -C `pwd`/distributable
253
171
sudo cp -R `pwd`/distributable${{ matrix.triplet.install }}/ ${{ matrix.triplet.install }}/
254
172
rm -rf `pwd`/distributable
173
+
174
+ # Test the package in a clean environment
175
+ - name : Test
176
+ run : |
255
177
export PATH="${{ matrix.triplet.install }}/bin:$PATH"
256
178
./test.sh
257
179
@@ -262,11 +184,11 @@ jobs:
262
184
with :
263
185
fail_on_unmatched_files : true
264
186
files : |
265
- metacall-tarball-macos-${{ matrix.triplet.arch }}.tar.gz
187
+ metacall-tarball-macos-${{ matrix.triplet.arch }}.${{ matrix.extension }}
266
188
267
189
install-test :
268
190
name : Trigger Install Test Workflow
269
- needs : [pkg- test, tgz-test]
191
+ needs : test
270
192
runs-on : ubuntu-latest
271
193
if : startsWith(github.ref, 'refs/tags/v')
272
194
steps :
0 commit comments