diff options
author | Aleksey Kladov <[email protected]> | 2020-01-07 09:54:11 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-07 09:54:11 +0000 |
commit | 8f1792fde233799fe3335032834ee7281d78e55b (patch) | |
tree | d6e221292d06022e30723299fbe87be8a8b98ef6 | |
parent | 7b9df1062d65e6977f16d6595ffb5912769011a3 (diff) | |
parent | 0de029c466f6b7a18e8ec633fc34e93881b25774 (diff) |
Merge pull request #2725 from kiljacken/actions-matrix
Run tests on ubuntu, windows and macos
-rw-r--r-- | .github/workflows/ci.yaml | 31 | ||||
-rw-r--r-- | bors.toml | 7 |
2 files changed, 35 insertions, 3 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: | |||
10 | jobs: | 10 | jobs: |
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 |
@@ -1,2 +1,7 @@ | |||
1 | status = ["Rust", "TypeScript"] | 1 | status = [ |
2 | "Rust (ubuntu-latest)", | ||
3 | "Rust (windows-latest)", | ||
4 | "Rust (macos-latest)", | ||
5 | "TypeScript" | ||
6 | ] | ||
2 | delete_merged_branches = true | 7 | delete_merged_branches = true |