aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/rust.yml
blob: 1432e9574817b9fff70f429f28f3a0ae4f2878ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Rust

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - run: sudo apt-get install -yqq alsa libasound2-dev libudev-dev
    - name: Download assembler
      run: wget https://github.com/AstatinChan/gameboy-asm/releases/download/latest/gbasm_linux-x86_64
    - name: Make assembler executable
      run: chmod +x gbasm_linux-x86_64
    - name: Build BootROM
      run: ./gbasm_linux-x86_64 assets/Astatin-bootrom.gbasm assets/dmg_boot.bin
    - name: Build Emulator
      run: cargo build --release --verbose
    - name: Rename to clarify OS & architecture
      run: mv target/release/emulator gb_linux-x86_64
    - uses: "marvinpinto/action-automatic-releases@latest"
      with:
        repo_token: "${{ secrets.GITHUB_TOKEN }}"
        automatic_release_tag: "latest"
        prerelease: true
        title: "Development Build"
        files: |
          gb_linux-x86_64