This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 257
89 lines (82 loc) · 2.88 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- '*'
- master
# Managed by bors
- auto
# Run nightly checks to detect possible breakage due to upstream rustc changes
schedule:
- cron: '0 0 * * *'
jobs:
build_and_test:
strategy:
fail-fast: false
matrix:
toolchain:
- x86_64-unknown-linux-gnu
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
include:
- toolchain: x86_64-unknown-linux-gnu
builder: ubuntu-latest
os: linux
- toolchain: x86_64-apple-darwin
builder: macos-latest
os: macos
- toolchain: x86_64-pc-windows-msvc
builder: windows-latest
os: windows
env:
CFG_RELEASE_CHANNEL: nightly
CFG_RELEASE: nightly
RUST_BACKTRACE: 1
RLS_TEST_WAIT_FOR_AGES: 1
name: nightly - ${{ matrix.toolchain }}
runs-on: ${{ matrix.builder }}
steps:
- uses: actions/checkout@v2
- name: Setup latest nightly toolchain
run: bash ci/setup-toolchain.sh
if: github.event_name == 'schedule'
- run: rustup component add rust-src rust-analysis rustc-dev llvm-tools-preview
if: github.event_name != 'schedule'
- run: rustc -vV
- run: cargo build -v
- run: cargo test -v
- run: cargo test -v test_tooltip_std -- --ignored
# Test that we don't regress in-process compilation build
- run: cargo test -v --no-default-features
- run: cargo test -v --manifest-path=rls-analysis/Cargo.toml
- run: cargo test -v --manifest-path=rls-data/Cargo.toml
- run: cargo test -v --manifest-path=rls-ipc/Cargo.toml
- run: cargo test -v --manifest-path=rls-rustc/Cargo.toml
- run: cargo test -v --manifest-path=rls-span/Cargo.toml
- run: cargo test -v --manifest-path=rls-vfs/Cargo.toml
style:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cargo +stable fmt --manifest-path=Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-analysis/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-data/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-ipc/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-rustc/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-span/Cargo.toml -- --check
- run: cargo +stable fmt --manifest-path=rls-vfs/Cargo.toml -- --check
# https://forge.rust-lang.org/infra/docs/bors.html#adding-a-new-repository-to-bors
build_result:
name: bors build finished
runs-on: ubuntu-latest
needs: ["build_and_test"]
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"