Skip to content

Commit bb044f3

Browse files
committed
Add CI caching
1 parent a125283 commit bb044f3

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ jobs:
4040
- uses: dtolnay/rust-toolchain@stable
4141
with:
4242
targets: ${{ matrix.target }}
43+
- uses: Swatinem/rust-cache@v2
44+
with:
45+
key: ${{ matrix.target }}
4346
- name: Run tests
4447
env:
4548
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deptarget }}
@@ -90,8 +93,18 @@ jobs:
9093
- uses: dtolnay/rust-toolchain@stable
9194
with:
9295
targets: ${{ matrix.target }}
93-
- name: Install cross
96+
- uses: Swatinem/rust-cache@v2
97+
with:
98+
key: ${{ matrix.target }}
99+
- name: Cache cross binary
100+
id: cache-cross
94101
if: matrix.use-cross == true
102+
uses: actions/cache@v4
103+
with:
104+
path: ~/.cargo/bin/cross
105+
key: ${{ runner.os }}-cross-${{ hashFiles('.github/workflows/test.yml') }}
106+
- name: Install cross
107+
if: matrix.use-cross == true && steps.cache-cross.outputs.cache-hit != 'true'
95108
run: cargo install cross --git https://github.com/cross-rs/cross
96109
- name: Build with cross
97110
if: matrix.use-cross == true

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rdp"
3-
version = "0.13.2"
3+
version = "0.13.3"
44
authors = ["Stephan Hügel <urschrei@gmail.com>"]
55
description = "An FFI wrapper for the Ramer–Douglas–Peucker and Visvalingam-Whyatt algorithms"
66
readme = "README.md"

0 commit comments

Comments
 (0)