aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yaml31
1 files changed, 29 insertions, 2 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 1d24295ec..abdec602e 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -10,7 +10,10 @@ on:
10jobs: 10jobs:
11 rust: 11 rust:
12 name: Rust 12 name: Rust
13 runs-on: ubuntu-latest 13 runs-on: ${{ matrix.os }}
14 strategy:
15 matrix:
16 os: [ubuntu-latest, windows-latest, macos-latest]
14 env: 17 env:
15 RUSTFLAGS: -D warnings 18 RUSTFLAGS: -D warnings
16 CARGO_INCREMENTAL: 0 19 CARGO_INCREMENTAL: 0
@@ -20,6 +23,14 @@ jobs:
20 - name: Checkout repository 23 - name: Checkout repository
21 uses: actions/checkout@v1 24 uses: actions/checkout@v1
22 25
26 # We need to disable the existing toolchain to avoid updating rust-docs
27 # which takes a long time. The fastest way to do this is to rename the
28 # existing folder, as deleting it takes about as much time as not doing
29 # anything and just updating rust-docs.
30 - name: Rename existing rust toolchain (Windows)
31 if: matrix.os == 'windows-latest'
32 run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
33
23 - name: Install Rust toolchain 34 - name: Install Rust toolchain
24 uses: actions-rs/toolchain@v1 35 uses: actions-rs/toolchain@v1
25 with: 36 with:
@@ -45,13 +56,29 @@ jobs:
45 with: 56 with:
46 command: test 57 command: test
47 58
48 - name: Prepare build directory for cache 59 - name: Prepare build directory for cache (UNIX)
60 if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
49 run: | 61 run: |
50 find ./target/debug -maxdepth 1 -type f -delete \ 62 find ./target/debug -maxdepth 1 -type f -delete \
51 && rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} \ 63 && rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} \
52 && rm -f ./target/.rustc_info.json \ 64 && rm -f ./target/.rustc_info.json \
53 && rm ./target/.slow_tests_cookie 65 && rm ./target/.slow_tests_cookie
54 66
67 - name: Prepare build directory for cache (Windows)
68 if: matrix.os == 'windows-latest'
69 run: >-
70 (Get-ChildItem ./target/debug -Recurse -Depth 1 -File | Remove-Item) -and
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
55 type-script: 82 type-script:
56 name: TypeScript 83 name: TypeScript
57 runs-on: ubuntu-latest 84 runs-on: ubuntu-latest