fix cargo cache in ci

see https://github.com/actions/cache/issues/133#issuecomment-599102035
This commit is contained in:
Pierric Cistac 2020-03-18 15:35:14 -04:00
parent 61294a6db7
commit 0c572097a2
No known key found for this signature in database
GPG Key ID: 9D98B3AF93C7362D
4 changed files with 17 additions and 3 deletions

View File

@ -26,6 +26,10 @@ jobs:
with:
toolchain: stable
# Necessary for now for the cargo cache: https://github.com/actions/cache/issues/133#issuecomment-599102035
- if: matrix.os == 'ubuntu-latest'
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Cache Cargo Registry
uses: actions/cache@v1
with:

View File

@ -18,6 +18,9 @@ jobs:
with:
toolchain: stable
# Necessary for now for the cargo cache: https://github.com/actions/cache/issues/133#issuecomment-599102035
- run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Cache Cargo Registry
uses: actions/cache@v1
with:

View File

@ -38,6 +38,9 @@ jobs:
with:
toolchain: nightly
# Necessary for now for the cargo cache: https://github.com/actions/cache/issues/133#issuecomment-599102035
- run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Cache Cargo Registry
uses: actions/cache@v1
with:

View File

@ -19,6 +19,10 @@ jobs:
components: rustfmt, clippy
override: true
# Necessary for now for the cargo cache: https://github.com/actions/cache/issues/133#issuecomment-599102035
- if: matrix.os == 'ubuntu-latest'
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
- name: Cache Cargo Registry
uses: actions/cache@v1
with:
@ -41,19 +45,19 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ./tokenizers/Cargo.toml -- --check
args: --manifest-path ./tokenizers/Cargo.toml -- --check
- name: Lint Benchmarks with RustFmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ./tokenizers/Cargo.toml -- ./tokenizers/benches/bpe_benchmark.rs --check
args: --manifest-path ./tokenizers/Cargo.toml -- ./tokenizers/benches/bpe_benchmark.rs --check
- name: Lint with Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path ./tokenizers/Cargo.toml --all-targets --all-features -- -D warnings
args: --manifest-path ./tokenizers/Cargo.toml --all-targets --all-features -- -D warnings
- name: Run Tests
uses: actions-rs/cargo@v1