diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 92ccb3b8..884f8426 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,17 +18,21 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Cache Cargo registry + uses: actions/cache@v4 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-registry- + - name: Cache Cargo index + uses: actions/cache@v4 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo-index- - name: Install Rust uses: actions-rs/toolchain@v1 with: toolchain: stable - name: Build - run: cargo build --release --verbose - - name: Move linutil binary - run: mv target/release/linutil linutil - - name: Replace linutil binary - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "Replace linutil binary" - file_pattern: ./linutil - commit_options: "--allow-empty --no-verify" \ No newline at end of file + run: cargo build --release --verbose \ No newline at end of file