diff --git a/.github/workflows/build-emu.yml b/.github/workflows/build-emu.yml index c9e999a..d1b2024 100644 --- a/.github/workflows/build-emu.yml +++ b/.github/workflows/build-emu.yml @@ -3,14 +3,17 @@ name: Build Emulator on: push: branches: [ "main" ] - # paths: ["gb-emu/**", "lib/**", "vendored/**"] + paths: ["gb-emu/**", "lib/**", "vendored/**"] env: CARGO_TERM_COLOR: always jobs: - build-linux: - runs-on: ubuntu-latest + build: + runs-on: ${{ matrix.os }}-latest + strategy: + matrix: + os: [ubuntu, macos, windows] steps: - uses: actions/checkout@v3 @@ -18,7 +21,6 @@ jobs: with: toolchain: nightly override: true - target: aarch64-unknown-linux-gnu, x86_64-unknown-linux-gnu - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: libasound2-dev libudev-dev @@ -26,44 +28,15 @@ jobs: - run: git submodule update --init --recursive - uses: actions-rs/cargo@v1 with: - use-cross: true command: build - args: --release --target aarch64-unknown-linux-gnu - - uses: actions-rs/cargo@v1 + args: --release + - uses: actions/upload-artifact@v3 + if: ${{ matrix.os }} != windows with: - use-cross: true - command: build - args: --release --target x86_64-unknown-linux-gnu - - - build-mac: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 + name: gb-emu-${{ matrix.os }} + path: target/release/gb-emu + - uses: actions/upload-artifact@v3 + if: ${{ matrix.os }} == windows with: - toolchain: nightly - override: true - - run: git submodule update --init --recursive - - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true - - run: git submodule update --init --recursive - - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - \ No newline at end of file + name: gb-emu-${{ matrix.os }} + path: target/release/gb-emu.exe \ No newline at end of file diff --git a/.github/workflows/build-vst.yml b/.github/workflows/build-vst.yml index 8979b08..c0ef55d 100644 --- a/.github/workflows/build-vst.yml +++ b/.github/workflows/build-vst.yml @@ -9,32 +9,35 @@ env: CARGO_TERM_COLOR: always jobs: - build-linux: - runs-on: ubuntu-latest + build: + runs-on: ${{ matrix.os }}-latest + strategy: + matrix: + os: [ubuntu, macos, windows] steps: - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: libasound2-dev libudev-dev xorg-dev libjack-jackd2-dev version: 1.0 - run: rustup update nightly && rustup default nightly - run: git submodule update --init --recursive - - run: cargo xtask bundle-universal vst --verbose --release - - build-mac: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - run: git submodule update --init --recursive - - run: cargo xtask bundle-universal vst --verbose --release - - build-windows: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - - run: git submodule update --init --recursive - - run: cargo xtask bundle vst --verbose --release - \ No newline at end of file + - uses: actions-rs/cargo@v1 + if: ${{ matrix.os }} != macos + with: + command: xtask + args: bundle vst --release + - uses: actions-rs/cargo@v1 + if: ${{ matrix.os }} == macos + with: + command: xtask + args: bundle-universal vst --release + - uses: actions/upload-artifact@v3 + with: + name: gb-vst-${{ matrix.os }}.vst3 + path: target/bundled/vst.vst3 \ No newline at end of file