From 46174c27aea66328b5ac66f42454254133d082af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20=C3=96sterberg?= Date: Sun, 19 Jun 2022 17:13:02 +0200 Subject: [PATCH 1/2] Do idiomatic Rust caching as per instructions Do idiomatic caching of Rust project as per official instructions from actions/cache maintainers. --- .github/workflows/rust.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fd3ccc4..0695178 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,9 +24,13 @@ jobs: - uses: actions/cache@v3 id: cache-cargo-fetch with: - key: ${{ runner.os }}-cargo-fetch-${{ hashFiles('Cargo.lock') }} - path: target - restore-keys: ${{ runner.os }}-cargo-fetch + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Fetch Dependencies if: steps.cache-cargo-fetch.outputs.cache-hit != 'true' run: cargo fetch From 1efe0dfff1b063b94744a1e47c87e0ef888ba0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20=C3=96sterberg?= Date: Sun, 19 Jun 2022 17:16:49 +0200 Subject: [PATCH 2/2] Add comment to trigger new build to test cache --- src/gen.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gen.rs b/src/gen.rs index 8603889..c65768d 100644 --- a/src/gen.rs +++ b/src/gen.rs @@ -10,6 +10,7 @@ pub struct FlakeGen { const ADDR_BITS: usize = 48; const SEQ_BITS: usize = 16; +/// TEST! impl FlakeGen { /// Create a new flake ID generator. The creation may fail if it is not possible to find any /// device with a MAC address.