aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcad97 <[email protected]>2019-11-16 22:26:54 +0000
committerAleksey Kladov <[email protected]>2019-11-18 08:07:47 +0000
commitec5cde91493a4b053aac38a48088abd824bdc0be (patch)
treede09a26a6c6731df22e83dd05d7d990c21405efc
parent5e75ded9fcc3c60c77e98af387dd4a8fe35b0f4f (diff)
Enable github actions ci
-rw-r--r--.github/workflows/ci.yaml86
1 files changed, 86 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 000000000..3a8997726
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,86 @@
1name: Continuous integration
2on: [pull_request, push]
3
4jobs:
5 rust-tests:
6 name: Rust tests
7 runs-on: ubuntu-latest
8 env:
9 RUSTFLAGS: -D warnings
10 CARGO_INCREMENTAL: 0
11 steps:
12 - name: Checkout repository
13 uses: actions/checkout@v1
14 - name: Install Rust toolchain
15 uses: actions-rs/toolchain@v1
16 with:
17 toolchain: stable
18 profile: minimal
19 override: true
20 components: rustfmt, rust-src
21 - name: Generate lockfile
22 uses: actions-rs/cargo@v1
23 with:
24 command: generate-lockfile
25 - name: Cargo target cache
26 uses: actions/cache@v1
27 with:
28 path: target
29 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
30 - name: Compile
31 uses: actions-rs/cargo@v1
32 with:
33 command: test
34 args: --no-run
35 - name: Test
36 uses: actions-rs/cargo@v1
37 with:
38 command: test
39 - name: Prepare build directory for cache
40 run: |
41 find ./target/debug -maxdepth 1 -type f -delete && \
42 rm -fr ./target/debug/{deps,.fingerprint}/{*ra_*,*heavy_test*,*gen_lsp*,*thread_worker*} && \
43 rm -f ./target/.rustc_info.json
44 vscode-tests:
45 name: VS Code tests
46 runs-on: ubuntu-latest
47 env:
48 CXX: g++-4.9
49 CC: gcc-4.9
50 steps:
51 - name: Checkout repository
52 uses: actions/checkout@v1
53 - name: Install Rust toolchain
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
69 uses: actions/setup-node@v1
70 with:
71 node-version: 12.x
72 - name: Install xvfb
73 run: sudo apt-get install xvfb
74 - run: npm ci
75 working-directory: ./editors/code
76 - run: npm run vscode:prepublish
77 working-directory: ./editors/code
78 - run: npm run travis
79 working-directory: ./editors/code
80 - name: Cleanup xvfb
81 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