2023-12-27 12:57:08 +02:00
|
|
|
name: Build binaries and publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-linux:
|
|
|
|
runs-on: node-16
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target:
|
|
|
|
- x86_64-unknown-linux-gnu
|
|
|
|
- x86_64-unknown-linux-musl
|
|
|
|
- aarch64-unknown-linux-gnu
|
|
|
|
- aarch64-unknown-linux-musl
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Packages
|
2023-12-27 13:05:25 +02:00
|
|
|
run: apt-get update && apt-get install -yqq build-essential yasm libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libavfilter-dev libavdevice-dev libswresample-dev libfftw3-dev ffmpeg
|
2023-12-27 12:57:08 +02:00
|
|
|
|
2023-12-27 13:00:11 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-27 12:57:08 +02:00
|
|
|
|
|
|
|
- name: Install Rust ${{ matrix.target }}
|
2023-12-27 13:00:11 +02:00
|
|
|
uses: actions-rs/toolchain@v1
|
2023-12-27 12:57:08 +02:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
override: false
|
|
|
|
|
|
|
|
- run: npm install
|
|
|
|
- run: npm run build
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: binary
|
|
|
|
path: index.node
|