2021-04-11 03:58:50 +10:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
2024-02-14 08:49:35 +11:00
|
|
|
merge_group:
|
2021-04-11 03:58:50 +10:00
|
|
|
push:
|
2023-12-06 08:06:39 +11:00
|
|
|
branches: [master]
|
2021-04-11 03:58:50 +10:00
|
|
|
pull_request:
|
2023-12-06 08:06:39 +11:00
|
|
|
branches: [master]
|
2022-09-16 07:44:57 +10:00
|
|
|
schedule:
|
2023-12-06 08:06:39 +11:00
|
|
|
- cron: "10 6 * * *"
|
2021-04-11 03:58:50 +10:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
2024-01-13 21:06:12 +11:00
|
|
|
# RUSTUP_TOOLCHAIN: ${{ !github.event.schedule && 'nightly-2023-12-01' || 'nightly' }}
|
2024-01-13 21:36:10 +11:00
|
|
|
RUSTUP_TOOLCHAIN: "nightly"
|
2021-04-11 03:58:50 +10:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-08-03 08:04:25 +10:00
|
|
|
name: Just CI
|
2023-08-13 20:36:09 +10:00
|
|
|
runs-on: ubuntu-22.04
|
2021-04-11 04:03:55 +10:00
|
|
|
steps:
|
2023-12-06 08:06:39 +11:00
|
|
|
- name: Set CARGO_TARGET_DIR
|
|
|
|
run: echo "CARGO_TARGET_DIR=$HOME/target" >> $GITHUB_ENV
|
|
|
|
- name: Install build tools
|
|
|
|
run: sudo apt-get update && sudo apt-get install build-essential libelf-dev zip -y
|
|
|
|
- name: Install Miri
|
|
|
|
run: |
|
2023-12-06 08:12:36 +11:00
|
|
|
rustup component add miri clippy rustfmt
|
2023-04-24 03:06:52 +10:00
|
|
|
cargo miri setup
|
2023-12-06 08:06:39 +11:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Cache
|
2024-01-18 04:22:50 +11:00
|
|
|
uses: actions/cache@v4
|
2023-12-06 08:06:39 +11:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
~/target
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: install mgba-test-runner
|
|
|
|
run: cargo install --path emulator/test-runner --verbose
|
2024-02-28 09:04:35 +11:00
|
|
|
- uses: extractions/setup-just@v2
|
2023-12-06 08:06:39 +11:00
|
|
|
- name: Setup mdBook
|
2024-04-09 05:55:29 +10:00
|
|
|
uses: peaceiris/actions-mdbook@v2
|
2023-12-06 08:06:39 +11:00
|
|
|
with:
|
|
|
|
mdbook-version: "0.4.13"
|
|
|
|
- name: Build and test all crates
|
|
|
|
run: just ci
|
|
|
|
- name: Upload build artifacts
|
2023-12-29 09:39:14 +11:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-12-06 08:06:39 +11:00
|
|
|
with:
|
|
|
|
name: example-games
|
|
|
|
path: ~/target/*.gba
|