From e9337f93de449f2480ba697f90f94a60c64ee7ac Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 10 Jan 2024 20:47:44 +0100 Subject: [PATCH] add cargo workflow --- .gitea/workflows/cargo.yaml | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .gitea/workflows/cargo.yaml diff --git a/.gitea/workflows/cargo.yaml b/.gitea/workflows/cargo.yaml new file mode 100644 index 0000000..0e2e920 --- /dev/null +++ b/.gitea/workflows/cargo.yaml @@ -0,0 +1,56 @@ +name: Rust / Cargo + +on: + push: + branches: + - master + pull_request: + +jobs: + lint: + name: Lint + steps: + - name: Setup | Checkout + uses: actions/checkout@v2 + - name: Setup | Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: stable + components: clippy + - name: Build | Lint + run: cargo clippy + compile: + name: Compile + steps: + - name: Setup | Checkout + uses: actions/checkout@v2 + - name: Setup | Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: stable + - name: Build | Compile + run: cargo check + test: + name: Test + strategy: + matrix: + os: + - ubuntu-latest + - windows-latest + - macOS-latest + rust: + - stable + - beta + - nightly + runs-on: ${{ matrix.os }} + needs: [compile] + steps: + - name: Setup | Checkout + uses: actions/checkout@v2 + - name: Setup | Rust + uses: ATiltedTree/setup-rust@v1 + with: + rust-version: ${{ matrix.rust }} + - name: Build | Compile + run: cargo test +