mirror of
https://github.com/CDrummond/bliss-analyser.git
synced 2025-04-08 05:00:02 +03:00
Revery to using docker, and add changes from chincheta0815 - #3
This commit is contained in:
parent
9aae7825d0
commit
370c533a49
30
.github/workflows/build.yml
vendored
30
.github/workflows/build.yml
vendored
@ -59,38 +59,22 @@ jobs:
|
||||
name: bliss-analyser-linux-x86-ffmpeg5
|
||||
path: releases/
|
||||
|
||||
Linux_ARM64:
|
||||
|
||||
Linux_ARM:
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build
|
||||
uses: uraimo/run-on-arch-action@v2.2.0
|
||||
with:
|
||||
arch: aarch64
|
||||
distro: bullseye
|
||||
|
||||
install: |
|
||||
apt-get update && apt-get install build-essential yasm libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev libswresample-dev libfftw3-dev ffmpeg wget -y
|
||||
run: |
|
||||
wget https://static.rust-lang.org/rustup/dist/aarch64-unknown-linux-gnu/rustup-init
|
||||
chmod +x rustup-init
|
||||
./rustup-init -y
|
||||
source $HOME/.cargo/env
|
||||
cargo build --release
|
||||
strip target/release/bliss-analyser
|
||||
mkdir releases
|
||||
cp target/release/bliss-analyser releases/bliss-analyser
|
||||
cp UserGuide.md releases/README.md
|
||||
cp LICENSE releases/
|
||||
cp configs/linux.ini releases/config.ini
|
||||
|
||||
- name: Build ARM
|
||||
run: |
|
||||
docker build -t bliss-analyser-cross - < docker/Dockerfile
|
||||
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser-cross
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: bliss-analyser-linux-arm64
|
||||
name: bliss-analyser-linux-arm
|
||||
path: releases/
|
||||
|
||||
macOS:
|
||||
|
@ -1,14 +1,19 @@
|
||||
# Cross compilation environment for bliss-mixer
|
||||
|
||||
FROM debian:stretch
|
||||
FROM debian:bullseye
|
||||
|
||||
RUN dpkg --add-architecture arm64 && \
|
||||
dpkg --add-architecture armhf
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get install -y curl git build-essential gcc-multilib musl-tools musl-dev musl && \
|
||||
apt-get install -y yasm libavutil-dev libavcodec-dev libavformat-dev libavfilter-dev libavdevice-dev libswresample-dev libfftw3-dev ffmpeg && \
|
||||
apt-get install -y crossbuild-essential-armhf crossbuild-essential-arm64
|
||||
RUN apt-get install -y curl git pkg-config yasm
|
||||
RUN apt-get install -y crossbuild-essential-armhf crossbuild-essential-arm64
|
||||
|
||||
RUN apt-get install -y libavutil-dev:arm64 libavcodec-dev:arm64 libavformat-dev:arm64 \
|
||||
libavfilter-dev:arm64 libavdevice-dev:arm64 libswresample-dev:arm64 libfftw3-dev:arm64
|
||||
|
||||
RUN apt-get install -y libavutil-dev:armhf libavcodec-dev:armhf libavformat-dev:armhf \
|
||||
libavfilter-dev:armhf libavdevice-dev:armhf libswresample-dev:armhf libfftw3-dev:armhf
|
||||
|
||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||
ENV PATH="/root/.cargo/bin/:${PATH}"
|
||||
@ -27,3 +32,4 @@ RUN mkdir /src
|
||||
|
||||
WORKDIR /src
|
||||
CMD ["/src/docker/docker-build.sh"]
|
||||
|
||||
|
@ -5,16 +5,18 @@ set -eux
|
||||
uname -a
|
||||
DESTDIR=/src/releases
|
||||
|
||||
for d in armhf-linux aarch64-linux ; do
|
||||
for d in armhf-linux aarch64-linux; do
|
||||
mkdir -p $DESTDIR/$d
|
||||
rm -f $DESTDIR/$d/*
|
||||
rm -rf $DESTDIR/$d/*
|
||||
done
|
||||
|
||||
function build {
|
||||
echo Building for $1 to $3...
|
||||
|
||||
if [[ ! -f /build/$1/release/bliss-analyser ]]; then
|
||||
cargo build --release --target $1
|
||||
export RUST_BACKTRACE=full
|
||||
export PKG_CONFIG=${1//unknown-/}-pkg-config
|
||||
BINDGEN_EXTRA_CLANG_ARGS="--sysroot /usr/${1//unknown-/}" cargo build --release --target $1
|
||||
fi
|
||||
|
||||
$2 /build/$1/release/bliss-analyser && cp /build/$1/release/bliss-analyser $DESTDIR/$3
|
||||
@ -23,4 +25,3 @@ function build {
|
||||
build arm-unknown-linux-gnueabihf arm-linux-gnueabihf-strip armhf-linux/bliss-analyser
|
||||
build aarch64-unknown-linux-gnu aarch64-linux-gnu-strip aarch64-linux/bliss-analyser
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user