From 2c0253ff50f6bd9b35cb3b3addee3d731a8c2937 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Fri, 7 Apr 2023 08:54:07 +1000 Subject: [PATCH] workflow updates --- .github/workflows/build-emu.yml | 25 +++++++++---------------- .github/workflows/build-vst.yml | 20 ++++++++------------ 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-emu.yml b/.github/workflows/build-emu.yml index 50034b5..db83a5b 100644 --- a/.github/workflows/build-emu.yml +++ b/.github/workflows/build-emu.yml @@ -18,32 +18,25 @@ jobs: steps: - uses: actions/checkout@v3 - run: git submodule update --init --recursive - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true + - 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 - - uses: actions-rs/cargo@v1 + - run: cargo build --release if: ${{ matrix.os != 'macos' }} - with: - command: build - args: --release - - uses: actions-rs/cargo@v1 + - run: cargo build --release --target x86_64-apple-darwin if: ${{ matrix.os == 'macos' }} - with: - command: build - args: --release --target x86_64-apple-darwin - - uses: actions-rs/cargo@v1 + - run: cargo build --release --target aarch64-apple-darwin if: ${{ matrix.os == 'macos' }} - with: - command: build - args: --release --target aarch64-apple-darwin - uses: actions/upload-artifact@v3 if: ${{ matrix.os == 'ubuntu' }} with: diff --git a/.github/workflows/build-vst.yml b/.github/workflows/build-vst.yml index 407fb6c..81cbfe6 100644 --- a/.github/workflows/build-vst.yml +++ b/.github/workflows/build-vst.yml @@ -23,27 +23,23 @@ jobs: with: url: 'https://github.com/trash80/mGB/raw/master/mGB.gb' target: test-roms/ - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - override: true + - 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: vst-${{ matrix.os }} - 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 - - uses: actions-rs/cargo@v1 + - run: cargo xtask bundle vst --release if: ${{ matrix.os != 'macos' }} - with: - command: xtask - args: bundle vst --release - - uses: actions-rs/cargo@v1 + - run: cargo xtask bundle-universal vst --release if: ${{ matrix.os == 'macos' }} - with: - command: xtask - args: bundle-universal vst --release - uses: actions/upload-artifact@v3 with: name: gb-vst-${{ matrix.os }}.vst3