mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-27 07:14:26 +01:00
Merge #288
288: Stop tracking the Cargo.lock and add cache + windows to the CI r=curquiza a=irevoire We reuse the same `~/.cargo` and `./target` directory between each run on the same OS and rust toolchain. The `key` to decide if we can use the cache or not is: `$OS_NAME-$RUST_TOOLCHAIN-$HASH(Cargo.toml)` We also removed the `Cargo.lock` from this repository. Indeed, milli is a library and [should not track the `Cargo.lock`](https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html) And finally, we enabled the tests on `windows-latest`. Since `lmdb` has been updated, this is now possible. Co-authored-by: Tamo <tamo@meilisearch.com>
This commit is contained in:
commit
4ab7ca0e83
38
.github/workflows/rust.yml
vendored
38
.github/workflows/rust.yml
vendored
@ -16,13 +16,21 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-18.04, macos-latest]
|
os: [ubuntu-18.04, macos-latest, windows-latest]
|
||||||
rust:
|
rust:
|
||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
- nightly
|
- nightly
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo
|
||||||
|
./Cargo.lock
|
||||||
|
./target
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.rust }}-${{ hashFiles('Cargo.toml') }}
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
@ -32,34 +40,26 @@ jobs:
|
|||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: check
|
command: check
|
||||||
args: --all --locked
|
args: --all
|
||||||
- name: Run cargo test
|
- name: Run cargo test
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --locked --release
|
args: --release
|
||||||
|
|
||||||
# We don't run test on Windows since we get the following error: There is not enough space on the disk.
|
|
||||||
check-on-windows:
|
|
||||||
name: Cargo check on Windows
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Run cargo check without any default features
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
args: --all --locked
|
|
||||||
- name: Run cargo check with all default features
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
name: Run Rustfmt
|
name: Run Rustfmt
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo
|
||||||
|
./Cargo.lock
|
||||||
|
./target
|
||||||
|
key: ${{ matrix.os }}-${{ matrix.rust}}-${{ hashFiles('Cargo.toml') }}
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
|
3233
Cargo.lock
generated
3233
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
status = [
|
status = [
|
||||||
'Tests on ubuntu-18.04 with stable',
|
'Tests on ubuntu-18.04 with stable',
|
||||||
'Tests on macos-latest with stable',
|
'Tests on macos-latest with stable',
|
||||||
'Cargo check on Windows',
|
'Tests on windows-latest with stable',
|
||||||
'Run Rustfmt',
|
'Run Rustfmt',
|
||||||
]
|
]
|
||||||
# 3 hours timeout
|
# 3 hours timeout
|
||||||
|
Loading…
Reference in New Issue
Block a user