fix arm mac

This commit is contained in:
Alex Janka 2023-04-06 16:02:56 +10:00
parent 9d996322d5
commit fdf01cf812
2 changed files with 42 additions and 7 deletions

View file

@ -3,7 +3,7 @@ name: Build Emulator
on: on:
push: push:
branches: [ "main" ] branches: [ "main" ]
paths: ["gb-emu/**", "lib/**", "vendored/**"] paths: ["gb-emu/**", "lib/**", "vendored/**", "Cargo.toml"]
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@ -19,25 +19,53 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: git submodule update --init --recursive - run: git submodule update --init --recursive
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
if: ${{ matrix.os != 'macos' }}
with: with:
toolchain: nightly toolchain: nightly
override: true override: true
- uses: actions-rs/toolchain@v1
if: ${{ matrix.os == 'macos' }}
with:
toolchain: nightly
target: x86_64-apple-darwin, aarch64-apple-darwin
override: true
- uses: awalsh128/cache-apt-pkgs-action@latest - uses: awalsh128/cache-apt-pkgs-action@latest
if: ${{ matrix.os == 'ubuntu' }} if: ${{ matrix.os == 'ubuntu' }}
with: with:
packages: libasound2-dev libudev-dev packages: libasound2-dev libudev-dev
version: 1.0 version: 1.0
- uses: actions-rs/cargo@v1 - uses: actions-rs/cargo@v1
if: ${{ matrix.os != 'macos' }}
with: with:
command: build command: build
args: --release args: --release
- uses: actions/upload-artifact@v3 - uses: actions-rs/cargo@v1
if: ${{ matrix.os != 'windows' }} if: ${{ matrix.os == 'macos' }}
with: with:
name: gb-emu-${{ matrix.os }} command: build
args: --release --target x86_64-apple-darwin
- uses: actions-rs/cargo@v1
if: ${{ matrix.os == 'macos' }}
with:
command: build
args: --release --target aarch64-apple-darwin
- uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu' }}
with:
name: gb-emu-linux
path: target/release/gb-emu path: target/release/gb-emu
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'windows' }} if: ${{ matrix.os == 'windows' }}
with: with:
name: gb-emu-${{ matrix.os }} name: gb-emu-windows
path: target/release/gb-emu.exe 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

View file

@ -3,7 +3,7 @@ name: Build VST
on: on:
push: push:
branches: [ "main" ] branches: [ "main" ]
paths: ["gb-vst/**", "lib/**", "vendored/**"] paths: ["gb-vst/**", "lib/**", "vendored/**", "Cargo.toml"]
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
@ -24,9 +24,16 @@ jobs:
url: 'https://github.com/trash80/mGB/raw/master/Releases/mGB1_3_1.gb' url: 'https://github.com/trash80/mGB/raw/master/Releases/mGB1_3_1.gb'
target: test-roms/ target: test-roms/
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
if: ${{ matrix.os != 'macos' }}
with: with:
toolchain: nightly toolchain: nightly
override: true override: true
- uses: actions-rs/toolchain@v1
if: ${{ matrix.os == 'macos' }}
with:
toolchain: nightly
target: x86_64-apple-darwin, aarch64-apple-darwin
override: true
- uses: awalsh128/cache-apt-pkgs-action@latest - uses: awalsh128/cache-apt-pkgs-action@latest
if: ${{ matrix.os == 'ubuntu' }} if: ${{ matrix.os == 'ubuntu' }}
with: with: