diff options
-rw-r--r-- | .github/workflows/ci.yaml | 86 | ||||
-rw-r--r-- | crates/ra_hir/src/generics.rs | 6 |
2 files changed, 89 insertions, 3 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..bafd7752f --- /dev/null +++ b/.github/workflows/ci.yaml | |||
@@ -0,0 +1,86 @@ | |||
1 | name: Continuous integration | ||
2 | on: [pull_request, push] | ||
3 | |||
4 | jobs: | ||
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: xvfb-run --auto-servernum 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 | ||
diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index 9c261eda9..c35482ae8 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs | |||
@@ -22,9 +22,9 @@ use crate::{ | |||
22 | #[derive(Clone, PartialEq, Eq, Debug)] | 22 | #[derive(Clone, PartialEq, Eq, Debug)] |
23 | pub struct GenericParam { | 23 | pub struct GenericParam { |
24 | // FIXME: give generic params proper IDs | 24 | // FIXME: give generic params proper IDs |
25 | pub(crate) idx: u32, | 25 | pub idx: u32, |
26 | pub(crate) name: Name, | 26 | pub name: Name, |
27 | pub(crate) default: Option<Path>, | 27 | pub default: Option<Path>, |
28 | } | 28 | } |
29 | 29 | ||
30 | /// Data about the generic parameters of a function, struct, impl, etc. | 30 | /// Data about the generic parameters of a function, struct, impl, etc. |