Skip to content

Commit e3c9f5f

Browse files
fix: build both versions
1 parent ead05bb commit e3c9f5f

File tree

3 files changed

+48
-42
lines changed

3 files changed

+48
-42
lines changed

.github/workflows/test-and-deploy.yml

+40-39
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ jobs:
3030
- name: Build
3131
run: |
3232
make build
33-
make build_macos
33+
make build_macos_x64
34+
make build_macos_arm64
3435
- name: Upload artifacts
3536
uses: actions/[email protected]
3637
with:
@@ -181,7 +182,7 @@ jobs:
181182
path: |
182183
output_linux_without_git.txt
183184
184-
test-macos:
185+
test-macos-x64:
185186
runs-on: macos-latest-large
186187
needs: build-linux-and-osx
187188
steps:
@@ -193,25 +194,25 @@ jobs:
193194
- name: Remove test coverage files
194195
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
195196
- name: Update exec permission
196-
run: chmod u+x out/codecov-macos
197+
run: chmod u+x out/codecov-macos-x64
197198
- name: Run MacOS binary -f (dry-run)
198199
run: |
199-
out/codecov-macos -f coverage/cobertura-coverage.xml -F macos -d -Z -v -t ${{ secrets.CODECOV_TOKEN }} | tee output_osx.txt
200+
out/codecov-macos-x64 -f coverage/cobertura-coverage.xml -F macos-x64 -d -Z -v -t ${{ secrets.CODECOV_TOKEN }} | tee output_macos_x64.txt
200201
- name: Run MacOS binary auto-detect (dry-run)
201202
run: |
202-
out/codecov-macos -F macos -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_osx.txt
203+
out/codecov-macos-x64 -F macos-x64 -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_macos_x64.txt
203204
- name: Run MacOS binary (upload)
204205
run: |
205-
out/codecov-macos -F macos -v -Z -t ${{ secrets.CODECOV_TOKEN }}
206+
out/codecov-macos-x64 -F macos-x64 -v -Z -t ${{ secrets.CODECOV_TOKEN }}
206207
- name: Upload artifacts
207208
uses: actions/[email protected]
208209
with:
209-
name: test-macos
210+
name: test-macos-x64
210211
if-no-files-found: error
211212
path: |
212-
output_osx.txt
213+
output_macos_x64.txt
213214
214-
test-macos-without-git:
215+
test-macos-x64-without-git:
215216
runs-on: macos-latest-large
216217
needs: build-linux-and-osx
217218
steps:
@@ -225,22 +226,22 @@ jobs:
225226
- name: Remove test coverage files
226227
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
227228
- name: Update exec permission
228-
run: chmod u+x out/codecov-macos
229+
run: chmod u+x out/codecov-macos-x64
229230
- name: Run MacOS binary (dry-run)
230231
run: |
231-
out/codecov-macos -F macos-without-git -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_osx_without_git.txt
232+
out/codecov-macos-x64 -F macos-x64-without-git -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_macos_x64_without_git.txt
232233
- name: Run MacOS binary (upload)
233234
run: |
234-
out/codecov-macos -F macos-without-git -v -Z -t ${{ secrets.CODECOV_TOKEN }}
235+
out/codecov-macos-x64 -F macos-x64-without-git -v -Z -t ${{ secrets.CODECOV_TOKEN }}
235236
- name: Upload artifacts
236237
uses: actions/[email protected]
237238
with:
238-
name: test-macos-without-git
239+
name: test-macos-x64-without-git
239240
if-no-files-found: error
240241
path: |
241-
output_osx_without_git.txt
242+
output_macos_x64_without_git.txt
242243
243-
test-macos-arch64:
244+
test-macos-arm64:
244245
runs-on: macos-latest
245246
needs: build-linux-and-osx
246247
steps:
@@ -252,25 +253,25 @@ jobs:
252253
- name: Remove test coverage files
253254
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
254255
- name: Update exec permission
255-
run: chmod u+x out/codecov-macos
256+
run: chmod u+x out/codecov-macos-arm64
256257
- name: Run MacOS binary -f (dry-run)
257258
run: |
258-
out/codecov-macos -f coverage/cobertura-coverage.xml -F macos -d -Z -v -t ${{ secrets.CODECOV_TOKEN }} | tee output_osx.txt
259+
out/codecov-macos-arm64 -f coverage/cobertura-coverage.xml -F macos-arm64 -d -Z -v -t ${{ secrets.CODECOV_TOKEN }} | tee output_macos_arm64.txt
259260
- name: Run MacOS binary auto-detect (dry-run)
260261
run: |
261-
out/codecov-macos -F macos -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_osx.txt
262+
out/codecov-macos-arm64 -F macos-arm64 -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_macos_arm64.txt
262263
- name: Run MacOS binary (upload)
263264
run: |
264-
out/codecov-macos -F macos -v -Z -t ${{ secrets.CODECOV_TOKEN }}
265+
out/codecov-macos-arm64 -F macos-arm64 -v -Z -t ${{ secrets.CODECOV_TOKEN }}
265266
- name: Upload artifacts
266267
uses: actions/[email protected]
267268
with:
268-
name: test-macos-arch64
269+
name: test-macos-arm64
269270
if-no-files-found: error
270271
path: |
271-
output_osx_arch64.txt
272+
output_macos_arm64.txt
272273
273-
test-macos-arch64-without-git:
274+
test-macos-arm64-without-git:
274275
runs-on: macos-latest
275276
needs: build-linux-and-osx
276277
steps:
@@ -284,20 +285,20 @@ jobs:
284285
- name: Remove test coverage files
285286
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
286287
- name: Update exec permission
287-
run: chmod u+x out/codecov-macos
288+
run: chmod u+x out/codecov-macos-arm64
288289
- name: Run MacOS binary (dry-run)
289290
run: |
290-
out/codecov-macos -F macos-without-git -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_osx_without_git.txt
291+
out/codecov-macos-arm64 -F macos-arm64-without-git -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_macos_arm64_without_git.txt
291292
- name: Run MacOS binary (upload)
292293
run: |
293-
out/codecov-macos -F macos-without-git -v -Z -t ${{ secrets.CODECOV_TOKEN }}
294+
out/codecov-macos-arm64 -F macos-arm64-without-git -v -Z -t ${{ secrets.CODECOV_TOKEN }}
294295
- name: Upload artifacts
295296
uses: actions/[email protected]
296297
with:
297-
name: test-macos-arch64-without-git
298+
name: test-macos-arm64-without-git
298299
if-no-files-found: error
299300
path: |
300-
output_osx_arch64_without_git.txt
301+
output_macos_arm64_without_git.txt
301302
302303
test-alpine:
303304
runs-on: ubuntu-latest
@@ -482,10 +483,10 @@ jobs:
482483
- test-alpine-without-git
483484
- test-linux
484485
- test-linux-without-git
485-
- test-macos
486-
- test-macos-without-git
487-
- test-macos-arch64
488-
- test-macos-arch64-without-git
486+
- test-macos-x64
487+
- test-macos-x64-without-git
488+
- test-macos-arm64
489+
- test-macos-arm64-without-git
489490
- test-windows
490491
- test-windows-without-git
491492
steps:
@@ -506,14 +507,14 @@ jobs:
506507
run: cat output_linux.txt
507508
- name: Cat output_linux_without_git.txt
508509
run: cat output_linux_without_git.txt
509-
- name: Cat output_osx.txt
510-
run: cat output_osx.txt
511-
- name: Cat output_osx_without_git.txt
512-
run: cat output_osx_without_git.txt
513-
- name: Cat output_osx_arch64.txt
514-
run: cat output_osx_arch64.txt
515-
- name: Cat output_osx_arch64_without_git.txt
516-
run: cat output_osx_arch64_without_git.txt
510+
- name: Cat output_macos_x64.txt
511+
run: cat output_macos_x64.txt
512+
- name: Cat output_macos_x64_without_git.txt
513+
run: cat output_macos_x64_without_git.txt
514+
- name: Cat output_macos_arm64.txt
515+
run: cat output_macos_arm64.txt
516+
- name: Cat output_macos_arm64_without_git.txt
517+
run: cat output_macos_arm64_without_git.txt
517518
- name: Cat output_win.txt
518519
run: cat output_win.txt
519520
- name: Cat output_win_without_git.txt

Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,13 @@ build:
2222
npm run build
2323
npm run build-linux
2424

25-
build_macos:
25+
build_macos_x64:
2626
npm run build
27-
npm run build-macos
27+
npm run build-macos-x64
28+
29+
build_macos_arm64:
30+
npm run build
31+
npm run build-macos-arm64
2832

2933
build_aarch64:
3034
npm run build

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"build": "tsc --build",
1515
"build-linux": "pkg . --targets linuxstatic --output out/codecov-linux",
1616
"build-aarch64": "pkg . --targets linuxstatic-arm64 --output out/codecov-aarch64",
17-
"build-macos": "pkg . --targets macos-arm64 --output out/codecov-macos",
17+
"build-macos-x64": "pkg . --targets macos-x64 --output out/codecov-macos-x64",
18+
"build-macos-arm64": "pkg . --targets macos-arm64 --output out/codecov-macos-arm64",
1819
"build-alpine": "pkg . --targets node14-alpine-x64 --output out/codecov-alpine",
1920
"build-windows": "pkg . --targets win --output out/codecov.exe",
2021
"prepare": "husky install",

0 commit comments

Comments
 (0)