1
1
name : CI-Release
2
2
on :
3
- pull_request :
4
3
push :
5
4
branches :
6
- - master
5
+ - release
7
6
8
7
jobs :
9
8
rust :
15
14
env :
16
15
RUSTFLAGS : -D warnings
17
16
CARGO_INCREMENTAL : 0
18
- RUN_SLOW_TESTS : 1
19
17
RUSTUP_MAX_RETRIES : 10
20
18
CARGO_NET_RETRY : 10
21
- PROFILE : release
22
19
steps :
23
20
24
21
- name : Checkout repository
@@ -40,47 +37,26 @@ jobs:
40
37
override : true
41
38
components : rustfmt, rust-src
42
39
43
- - name : Cache cargo registry
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
40
+ - name : Build
62
41
uses : actions-rs/cargo@v1
63
42
with :
64
- command : test
65
- args : --release --all-targets
43
+ command : build
44
+ args : --release --package ra_lsp_server --bin ra_lsp_server
66
45
67
- - name : Prepare cache
68
- run : cargo xtask pre-cache
46
+ - name : Strip symbols
47
+ if : matrix.os == 'ubuntu-latest'
48
+ run : strip ./target/release/ra_lsp_server
69
49
70
- - name : Prepare cache 2
71
- if : matrix.os == 'windows-latest'
72
- run : Remove-Item ./target/${{ env.PROFILE }}/xtask.exe
73
-
74
- - name : Creat distribution dir
50
+ - name : Create distribution dir
75
51
run : mkdir ./dist
76
52
77
- - name : Copy binaries (non-win )
53
+ - name : Copy binaries (unix )
78
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
57
- name : Copy binaries (win)
82
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
61
- name : Upload artifacts
86
62
uses : actions/upload-artifact@v1
91
67
type-script :
92
68
name : TypeScript
93
69
runs-on : ubuntu-latest
94
- env :
95
- CXX : g++-4.9
96
- CC : gcc-4.9
97
70
steps :
98
71
- name : Checkout repository
99
72
uses : actions/checkout@v1
@@ -105,20 +78,18 @@ jobs:
105
78
106
79
- run : npm ci
107
80
working-directory : ./editors/code
81
+
108
82
- run : npm run package --scripts-prepend-node-path
109
83
working-directory : ./editors/code
110
84
111
- - name : Create distribution directory
112
- run : mkdir ./dist
113
-
114
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
88
- name : Copy emacs mode
118
89
run : cp -R ./editors/emacs ./dist/
119
90
120
91
- name : Upload artifacts
121
92
uses : actions/upload-artifact@v1
122
93
with :
123
- name : editors
94
+ name : editor-plugins
124
95
path : ./dist
0 commit comments