Skip to content

Commit 1bf57f2

Browse files
author
Srikanth Kotagiri
committed
Split windows and macos jobs
1 parent e7e3ed6 commit 1bf57f2

File tree

1 file changed

+28
-25
lines changed

1 file changed

+28
-25
lines changed

.github/workflows/prebuild.yml

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,35 @@ jobs:
3737
# - name: prebuild for Linux (arm64)
3838
# run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
3939

40-
package:
40+
windows-package:
4141
permissions:
4242
contents: write
43-
runs-on: ${{ matrix.os }}
44-
strategy:
45-
fail-fast: false
46-
matrix:
47-
os:
48-
- macos-latest
49-
- windows-latest
43+
runs-on: windows-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
with:
47+
lfs: true
48+
- name: Use nodejs
49+
uses: actions/setup-node@v1
50+
with:
51+
node-version: 16.13.0
52+
53+
- name: npm install
54+
run: npm install
55+
env:
56+
PREBUILD: true
57+
58+
- name: install Windows dependencies
59+
run: node ./install_ffmpeg.js
60+
61+
- name: prebuild for Windows
62+
run: npx prebuild --runtime napi --include-regex '.node|.dll|.exe' --verbose --upload ${{ secrets.GITHUB_TOKEN }}
63+
shell: bash
64+
65+
macos-package:
66+
permissions:
67+
contents: write
68+
runs-on: macos-latest
5069
steps:
5170
- uses: actions/checkout@v2
5271
with:
@@ -59,9 +78,7 @@ jobs:
5978

6079
- name: install Mac build dependencies (brew)
6180
run: |
62-
brew install nasm pkg-config
63-
python3 -m pip install packaging setuptools
64-
if: ${{ runner.os == 'macOS'}}
81+
brew install nasm pkg-config python-packaging python-setuptools
6582
6683
- name: npm install
6784
run: npm install
@@ -70,29 +87,15 @@ jobs:
7087

7188
- name: install Mac dependencies (shared release x64)
7289
run: node ./install_ffmpeg.js --arch x64
73-
if: ${{ runner.os == 'macOS'}}
7490

7591
- name: install Mac dependencies (shared release arm64)
7692
run: node ./install_ffmpeg.js --arch arm64
77-
if: ${{ runner.os == 'macOS'}}
78-
79-
- name: install Windows dependencies
80-
run: node ./install_ffmpeg.js
81-
if: ${{ runner.os == 'Windows'}}
8293

8394
- name: prebuild Release for macOS (x64)
8495
run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --verbose --upload ${{ secrets.GITHUB_TOKEN }}
85-
if: ${{ runner.os == 'macOS'}}
8696

8797
- name: clean build directory for cross-compiling
8898
run: rm ./build/Release/*.dylib || true
89-
if: ${{ runner.os == 'macOS'}}
9099

91100
- name: prebuild Release for macOS (arm64)
92101
run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --verbose --upload ${{ secrets.GITHUB_TOKEN }}
93-
if: ${{ runner.os == 'macOS'}}
94-
95-
- name: prebuild for Windows
96-
run: npx prebuild --runtime napi --include-regex '.node|.dll|.exe' --verbose --upload ${{ secrets.GITHUB_TOKEN }}
97-
shell: bash
98-
if: ${{ runner.os == 'Windows'}}

0 commit comments

Comments
 (0)