Skip to content

Commit a0182f8

Browse files
Updating pre-build scripts
1 parent ad017b5 commit a0182f8

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

.github/workflows/prebuild.yml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,42 @@ name: prebuild
22
on: [push]
33

44
jobs:
5+
linux-package:
6+
runs-on: ubuntu-latest
7+
container:
8+
image: node:16.20.2-bookworm-slim
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
lfs: true
13+
14+
- name: install Linux dependencies
15+
run: |
16+
apt-get update
17+
apt-get install -y build-essential pkg-config libtool python3 python-is-python3
18+
apt-get install -y libavcodec-dev libavformat-dev libavdevice-dev libavfilter-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev libzimg-dev
19+
20+
- name: npm install
21+
run: npm install
22+
env:
23+
PREBUILD: true
24+
25+
26+
- name: check Linux dependencies
27+
run: node ./install_ffmpeg.js
28+
29+
- name: prebuild for Linux (x64)
30+
run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: prebuild for Linux (arm64)
33+
run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
34+
535
package:
636
runs-on: ${{ matrix.os }}
737
strategy:
838
fail-fast: false
939
matrix:
1040
os:
11-
- ubuntu-22.04
1241
- macos-latest
1342
- windows-latest
1443
steps:
@@ -26,17 +55,6 @@ jobs:
2655
env:
2756
PREBUILD: true
2857

29-
- name: install Linux dependencies
30-
run: |
31-
sudo add-apt-repository ppa:savoury1/ffmpeg5
32-
sudo apt-get update
33-
sudo apt-get install -y libavcodec-dev libavformat-dev libavdevice-dev libavfilter-dev libavutil-dev libpostproc-dev libswresample-dev libswscale-dev libzimg-dev
34-
if: ${{ runner.os == 'Linux' }}
35-
36-
- name: check Linux dependencies
37-
run: node ./install_ffmpeg.js
38-
if: ${{ runner.os == 'Linux'}}
39-
4058
- name: install Mac build dependencies (brew)
4159
run: brew install nasm pkg-config
4260
if: ${{ runner.os == 'macOS'}}
@@ -73,11 +91,3 @@ jobs:
7391
run: npx prebuild --runtime napi --include-regex '.node|.dll|.exe' --verbose --upload ${{ secrets.GITHUB_TOKEN }}
7492
shell: bash
7593
if: ${{ runner.os == 'Windows'}}
76-
77-
- name: prebuild for Linux (x64)
78-
run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
79-
if: ${{ runner.os == 'Linux'}}
80-
81-
- name: prebuild for Linux (arm64)
82-
run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }}
83-
if: ${{ runner.os == 'Linux'}}

binding.gyp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
"ffmpeg/ffmpeg-5.x-win64-shared/bin/swscale-6.dll",
135135
"node_modules/ffmpeg-ffprobe-static/ffmpeg.exe",
136136
"node_modules/ffmpeg-ffprobe-static/ffprobe.exe"
137+
]
137138
}
138139
]
139140
}],

0 commit comments

Comments
 (0)