From 2ad59e501cc274a15e5942fa841b4e1ca66a2a44 Mon Sep 17 00:00:00 2001 From: speedsx Date: Mon, 29 Sep 2025 22:55:16 +0300 Subject: [PATCH 1/3] Create rust.yml --- .github/workflows/rust.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..9fd45e0 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,22 @@ +name: Rust + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From aeaad619d07947c76d7ae298c28ed0c2b75d2a83 Mon Sep 17 00:00:00 2001 From: speedsx Date: Mon, 29 Sep 2025 23:02:13 +0300 Subject: [PATCH 2/3] Update rust.yml --- .github/workflows/rust.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9fd45e0..08ec7b3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,6 +15,20 @@ jobs: runs-on: ubuntu-latest steps: + - name: Cache cargo dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Check formatting + run: cargo fmt --check + - name: Run clippy + run: cargo clippy -- -D warnings - uses: actions/checkout@v4 - name: Build run: cargo build --verbose From 8a2871be9204ad7625aa6e740e7dabe90ccee091 Mon Sep 17 00:00:00 2001 From: speedsx Date: Mon, 29 Sep 2025 23:04:22 +0300 Subject: [PATCH 3/3] Update rust.yml --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 08ec7b3..1b48b38 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,6 +15,7 @@ jobs: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - name: Cache cargo dependencies uses: actions/cache@v3 with: @@ -29,7 +30,6 @@ jobs: run: cargo fmt --check - name: Run clippy run: cargo clippy -- -D warnings - - uses: actions/checkout@v4 - name: Build run: cargo build --verbose - name: Run tests