diff options
-rw-r--r-- | .github/workflows/ci.yaml | 51 | ||||
-rw-r--r-- | .github/workflows/rustdoc.yaml | 39 | ||||
-rw-r--r-- | .travis.yml | 64 | ||||
-rw-r--r-- | bors.toml | 4 |
4 files changed, 61 insertions, 97 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bafd7752f..b70d005fb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml | |||
@@ -1,16 +1,23 @@ | |||
1 | name: Continuous integration | 1 | name: CI |
2 | on: [pull_request, push] | 2 | on: |
3 | pull_request: | ||
4 | push: | ||
5 | branches: | ||
6 | - master | ||
7 | - staging | ||
3 | 8 | ||
4 | jobs: | 9 | jobs: |
5 | rust-tests: | 10 | rust: |
6 | name: Rust tests | 11 | name: Rust |
7 | runs-on: ubuntu-latest | 12 | runs-on: ubuntu-latest |
8 | env: | 13 | env: |
9 | RUSTFLAGS: -D warnings | 14 | RUSTFLAGS: -D warnings |
10 | CARGO_INCREMENTAL: 0 | 15 | CARGO_INCREMENTAL: 0 |
11 | steps: | 16 | steps: |
17 | |||
12 | - name: Checkout repository | 18 | - name: Checkout repository |
13 | uses: actions/checkout@v1 | 19 | uses: actions/checkout@v1 |
20 | |||
14 | - name: Install Rust toolchain | 21 | - name: Install Rust toolchain |
15 | uses: actions-rs/toolchain@v1 | 22 | uses: actions-rs/toolchain@v1 |
16 | with: | 23 | with: |
@@ -18,31 +25,32 @@ jobs: | |||
18 | profile: minimal | 25 | profile: minimal |
19 | override: true | 26 | override: true |
20 | components: rustfmt, rust-src | 27 | components: rustfmt, rust-src |
21 | - name: Generate lockfile | 28 | |
22 | uses: actions-rs/cargo@v1 | ||
23 | with: | ||
24 | command: generate-lockfile | ||
25 | - name: Cargo target cache | 29 | - name: Cargo target cache |
26 | uses: actions/cache@v1 | 30 | uses: actions/cache@v1 |
27 | with: | 31 | with: |
28 | path: target | 32 | path: target |
29 | key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | 33 | key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} |
34 | |||
30 | - name: Compile | 35 | - name: Compile |
31 | uses: actions-rs/cargo@v1 | 36 | uses: actions-rs/cargo@v1 |
32 | with: | 37 | with: |
33 | command: test | 38 | command: test |
34 | args: --no-run | 39 | args: --no-run |
40 | |||
35 | - name: Test | 41 | - name: Test |
36 | uses: actions-rs/cargo@v1 | 42 | uses: actions-rs/cargo@v1 |
37 | with: | 43 | with: |
38 | command: test | 44 | command: test |
45 | |||
39 | - name: Prepare build directory for cache | 46 | - name: Prepare build directory for cache |
40 | run: | | 47 | run: | |
41 | find ./target/debug -maxdepth 1 -type f -delete && \ | 48 | find ./target/debug -maxdepth 1 -type f -delete && \ |
42 | rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} && \ | 49 | rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} && \ |
43 | rm -f ./target/.rustc_info.json | 50 | rm -f ./target/.rustc_info.json |
44 | vscode-tests: | 51 | |
45 | name: VS Code tests | 52 | type-script: |
53 | name: TypeScript | ||
46 | runs-on: ubuntu-latest | 54 | runs-on: ubuntu-latest |
47 | env: | 55 | env: |
48 | CXX: g++-4.9 | 56 | CXX: g++-4.9 |
@@ -50,25 +58,12 @@ jobs: | |||
50 | steps: | 58 | steps: |
51 | - name: Checkout repository | 59 | - name: Checkout repository |
52 | uses: actions/checkout@v1 | 60 | uses: actions/checkout@v1 |
53 | - name: Install Rust toolchain | 61 | |
54 | uses: actions-rs/toolchain@v1 | ||
55 | with: | ||
56 | toolchain: stable | ||
57 | profile: minimal | ||
58 | override: true | ||
59 | - name: Generate lockfile | ||
60 | uses: actions-rs/cargo@v1 | ||
61 | with: | ||
62 | command: generate-lockfile | ||
63 | - name: Cargo target cache | ||
64 | uses: actions/cache@v1 | ||
65 | with: | ||
66 | path: target | ||
67 | key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
68 | - name: Install Nodejs | 62 | - name: Install Nodejs |
69 | uses: actions/setup-node@v1 | 63 | uses: actions/setup-node@v1 |
70 | with: | 64 | with: |
71 | node-version: 12.x | 65 | node-version: 12.x |
66 | |||
72 | - name: Install xvfb | 67 | - name: Install xvfb |
73 | run: sudo apt-get install xvfb | 68 | run: sudo apt-get install xvfb |
74 | - run: npm ci | 69 | - run: npm ci |
@@ -77,10 +72,6 @@ jobs: | |||
77 | working-directory: ./editors/code | 72 | working-directory: ./editors/code |
78 | - run: xvfb-run --auto-servernum npm run travis | 73 | - run: xvfb-run --auto-servernum npm run travis |
79 | working-directory: ./editors/code | 74 | working-directory: ./editors/code |
75 | |||
80 | - name: Cleanup xvfb | 76 | - name: Cleanup xvfb |
81 | uses: bcomnes/cleanup-xvfb@v1 | 77 | uses: bcomnes/cleanup-xvfb@v1 |
82 | - name: Prepare build directory for cache | ||
83 | run: | | ||
84 | find ./target/debug -maxdepth 1 -type f -delete && \ | ||
85 | rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} && \ | ||
86 | rm -f ./target/.rustc_info.json | ||
diff --git a/.github/workflows/rustdoc.yaml b/.github/workflows/rustdoc.yaml new file mode 100644 index 000000000..caa1dcc30 --- /dev/null +++ b/.github/workflows/rustdoc.yaml | |||
@@ -0,0 +1,39 @@ | |||
1 | name: rustdoc | ||
2 | on: | ||
3 | push: | ||
4 | branches: | ||
5 | - master | ||
6 | |||
7 | jobs: | ||
8 | rustdoc: | ||
9 | runs-on: ubuntu-latest | ||
10 | env: | ||
11 | RUSTFLAGS: -D warnings | ||
12 | CARGO_INCREMENTAL: 0 | ||
13 | |||
14 | steps: | ||
15 | - name: Checkout repository | ||
16 | uses: actions/checkout@v1 | ||
17 | |||
18 | - name: Install Rust toolchain | ||
19 | uses: actions-rs/toolchain@v1 | ||
20 | with: | ||
21 | toolchain: stable | ||
22 | profile: minimal | ||
23 | override: true | ||
24 | components: rustfmt, rust-src | ||
25 | |||
26 | - name: Build Documentation | ||
27 | uses: actions-rs/cargo@v1 | ||
28 | with: | ||
29 | command: doc | ||
30 | args: --all --no-deps | ||
31 | |||
32 | - name: Deploy Docs | ||
33 | uses: peaceiris/[email protected] | ||
34 | env: | ||
35 | ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | ||
36 | PUBLISH_BRANCH: gh-pages | ||
37 | PUBLISH_DIR: ./target/doc | ||
38 | with: | ||
39 | forceOrphan: true | ||
diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index af71a9cce..000000000 --- a/.travis.yml +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | cache: cargo | ||
2 | before_cache: | ||
3 | - find ./target/debug -maxdepth 1 -type f -delete | ||
4 | - rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} | ||
5 | - rm -f ./target/.rustc_info.json | ||
6 | |||
7 | matrix: | ||
8 | include: | ||
9 | - name: "Rust Tests" | ||
10 | os: linux | ||
11 | dist: xenial | ||
12 | language: rust | ||
13 | rust: stable | ||
14 | script: | ||
15 | - rustup component add rustfmt | ||
16 | - rustup component add rust-src | ||
17 | - cargo test --no-run # let's measure compile time separately | ||
18 | - cargo test | ||
19 | env: | ||
20 | - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 | ||
21 | |||
22 | - name: "Rust Docs" | ||
23 | os: linux | ||
24 | if: branch = master AND type = push | ||
25 | before_script: | ||
26 | - DEPLOY_DOCS=1 | ||
27 | language: rust | ||
28 | rust: stable | ||
29 | script: | ||
30 | - cargo doc --all --no-deps | ||
31 | env: | ||
32 | - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 | ||
33 | |||
34 | - name: "VS Code Tests" | ||
35 | os: linux | ||
36 | language: node_js | ||
37 | dist: xenial | ||
38 | node_js: node | ||
39 | services: | ||
40 | - xvfb | ||
41 | before_install: cd editors/code | ||
42 | install: | ||
43 | - npm ci | ||
44 | - npm run vscode:prepublish | ||
45 | script: | ||
46 | - npm run travis | ||
47 | env: | ||
48 | - CXX="g++-4.9", CC="gcc-4.9" | ||
49 | |||
50 | branches: | ||
51 | only: | ||
52 | - staging | ||
53 | - master | ||
54 | - trying | ||
55 | |||
56 | deploy: | ||
57 | provider: pages | ||
58 | skip-cleanup: true | ||
59 | github-token: $DOCS_TOKEN # Set in the settings page of your repository, as a secure variable | ||
60 | keep-history: false | ||
61 | local-dir: target/doc | ||
62 | on: | ||
63 | branch: master | ||
64 | condition: $DEPLOY_DOCS = 1 | ||
@@ -1,4 +1,2 @@ | |||
1 | status = [ | 1 | status = ["CI / Rust", "CI / TypeScript"] |
2 | "continuous-integration/travis-ci/push", | ||
3 | ] | ||
4 | delete_merged_branches = true | 2 | delete_merged_branches = true |