diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci.yaml | 51 | ||||
-rw-r--r-- | .github/workflows/rustdoc.yaml | 39 |
2 files changed, 60 insertions, 30 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 | ||