Files
bliss-analyser/.github/workflows/build.yml
T

207 lines
5.6 KiB
YAML

name: Build for all platforms
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
Linux_x86_symphonia:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build x86
run: |
docker build -t bliss-analyser-x86-symphonia - < docker/Dockerfile_x86_symphonia
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bliss-analyser-linux-x86-symphonia
path: releases/
Linux_x86_ffmpeg:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build x86
run: |
docker build -t bliss-analyser-x86-ffmpeg - < docker/Dockerfile_x86_ffmpeg
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bliss-analyser-linux-x86-ffmpeg
path: releases/
Linux_arm_symphonia:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build ARM
run: |
docker build -t bliss-analyser-arm-symphonia - < docker/Dockerfile_arm_symphonia
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bliss-analyser-linux-arm-symphonia
path: releases/
Linux_arm_ffmpeg:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Build ARM
run: |
docker build -t bliss-analyser-arm-ffmpeg - < docker/Dockerfile_arm_ffmpeg
docker run --rm -v $PWD/target:/build -v $PWD:/src bliss-analyser
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bliss-analyser-linux-arm-ffmpeg
path: releases/
macOS_symphonia:
runs-on: macos-13
steps:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Checkout
uses: actions/checkout@v2
- name: Install deps
run: |
brew install pkg-config
- name: Install Rust support for ARM64 & prepare environment
run: |
rustup target add aarch64-apple-darwin
mkdir releases
- name: Build
run: |
cargo build --release --features update-aubio-bindings,symphonia
strip target/release/bliss-analyser
cp target/release/bliss-analyser releases/bliss-analyser-x86_64
cargo build --target=aarch64-apple-darwin --release --features update-aubio-bindings,symphonia
strip target/aarch64-apple-darwin/release/bliss-analyser
cp target/aarch64-apple-darwin/release/bliss-analyser releases/bliss-analyser-arm64
cp UserGuide.md releases/README.md
cp LICENSE releases/
cp configs/macos.ini releases/config.ini
- name: Build fat binary
run: |
lipo -create \
-arch x86_64 releases/bliss-analyser-x86_64 \
-arch arm64 releases/bliss-analyser-arm64 \
-output releases/bliss-analyser
- name: Remove unused binaries
run:
rm releases/bliss-analyser-x86_64 releases/bliss-analyser-arm64
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bliss-analyser-mac-symphonia
path: releases/
Windows_symphonia:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Build
run: |
cargo build --release --features=symphonia
strip target/release/bliss-analyser.exe
mkdir releases
cp target/release/bliss-analyser.exe releases/bliss-analyser.exe
cp UserGuide.md releases/README.md
cp LICENSE releases/
cp configs/windows.ini releases/config.ini
cp c:\Windows\system32\vcruntime140.dll releases
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bliss-analyser-windows-symphonia
path: releases/
Windows_ffmpeg:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install deps
run: |
$VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n"
Invoke-WebRequest "https://www.gyan.dev/ffmpeg/builds/packages/ffmpeg-7.1.1-full_build-shared.7z" -OutFile ffmpeg-shared.7z
7z x ffmpeg-shared.7z
mkdir deps
mv ffmpeg-*/* deps/
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\deps`n"
Add-Content $env:GITHUB_PATH "${pwd}\deps\bin`n"
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Build
run: |
cargo build --release --features=libav
strip target/release/bliss-analyser.exe
mkdir releases
cp target/release/bliss-analyser.exe releases/bliss-analyser.exe
cp deps/bin/*.dll releases/
cp UserGuide.md releases/README.md
cp LICENSE releases/
cp configs/windows.ini releases/config.ini
cp c:\Windows\system32\vcruntime140.dll releases
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bliss-analyser-windows-ffmpeg
path: releases/