Use a Docker image with preinstalled packages
Some checks failed
Build binaries and publish / build-linux (aarch64-unknown-linux-gnu) (push) Failing after 5m12s
Build binaries and publish / build-linux (aarch64-unknown-linux-musl) (push) Failing after 3s
Build binaries and publish / build-linux (x86_64-unknown-linux-gnu) (push) Failing after 3s
Build binaries and publish / build-linux (x86_64-unknown-linux-musl) (push) Failing after 3s

This commit is contained in:
Anton Liaposhchenko 2023-12-27 19:56:07 +02:00
parent dd2aece59d
commit 7e45aea6fa
2 changed files with 20 additions and 12 deletions

View File

@ -12,6 +12,11 @@ env:
jobs: jobs:
build-linux: build-linux:
runs-on: node-16 runs-on: node-16
container:
image: gitea.antonlyap.pp.ua/antonlyap/bliss-rs/node-rust:latest
credentials:
username: antonlyap
password: ${{ secrets.ACCESS_TOKEN }}
strategy: strategy:
matrix: matrix:
target: target:
@ -21,22 +26,15 @@ jobs:
- aarch64-unknown-linux-musl - aarch64-unknown-linux-musl
steps: steps:
- name: Packages - name: Switch toolchain
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 libclang-dev ffmpeg run: rustup default stable-${{ matrix.target }}
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install Rust ${{ matrix.target }}
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: false
- run: npm install - run: npm install
- run: npm run build - run: npm run build -- --release
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: binary name: binary-${{ matrix.target }}
path: index.node path: index.node

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM node:20-bookworm
RUN apt-get update
RUN apt-get install -yqq wget build-essential yasm libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libavfilter-dev libavdevice-dev libswresample-dev libfftw3-dev libclang-dev ffmpeg
WORKDIR /opt/rust
RUN wget https://sh.rustup.rs -O rustup-init.sh
RUN chmod +x rustup-init.sh
RUN ./rustup-init.sh -y -t x86_64-unknown-linux-gnu x86_64-unknown-linux-musl aarch64-unknown-linux-gnu aarch64-unknown-linux-musl