59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
name: Build Emulator
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths: ["gb-emu/**", "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: |
|
|
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: emulator-${{ matrix.os }}
|
|
- uses: awalsh128/cache-apt-pkgs-action@latest
|
|
if: ${{ matrix.os == 'ubuntu' }}
|
|
with:
|
|
packages: libasound2-dev libudev-dev
|
|
version: 1.0
|
|
- run: cargo build --release
|
|
if: ${{ matrix.os != 'macos' }}
|
|
- run: cargo build --release --target x86_64-apple-darwin
|
|
if: ${{ matrix.os == 'macos' }}
|
|
- run: cargo build --release --target aarch64-apple-darwin
|
|
if: ${{ matrix.os == 'macos' }}
|
|
- uses: actions/upload-artifact@v3
|
|
if: ${{ matrix.os == 'ubuntu' }}
|
|
with:
|
|
name: gb-emu-linux
|
|
path: target/release/gb-emu
|
|
- uses: actions/upload-artifact@v3
|
|
if: ${{ matrix.os == 'windows' }}
|
|
with:
|
|
name: gb-emu-windows
|
|
path: target/release/gb-emu.exe
|
|
- uses: actions/upload-artifact@v3
|
|
if: ${{ matrix.os == 'macos' }}
|
|
with:
|
|
name: gb-emu-macos-x86_64
|
|
path: target/x86_64-apple-darwin/release/gb-emu
|
|
- uses: actions/upload-artifact@v3
|
|
if: ${{ matrix.os == 'macos' }}
|
|
with:
|
|
name: gb-emu-macos-aarch64
|
|
path: target/aarch64-apple-darwin/release/gb-emu |