diff options
-rw-r--r-- | .github/workflows/ci.yaml | 3 | ||||
-rw-r--r-- | .github/workflows/release.yaml | 57 |
2 files changed, 15 insertions, 45 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3a2bdb4a6..9c81dd97e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml | |||
@@ -20,7 +20,6 @@ jobs: | |||
20 | RUN_SLOW_TESTS: 1 | 20 | RUN_SLOW_TESTS: 1 |
21 | RUSTUP_MAX_RETRIES: 10 | 21 | RUSTUP_MAX_RETRIES: 10 |
22 | CARGO_NET_RETRY: 10 | 22 | CARGO_NET_RETRY: 10 |
23 | PROFILE: debug | ||
24 | steps: | 23 | steps: |
25 | 24 | ||
26 | - name: Checkout repository | 25 | - name: Checkout repository |
@@ -76,7 +75,7 @@ jobs: | |||
76 | 75 | ||
77 | - name: Prepare cache 2 | 76 | - name: Prepare cache 2 |
78 | if: matrix.os == 'windows-latest' | 77 | if: matrix.os == 'windows-latest' |
79 | run: Remove-Item ./target/${{ env.PROFILE }}/xtask.exe | 78 | run: Remove-Item ./target/debug/xtask.exe |
80 | 79 | ||
81 | type-script: | 80 | type-script: |
82 | name: TypeScript | 81 | name: TypeScript |
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6cb27482d..49d3ee0e9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml | |||
@@ -1,9 +1,8 @@ | |||
1 | name: CI-Release | 1 | name: CI-Release |
2 | on: | 2 | on: |
3 | pull_request: | ||
4 | push: | 3 | push: |
5 | branches: | 4 | branches: |
6 | - master | 5 | - release |
7 | 6 | ||
8 | jobs: | 7 | jobs: |
9 | rust: | 8 | rust: |
@@ -15,10 +14,8 @@ jobs: | |||
15 | env: | 14 | env: |
16 | RUSTFLAGS: -D warnings | 15 | RUSTFLAGS: -D warnings |
17 | CARGO_INCREMENTAL: 0 | 16 | CARGO_INCREMENTAL: 0 |
18 | RUN_SLOW_TESTS: 1 | ||
19 | RUSTUP_MAX_RETRIES: 10 | 17 | RUSTUP_MAX_RETRIES: 10 |
20 | CARGO_NET_RETRY: 10 | 18 | CARGO_NET_RETRY: 10 |
21 | PROFILE: release | ||
22 | steps: | 19 | steps: |
23 | 20 | ||
24 | - name: Checkout repository | 21 | - name: Checkout repository |
@@ -40,47 +37,26 @@ jobs: | |||
40 | override: true | 37 | override: true |
41 | components: rustfmt, rust-src | 38 | components: rustfmt, rust-src |
42 | 39 | ||
43 | - name: Cache cargo registry | 40 | - name: Build |
44 | uses: actions/cache@v1 | ||
45 | with: | ||
46 | path: ~/.cargo/registry | ||
47 | key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | ||
48 | |||
49 | - name: Cache cargo index | ||
50 | uses: actions/cache@v1 | ||
51 | with: | ||
52 | path: ~/.cargo/git | ||
53 | key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | ||
54 | |||
55 | - name: Cache cargo target dir | ||
56 | uses: actions/cache@v1 | ||
57 | with: | ||
58 | path: target | ||
59 | key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} | ||
60 | |||
61 | - name: Compile and Test | ||
62 | uses: actions-rs/cargo@v1 | 41 | uses: actions-rs/cargo@v1 |
63 | with: | 42 | with: |
64 | command: test | 43 | command: build |
65 | args: --release --all-targets | 44 | args: --release --package ra_lsp_server --bin ra_lsp_server |
66 | 45 | ||
67 | - name: Prepare cache | 46 | - name: Strip symbols |
68 | run: cargo xtask pre-cache | 47 | if: matrix.os == 'ubuntu-latest' |
48 | run: strip ./target/release/ra_lsp_server | ||
69 | 49 | ||
70 | - name: Prepare cache 2 | 50 | - name: Create distribution dir |
71 | if: matrix.os == 'windows-latest' | ||
72 | run: Remove-Item ./target/${{ env.PROFILE }}/xtask.exe | ||
73 | |||
74 | - name: Creat distribution dir | ||
75 | run: mkdir ./dist | 51 | run: mkdir ./dist |
76 | 52 | ||
77 | - name: Copy binaries (non-win) | 53 | - name: Copy binaries (unix) |
78 | if: matrix.os != 'windows-latest' | 54 | if: matrix.os != 'windows-latest' |
79 | run: cp ./target/${{ env.PROFILE }}/ra_lsp_server ./dist | 55 | run: cp ./target/release/ra_lsp_server ./dist |
80 | 56 | ||
81 | - name: Copy binaries (win) | 57 | - name: Copy binaries (win) |
82 | if: matrix.os == 'windows-latest' | 58 | if: matrix.os == 'windows-latest' |
83 | run: copy ./target/${{ env.PROFILE }}/ra_lsp_server.* ./dist | 59 | run: copy ./target/release/ra_lsp_server.exe ./dist |
84 | 60 | ||
85 | - name: Upload artifacts | 61 | - name: Upload artifacts |
86 | uses: actions/upload-artifact@v1 | 62 | uses: actions/upload-artifact@v1 |
@@ -91,9 +67,6 @@ jobs: | |||
91 | type-script: | 67 | type-script: |
92 | name: TypeScript | 68 | name: TypeScript |
93 | runs-on: ubuntu-latest | 69 | runs-on: ubuntu-latest |
94 | env: | ||
95 | CXX: g++-4.9 | ||
96 | CC: gcc-4.9 | ||
97 | steps: | 70 | steps: |
98 | - name: Checkout repository | 71 | - name: Checkout repository |
99 | uses: actions/checkout@v1 | 72 | uses: actions/checkout@v1 |
@@ -105,14 +78,12 @@ jobs: | |||
105 | 78 | ||
106 | - run: npm ci | 79 | - run: npm ci |
107 | working-directory: ./editors/code | 80 | working-directory: ./editors/code |
81 | |||
108 | - run: npm run package --scripts-prepend-node-path | 82 | - run: npm run package --scripts-prepend-node-path |
109 | working-directory: ./editors/code | 83 | working-directory: ./editors/code |
110 | 84 | ||
111 | - name: Create distribution directory | ||
112 | run: mkdir ./dist | ||
113 | |||
114 | - name: Copy vscode extension | 85 | - name: Copy vscode extension |
115 | run: mkdir ./dist/code && cp ./editors/code/*.vsix ./dist/code/ | 86 | run: mkdir -p ./dist/code && cp ./editors/code/*.vsix ./dist/code/ |
116 | 87 | ||
117 | - name: Copy emacs mode | 88 | - name: Copy emacs mode |
118 | run: cp -R ./editors/emacs ./dist/ | 89 | run: cp -R ./editors/emacs ./dist/ |
@@ -120,5 +91,5 @@ jobs: | |||
120 | - name: Upload artifacts | 91 | - name: Upload artifacts |
121 | uses: actions/upload-artifact@v1 | 92 | uses: actions/upload-artifact@v1 |
122 | with: | 93 | with: |
123 | name: editors | 94 | name: editor-plugins |
124 | path: ./dist | 95 | path: ./dist |