-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: persist Rust caches for Pip package build #4480
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,6 +116,20 @@ jobs: | |
with: | ||
python-version: '3.8' | ||
architecture: 'x64' | ||
- name: 'Cache Cargo home directory' | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
tensorboard/data/server/target/ | ||
# https://doc.rust-lang.org/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
# Needed for installing binaries with cache | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't quite understand this comment. Could you elaborate slightly? Update: read the other version of this comment which mentions There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Elaborated. This is needed only if you We don’t actually need it for this job. I kept it to reduce headache in |
||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
key: build-data-server-pip-${{ runner.os }}-cargo-${{ matrix.rust_version }}-${{ hashFiles('**/Cargo.lock', '.github/workflows/ci.yml') }} | ||
- name: 'Install Rust toolchain' | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
|
@@ -214,7 +228,7 @@ jobs: | |
# Needed for installing binaries (`cargo-raze`) with cache | ||
~/.cargo/.crates.toml | ||
~/.cargo/.crates2.json | ||
key: ${{ runner.os }}-cargo-${{ matrix.rust_version }}-${{ matrix.cargo_raze_version }}-${{ hashFiles('**/Cargo.lock', '.github/workflows/ci.yml') }} | ||
key: lint-rust-${{ runner.os }}-cargo-${{ matrix.rust_version }}-${{ matrix.cargo_raze_version }}-${{ hashFiles('**/Cargo.lock', '.github/workflows/ci.yml') }} | ||
- name: 'Install Rust toolchain' | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also includes
tensorboard/data/server/target/
which isn't the Cargo home directory (as I understand it) - maybe broaden description slightly?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, yes. Renamed in both cases. (I think “Cargo artifacts” is probably
fine, since it’s Cargo (not rustc) that sets up this structure. But
happy to entertain other suggestions.)