attempt to fix pr preview ci (#7) #118
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
# generated by nickel/ci.ncl; do not manually edit | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTDOCFLAGS: --deny warnings | |
RUSTFLAGS: --deny warnings | |
jobs: | |
assert_nickels_synced_: | |
name: assert_nickels_synced_ | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: install nix | |
uses: cachix/install-nix-action@v30 | |
- name: nickel binary cache | |
uses: cachix/cachix-action@v15 | |
with: | |
name: tweag-nickel | |
- name: install nickel | |
run: |- | |
nix profile install github:tweag/nickel | |
echo "$HOME/.nix-profile/bin" >> $GITHUB_PATH | |
nickel --version | |
- name: install just | |
uses: extractions/setup-just@v2 | |
- name: assert nickels synced | |
run: |- | |
just format_nickels sync_nickels | |
[[ -n $(git status --porcelain) ]] && echo 'nickels are not synced; run `just format_nickels sync_nickels`' && exit 1 || exit 0 | |
check_all_features: | |
name: check_all_features | |
needs: assert_nickels_synced_ | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: install rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: install bevy dependencies | |
run: sudo apt-get update && sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev | |
shell: bash | |
- name: populated target directory from cache | |
uses: Leafwing-Studios/cargo-cache@v2 | |
with: | |
sweep-cache: true | |
- name: install just | |
uses: extractions/setup-just@v2 | |
- name: install binstall | |
uses: cargo-bins/cargo-binstall@main | |
- name: install cargo all features | |
run: cargo binstall --no-confirm cargo-all-features | |
- name: check all features | |
run: just check_all_features | |
clippy: | |
name: clippy | |
needs: assert_nickels_synced_ | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: install rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
components: clippy | |
toolchain: stable | |
- name: install bevy dependencies | |
run: sudo apt-get update && sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev | |
shell: bash | |
- name: populated target directory from cache | |
uses: Leafwing-Studios/cargo-cache@v2 | |
with: | |
sweep-cache: true | |
- name: install just | |
uses: extractions/setup-just@v2 | |
- name: run clippy | |
run: just clippy | |
docs: | |
name: docs | |
needs: assert_nickels_synced_ | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: install rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
- name: install bevy dependencies | |
run: sudo apt-get update && sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev | |
shell: bash | |
- name: populated target directory from cache | |
uses: Leafwing-Studios/cargo-cache@v2 | |
with: | |
sweep-cache: true | |
- name: install just | |
uses: extractions/setup-just@v2 | |
- name: check docs | |
run: just doc | |
format: | |
name: format | |
needs: assert_nickels_synced_ | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: install rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
components: rustfmt | |
toolchain: nightly | |
- name: install just | |
uses: extractions/setup-just@v2 | |
- name: run format | |
run: just format -- --check | |
test: | |
name: test | |
needs: assert_nickels_synced_ | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: install rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: install bevy dependencies | |
run: sudo apt-get update && sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev | |
shell: bash | |
- name: populated target directory from cache | |
uses: Leafwing-Studios/cargo-cache@v2 | |
with: | |
sweep-cache: true | |
- name: install just | |
uses: extractions/setup-just@v2 | |
- name: run tests | |
run: just test | |
name: ci | |
on: push |