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

55 lines
1.6 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:
fail-fast: false
matrix:
os: [macos, windows]
steps:
- name: checkout
uses: actions/checkout@v3
- name: pull submodules
run: git submodule update --init --recursive
- run: mkdir test-roms
- name: download mGB
uses: suisei-cn/actions-download-file@v1.3.0
with:
url: 'https://github.com/trash80/mGB/raw/master/mGB.gb'
target: test-roms/
- name: install rust toolchain
uses: dtolnay/rust-toolchain@nightly
- name: install rust aarch64 and x86_64 targets for mac
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
if: ${{ matrix.os == 'macos' }}
- name: cache rust build
uses: Swatinem/rust-cache@v2
with:
shared-key: vst-${{ matrix.os }}
# - name: install cached apt packages
# 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
- name: build vst
run: cargo xtask bundle vst --release
if: ${{ matrix.os != 'macos' }}
- name: build vst (macos)
run: cargo xtask bundle-universal vst --release
if: ${{ matrix.os == 'macos' }}
- name: upload build
uses: actions/upload-artifact@v3
with:
name: gb-vst-${{ matrix.os }}.vst3
path: target/bundled/vst.vst3