gb-emu/.github/workflows/build-vst.yml

55 lines
1.6 KiB
YAML
Raw Normal View History

2023-04-06 13:13:59 +10:00
name: Build VST
on:
push:
branches: [ "main" ]
2023-04-07 10:09:14 +10:00
paths: ["gb-vst/**", "lib/**", "vendored/**", "Cargo.toml"]
2023-04-06 13:13:59 +10:00
env:
CARGO_TERM_COLOR: always
jobs:
2023-04-06 14:32:40 +10:00
build:
runs-on: ${{ matrix.os }}-latest
strategy:
2023-04-07 09:22:23 +10:00
fail-fast: false
matrix:
2023-04-07 10:09:14 +10:00
os: [macos, windows]
2023-04-06 13:13:59 +10:00
steps:
2023-04-07 09:22:23 +10:00
- name: checkout
uses: actions/checkout@v3
- name: pull submodules
run: git submodule update --init --recursive
2023-04-06 14:58:28 +10:00
- run: mkdir test-roms
2023-04-07 09:22:23 +10:00
- name: download mGB
uses: suisei-cn/actions-download-file@v1.3.0
2023-04-06 14:58:28 +10:00
with:
2023-04-07 08:03:43 +10:00
url: 'https://github.com/trash80/mGB/raw/master/mGB.gb'
2023-04-06 14:58:28 +10:00
target: test-roms/
2023-04-07 09:22:23 +10:00
- 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
2023-04-06 16:02:56 +10:00
if: ${{ matrix.os == 'macos' }}
2023-04-07 09:22:23 +10:00
- name: cache rust build
uses: Swatinem/rust-cache@v2
2023-04-07 08:54:07 +10:00
with:
shared-key: vst-${{ matrix.os }}
2023-04-07 10:09:14 +10:00
# - 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
2023-04-07 09:22:23 +10:00
- name: build vst
run: cargo xtask bundle vst --release
2023-04-06 14:44:09 +10:00
if: ${{ matrix.os != 'macos' }}
2023-04-07 09:22:23 +10:00
- name: build vst (macos)
run: cargo xtask bundle-universal vst --release
2023-04-06 14:44:09 +10:00
if: ${{ matrix.os == 'macos' }}
2023-04-07 09:22:23 +10:00
- name: upload build
uses: actions/upload-artifact@v3
2023-04-06 14:32:40 +10:00
with:
name: gb-vst-${{ matrix.os }}.vst3
path: target/bundled/vst.vst3