Skip to content

[GEN] restrict 68000 access to audio RAM when the Z80 is on the bus o… #810

[GEN] restrict 68000 access to audio RAM when the Z80 is on the bus o…

[GEN] restrict 68000 access to audio RAM when the Z80 is on the bus o… #810

Workflow file for this run

name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
JGENESIS_VERSION: 0.8.4
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest stable Rust toolchain
run: |
rustup update
- name: Install latest nightly Rust toolchain
run: |
rustup toolchain add nightly --component rustfmt --component rust-src
- name: Install system library dependencies
run: |
sudo apt update && sudo apt install -y libsdl2-dev
- name: Check formatting
run: |
cargo +nightly fmt --check
- name: Build
run: |
cargo build
- name: Check Clippy warnings
run: |
cargo clippy -- -D warnings
- name: Run tests
run: |
cargo test
build-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest stable Rust toolchain
run: |
rustup update
- name: Install latest nightly Rust toolchain
run: |
rustup toolchain add nightly --component rust-src --component clippy
- name: Install wasm-pack
run: |
cargo install wasm-pack
- name: Build web
run: |
cd frontend/jgenesis-web && ./build.sh --dev
- name: Check Clippy warnings for web
run: |
cd frontend/jgenesis-web && cargo +nightly clippy --target wasm32-unknown-unknown
linux-release-appimage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install latest stable Rust toolchain
run: |
rustup update
- name: Install system library dependencies
run: |
sudo apt-get update && sudo apt-get install -y libsdl2-dev
- name: Get latest cargo-packager version
id: get-packager-version
run: |
cargo search cargo-packager | head -1 | cut -d' ' -f3 | sed -re 's/"(.*)"/version=\1/g' >> $GITHUB_OUTPUT
- name: Cache cargo-packager binary
id: packager-cache
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-packager
key: ${{ runner.os }}-${{ steps.get-packager-version.outputs.version }}
- name: Install cargo-packager
if: steps.packager-cache.outputs.cache-hit != 'true'
run: |
cargo install cargo-packager --version ${{ steps.get-packager-version.outputs.version }}
- name: Build AppImage packages
run: |
RUST_LOG=debug cargo packager --profile release-lto -f appimage
- name: Upload CLI AppImage
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-cli-appimage
path: target/release-lto/jgenesis-cli_${{ env.JGENESIS_VERSION }}_x86_64.AppImage
- name: Upload GUI AppImage
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-gui-appimage
path: target/release-lto/jgenesis-gui_${{ env.JGENESIS_VERSION }}_x86_64.AppImage
windows-release:
runs-on: ubuntu-latest
env:
SDL_VERSION: 2.30.9
DXC_RELEASE_TAG: v1.7.2308
DXC_ZIP_FILE: dxc_2023_08_14.zip
steps:
- uses: actions/checkout@v4
- name: Install latest stable Rust toolchain
run: |
rustup update
- name: Install mingw32
run: |
sudo apt-get update && sudo apt-get install -y mingw-w64
- name: Install Windows x64 Rust build target
run: |
rustup target add x86_64-pc-windows-gnu
- name: Download & extract Windows SDL2 libraries
run: |
wget https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL2-devel-$SDL_VERSION-mingw.tar.gz && \
wget https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL2-$SDL_VERSION-win32-x64.zip && \
tar -xzvf SDL2-devel-$SDL_VERSION-mingw.tar.gz && \
unzip SDL2-$SDL_VERSION-win32-x64.zip
- name: Download & extract DirectX shader compiler
run: |
mkdir dxcompiler && \
cd dxcompiler && \
wget https://github.com/microsoft/DirectXShaderCompiler/releases/download/$DXC_RELEASE_TAG/$DXC_ZIP_FILE && \
unzip $DXC_ZIP_FILE
- name: Build CLI release
run: |
RUSTFLAGS=" \
-C target-cpu=x86-64-v2 \
-C link-arg=-ISDL2-$SDL_VERSION/x86_64-w64-mingw32/include \
-C link-arg=-LSDL2-$SDL_VERSION/x86_64-w64-mingw32/lib" \
cargo build --profile release-lto --target x86_64-pc-windows-gnu -p jgenesis-cli
- name: Build GUI release
run: |
RUSTFLAGS=" \
-C target-cpu=x86-64-v2 \
-C link-arg=-ISDL2-$SDL_VERSION/x86_64-w64-mingw32/include \
-C link-arg=-LSDL2-$SDL_VERSION/x86_64-w64-mingw32/lib" \
cargo build --profile release-lto --target x86_64-pc-windows-gnu -p jgenesis-gui
- name: Compress binaries
run: |
mv LICENSE LICENSE-jgenesis.txt && \
mv target/x86_64-pc-windows-gnu/release-lto/*.exe ./ && \
mv dxcompiler/bin/x64/*.dll ./ && \
mv dxcompiler/LICENSE* ./ && \
zip -r jgenesis-${JGENESIS_VERSION}-windows-x86_64.zip LICENSE* README-SDL.txt *.dll jgenesis-cli.exe jgenesis-gui.exe
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: windows-x86_64-exe
path: jgenesis-${{ env.JGENESIS_VERSION }}-windows-x86_64.zip