diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci.yaml | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index abdec602e..e7e0d599e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml | |||
@@ -18,6 +18,8 @@ jobs: | |||
18 | RUSTFLAGS: -D warnings | 18 | RUSTFLAGS: -D warnings |
19 | CARGO_INCREMENTAL: 0 | 19 | CARGO_INCREMENTAL: 0 |
20 | RUN_SLOW_TESTS: 1 | 20 | RUN_SLOW_TESTS: 1 |
21 | RUSTUP_MAX_RETRIES: 10 | ||
22 | CARGO_NET_RETRY: 10 | ||
21 | steps: | 23 | steps: |
22 | 24 | ||
23 | - name: Checkout repository | 25 | - name: Checkout repository |
@@ -39,7 +41,19 @@ jobs: | |||
39 | override: true | 41 | override: true |
40 | components: rustfmt, rust-src | 42 | components: rustfmt, rust-src |
41 | 43 | ||
42 | - name: Cargo target cache | 44 | - name: Cache cargo registry |
45 | uses: actions/cache@v1 | ||
46 | with: | ||
47 | path: ~/.cargo/registry | ||
48 | key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
49 | |||
50 | - name: Cache cargo index | ||
51 | uses: actions/cache@v1 | ||
52 | with: | ||
53 | path: ~/.cargo/git | ||
54 | key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
55 | |||
56 | - name: Cache cargo target dir | ||
43 | uses: actions/cache@v1 | 57 | uses: actions/cache@v1 |
44 | with: | 58 | with: |
45 | path: target | 59 | path: target |
@@ -56,28 +70,13 @@ jobs: | |||
56 | with: | 70 | with: |
57 | command: test | 71 | command: test |
58 | 72 | ||
59 | - name: Prepare build directory for cache (UNIX) | 73 | - name: Prepare cache |
60 | if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | 74 | run: cargo xtask pre-cache |
61 | run: | | ||
62 | find ./target/debug -maxdepth 1 -type f -delete \ | ||
63 | && rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} \ | ||
64 | && rm -f ./target/.rustc_info.json \ | ||
65 | && rm ./target/.slow_tests_cookie | ||
66 | 75 | ||
67 | - name: Prepare build directory for cache (Windows) | 76 | - name: Prepare cache 2 |
68 | if: matrix.os == 'windows-latest' | 77 | if: matrix.os == 'windows-latest' |
69 | run: >- | 78 | run: Remove-Item ./target/debug/xtask.exe |
70 | (Get-ChildItem ./target/debug -Recurse -Depth 1 -File | Remove-Item) -and | 79 | |
71 | (Remove-Item -Force -Recurse ./target/debug/deps/*ra_*) -and | ||
72 | (Remove-Item -Force -Recurse ./target/debug/deps/*heavy_test*) -and | ||
73 | (Remove-Item -Force -Recurse ./target/debug/deps/*gen_lsp*) -and | ||
74 | (Remove-Item -Force -Recurse ./target/debug/deps/*thread_worker*) -and | ||
75 | (Remove-Item -Force -Recurse ./target/debug/.fingerprint/*ra_*) -and | ||
76 | (Remove-Item -Force -Recurse ./target/debug/.fingerprint/*heavy_test*) -and | ||
77 | (Remove-Item -Force -Recurse ./target/debug/.fingerprint/*gen_lsp*) -and | ||
78 | (Remove-Item -Force -Recurse ./target/debug/.fingerprint/*thread_worker*) -and | ||
79 | (Remove-Item -Force ./target/.rustc_info.json) -and | ||
80 | (Remove-Item ./target/.slow_tests_cookie) | ||
81 | 80 | ||
82 | type-script: | 81 | type-script: |
83 | name: TypeScript | 82 | name: TypeScript |