nix: replace nix-shell to flake #32
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: Path Tracer | |
on: [push] | |
jobs: | |
test: | |
name: Lint, check format and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Update apt | |
run: sudo apt-get update | |
- name: Install lib csfml | |
run: sudo apt-get install -y libcsfml-dev | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
override: true | |
- name: Load cached target | |
uses: actions/cache@v3 | |
id: cached-cargo-dependencies | |
with: | |
path: target/ | |
key: path-tracer-${{ hashFiles('Cargo.lock') }} | |
- name: Check format | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --check | |
- name: Clippy check | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features -- -D warnings | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --release --verbose |