From 30c1b55c93aa30f994cdfc8dcd76e35a601841ed Mon Sep 17 00:00:00 2001 From: timmy Date: Mon, 12 Feb 2024 19:05:46 +0100 Subject: [PATCH] Added Build+test step for multiple OS --- .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..ad3687d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +on: + push: + pull_request: + +name: CI +jobs: + build_and_test: + name: OS Test + strategy: + fail-fast: false + matrix: + rust-version: + - nightly + - stable + os: + - ubuntu-latest + - windows-latest + - macos-latest + runs-on: ${{ matrix.os }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust-version }} + - name: Build + run: cargo build --all --verbose + - name: Test + run: cargo test --all --verbose + lint: + name: Clippy and fmt + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - name: Check formatting + run: cargo fmt --check + - name: Check for clippy lints + run: cargo clippy