prebuild #189
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: prebuild | ||
on: [push] | ||
permissions: | ||
contents: write | ||
jobs: | ||
linux-package: | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-24.04 | ||
container: | ||
image: ubuntu:24.04 | ||
steps: | ||
- name: check Linux dependencies | ||
shell: bash | ||
run: | | ||
apt update | ||
DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends --no-install-suggests -y git git-lfs libxcb1 unzip nodejs curl nodejs npm | ||
DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends --no-install-suggests -y python3-setuptools build-essential | ||
- uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
- name: npm install | ||
run: npm install | ||
env: | ||
PREBUILD: true | ||
- name: check Linux dependencies | ||
run: node ./install_ffmpeg.js | ||
- name: prebuild for Linux (x64) | ||
run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }} | ||
# - name: prebuild for Linux (arm64) | ||
# run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --upload ${{ secrets.GITHUB_TOKEN }} | ||
package: | ||
permissions: | ||
contents: write | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
- windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
lfs: true | ||
- name: Use nodejs | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.13.0 | ||
- name: install Mac build dependencies (brew) | ||
run: | | ||
brew install nasm pkg-config | ||
python3 -m pip install packaging setuptools | ||
if: ${{ runner.os == 'macOS'}} | ||
- name: npm install | ||
run: npm install | ||
env: | ||
PREBUILD: true | ||
- name: install Mac dependencies (shared release x64) | ||
run: node ./install_ffmpeg.js --arch x64 | ||
if: ${{ runner.os == 'macOS'}} | ||
- name: install Mac dependencies (shared release arm64) | ||
run: node ./install_ffmpeg.js --arch arm64 | ||
if: ${{ runner.os == 'macOS'}} | ||
- name: install Windows dependencies | ||
run: node ./install_ffmpeg.js | ||
if: ${{ runner.os == 'Windows'}} | ||
- name: prebuild Release for macOS (x64) | ||
run: npx prebuild --runtime napi --arch x64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --verbose --upload ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ runner.os == 'macOS'}} | ||
- name: clean build directory for cross-compiling | ||
run: rm ./build/Release/*.dylib || true | ||
if: ${{ runner.os == 'macOS'}} | ||
- name: prebuild Release for macOS (arm64) | ||
run: npx prebuild --runtime napi --arch arm64 --include-regex '(\.node|\.dylib|ffmpeg|ffprobe)$' --verbose --upload ${{ secrets.GITHUB_TOKEN }} | ||
if: ${{ runner.os == 'macOS'}} | ||
- name: prebuild for Windows | ||
run: npx prebuild --runtime napi --include-regex '.node|.dll|.exe' --verbose --upload ${{ secrets.GITHUB_TOKEN }} | ||
shell: bash | ||
if: ${{ runner.os == 'Windows'}} |