From 780cc4747e0dbec73b68c251f62b1ee5f09ffa77 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 27 Apr 2023 15:04:34 +0200 Subject: [PATCH 1/5] Try using shared key for rust cache to speedup CI --- .github/workflows/check.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 69642b8d7..5a491e083 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -40,6 +40,9 @@ jobs: - name: Rust Cache uses: Swatinem/rust-cache@v2 + with: + shared-key: "rust" + - name: Build target run: cargo check --target=${{ matrix.target }} --features native-tls/vendored --locked @@ -73,6 +76,9 @@ jobs: - name: Rust Cache uses: Swatinem/rust-cache@v2 + with: + shared-key: "rust" + - name: Check target run: cargo test --target=${{ matrix.target }} --locked @@ -195,6 +201,8 @@ jobs: - name: Rust Cache uses: Swatinem/rust-cache@v2 + with: + shared-key: "rust" - name: Use Node.js uses: actions/setup-node@v3 From ac97ad84006dd298d6151eab1e28713e85803c7c Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 27 Apr 2023 15:26:06 +0200 Subject: [PATCH 2/5] try cache linux check --- .github/workflows/check.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5a491e083..db249bbef 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -114,6 +114,11 @@ jobs: toolchain: stable targets: ${{ matrix.target }} + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: "rust" + - name: Install cross run: cargo install cross --locked - name: Check target using cross From 98950493f9b4ccc40a3eb43b0ae02da258b66c26 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 27 Apr 2023 15:45:25 +0200 Subject: [PATCH 3/5] cache dvc, linux unit tests --- .github/workflows/check.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index db249bbef..fc5615256 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -42,6 +42,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" + cache-directories: ".dvc/tmp\n.dvc/" - name: Build target run: cargo check --target=${{ matrix.target }} --features native-tls/vendored --locked @@ -78,6 +79,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" + cache-directories: ".dvc/tmp\n.dvc/" - name: Check target run: cargo test --target=${{ matrix.target }} --locked @@ -118,6 +120,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" + cache-directories: ".dvc/tmp\n.dvc/" - name: Install cross run: cargo install cross --locked @@ -156,6 +159,12 @@ jobs: toolchain: stable targets: ${{ matrix.target }} + - name: Rust Cache + uses: Swatinem/rust-cache@v2 + with: + shared-key: "rust" + cache-directories: ".dvc/tmp\n.dvc/" + - name: Use Node.js uses: actions/setup-node@v3 with: @@ -208,6 +217,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" + cache-directories: ".dvc/tmp\n.dvc/" - name: Use Node.js uses: actions/setup-node@v3 From 6b011a4d926d206abf2c06b47e8bb8cab3206446 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 27 Apr 2023 15:51:53 +0200 Subject: [PATCH 4/5] fix dvc cache path --- .github/workflows/check.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index fc5615256..e59fd1efc 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -42,7 +42,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" - cache-directories: ".dvc/tmp\n.dvc/" + cache-directories: ".dvc/tmp\n.dvc/cache" - name: Build target run: cargo check --target=${{ matrix.target }} --features native-tls/vendored --locked @@ -79,7 +79,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" - cache-directories: ".dvc/tmp\n.dvc/" + cache-directories: ".dvc/tmp\n.dvc/cache" - name: Check target run: cargo test --target=${{ matrix.target }} --locked @@ -120,7 +120,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" - cache-directories: ".dvc/tmp\n.dvc/" + cache-directories: ".dvc/tmp\n.dvc/cache" - name: Install cross run: cargo install cross --locked @@ -163,7 +163,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" - cache-directories: ".dvc/tmp\n.dvc/" + cache-directories: ".dvc/tmp\n.dvc/cache" - name: Use Node.js uses: actions/setup-node@v3 @@ -217,7 +217,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: shared-key: "rust" - cache-directories: ".dvc/tmp\n.dvc/" + cache-directories: ".dvc/tmp\n.dvc/cache" - name: Use Node.js uses: actions/setup-node@v3 From a7460c27f460aefef87a26799b5d6abed8f223c1 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Thu, 27 Apr 2023 16:40:17 +0200 Subject: [PATCH 5/5] dont cache cargo cross builds --- .github/workflows/check.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e59fd1efc..6d93840c2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -116,12 +116,6 @@ jobs: toolchain: stable targets: ${{ matrix.target }} - - name: Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: "rust" - cache-directories: ".dvc/tmp\n.dvc/cache" - - name: Install cross run: cargo install cross --locked - name: Check target using cross @@ -159,12 +153,6 @@ jobs: toolchain: stable targets: ${{ matrix.target }} - - name: Rust Cache - uses: Swatinem/rust-cache@v2 - with: - shared-key: "rust" - cache-directories: ".dvc/tmp\n.dvc/cache" - - name: Use Node.js uses: actions/setup-node@v3 with: