From 5e67825cbebb912b0b2d0c8db8531b789f2db9b3 Mon Sep 17 00:00:00 2001 From: Red Artist Date: Sat, 2 Dec 2023 06:28:18 +0530 Subject: [PATCH] add workflows --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..12f166d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +on: [push, pull_request] + +name: check everything +env: + CARGO_INCREMENTAL: 0 +jobs: + cargo-check: + name: cargo-check + runs-on: ${{matrix.os}}-latest + strategy: + matrix: + os: [ubuntu, windows, macos] + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Rust Cache + uses: Swatinem/rust-cache@v1 + + - name: Install dependencies # for glfw and rfd + if: ${{matrix.os == 'ubuntu'}} + run: sudo apt update && sudo apt install --no-install-recommends libglfw3-dev libgtk-3-dev + + - name: Fmt + run: cargo fmt --check + + - name: Check + run: cargo check --workspace + + - name: Clippy + run: cargo clippy --workspace -- -D warnings + + - name: Build + run: cargo build --workspace + + - name: Audit + run: cargo audit \ No newline at end of file