gb-emu/.github/workflows/build-vst.yml
2023-04-07 08:54:07 +10:00

46 lines
1.4 KiB
YAML

name: Build VST
on:
push:
branches: [ "main" ]
paths: ["gb-vst/**", "lib/**", "vendored/**", "Cargo.toml"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macos, windows]
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- run: mkdir test-roms
- uses: suisei-cn/actions-download-file@v1.3.0
with:
url: 'https://github.com/trash80/mGB/raw/master/mGB.gb'
target: test-roms/
- run: |
rustup toolchain install nightly --profile minimal --no-self-update
rustup default nightly
- run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
if: ${{ matrix.os == 'macos' }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: vst-${{ matrix.os }}
- uses: awalsh128/cache-apt-pkgs-action@latest
if: ${{ matrix.os == 'ubuntu' }}
with:
packages: libasound2-dev libudev-dev xorg-dev libjack-jackd2-dev libx11-xcb-dev libxcb-icccm4-dev libxcb-dri2-0-dev
version: 1.0
- run: cargo xtask bundle vst --release
if: ${{ matrix.os != 'macos' }}
- run: cargo xtask bundle-universal vst --release
if: ${{ matrix.os == 'macos' }}
- uses: actions/upload-artifact@v3
with:
name: gb-vst-${{ matrix.os }}.vst3
path: target/bundled/vst.vst3