Skip to content

Commit a12b467

Browse files
committed
Cache more from Rust/Cargo.
1 parent 2622c03 commit a12b467

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/check.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ jobs:
3838
# Checks-out your repository under $GITHUB_WORKSPACE for the job.
3939
- uses: actions/checkout@v2
4040

41+
# Per https://github.com/actions/cache/blob/c7c46bcb6db3c571021a3a2dc2d2557b512ecace/examples.md#rust---cargo.
42+
- uses: actions/cache@v2
43+
with:
44+
path: |
45+
~/.cargo/bin/
46+
~/.cargo/registry/index/
47+
~/.cargo/registry/cache/
48+
~/.cargo/git/db/
49+
plugin/build/resources/test/target
50+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
51+
4152
- name: Setup Rust
4253
run: |
4354
rustup toolchain install stable
@@ -77,14 +88,17 @@ jobs:
7788
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
7889
- uses: actions/checkout@v2
7990

80-
# # Sets up the NDK required by AGP 3.6.x
81-
# - name: Setup NDK
82-
# run: sudo $ANDROID_HOME/tools/bin/sdkmanager 'ndk;20.0.5594570'
8391

84-
# - name: Install Rustup
85-
# run: |
86-
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
87-
# echo "$HOME/.cargo/bin" >> $GITHUB_PATH
92+
# Per https://github.com/actions/cache/blob/c7c46bcb6db3c571021a3a2dc2d2557b512ecace/examples.md#rust---cargo.
93+
- uses: actions/cache@v2
94+
with:
95+
path: |
96+
~/.cargo/bin/
97+
~/.cargo/registry/index/
98+
~/.cargo/registry/cache/
99+
~/.cargo/git/db/
100+
plugin/build/resources/test/target
101+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
88102

89103
- name: Setup Rust
90104
run: |

0 commit comments

Comments
 (0)