From 4b4e2593175e004d720d915ff86fa002b5e5670f Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Thu, 28 Nov 2024 08:55:14 -0600 Subject: [PATCH] Diversion: Add an Act workflow file --- .gitea/workflows/basic.yml | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitea/workflows/basic.yml diff --git a/.gitea/workflows/basic.yml b/.gitea/workflows/basic.yml new file mode 100644 index 0000000..d9a9632 --- /dev/null +++ b/.gitea/workflows/basic.yml @@ -0,0 +1,46 @@ +permissions: + contents: read +on: + push: + branches: [trunk] + pull_request: +name: Basic checks +jobs: + stable-build-lint-test: + runs-on: ubuntu-latest + name: Basic build-and-test supertask + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Install Rust Stable + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt clippy + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev + - name : cargo generate-lockfile + if: hashFiles('Cargo.lock') == '' + run: cargo generate-lockfile + - name: cargo fmt --check + run: cargo fmt --check + - name: cargo check + id: cargo_check + run: cargo check --locked + - name: cargo build + id: cargo_build + if: steps.cargo_check.outcome == 'success' + run: cargo build --locked --release + - name: cargo test + id: cargo_test + if: steps.cargo_build.outcome == 'success' + run: cargo test --locked --release + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: roberts-bad-asteroids-game + path: target/release/asteroids + if-no-files-found: 'error' + retention-days: 1 + compression-level: 9 + overwrite: true