Yet another reorg (#7) #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_LOG: info | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Populate target directory from cache | |
uses: Leafwing-Studios/cargo-cache@v2 | |
with: | |
sweep-cache: true | |
- name: Install Bevy dependencies | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev | |
- name: Cargo Check | |
run: RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo check | |
- name: Cargo Build | |
run: cargo build --release --all-features | |
doc: | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Install Bevy dependencies | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev | |
- name: Populate target directory from cache | |
uses: Leafwing-Studios/cargo-cache@v2 | |
with: | |
sweep-cache: true | |
- name: Cargo Doc | |
run: cargo doc --no-deps | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: doc | |
path: target/doc |