15
15
RUSTUP_MAX_RETRIES : 10
16
16
17
17
jobs :
18
- dist :
19
- name : dist
20
- runs-on : ${{ matrix.os }}
21
- strategy :
22
- matrix :
23
- os : [ubuntu-16.04, windows-latest, macos-latest]
18
+ dist-windows :
19
+ name : dist (Windows)
20
+ runs-on : windows-latest
24
21
25
22
steps :
26
23
- name : Checkout repository
30
27
# which takes a long time. The fastest way to do this is to rename the
31
28
# existing folder, as deleting it takes about as much time as not doing
32
29
# anything and just updating rust-docs.
33
- - name : Rename existing rust toolchain (Windows)
34
- if : matrix.os == 'windows-latest'
30
+ - name : Rename existing rust toolchain
35
31
run : Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
36
32
37
33
- name : Install Rust toolchain
@@ -41,38 +37,111 @@ jobs:
41
37
profile : minimal
42
38
override : true
43
39
40
+ - name : Dist
41
+ if : matrix.os != 'ubuntu-16.04'
42
+ run : cargo xtask dist
43
+
44
+ - name : Upload artifacts
45
+ uses : actions/upload-artifact@v1
46
+ with :
47
+ name : dist-windows-latest
48
+ path : ./dist
49
+
50
+ dist-ubuntu-16.04 :
51
+ name : dist (Ubuntu 16.04)
52
+ runs-on : ubuntu-16.04
53
+
54
+ steps :
55
+ - name : Checkout repository
56
+ uses : actions/checkout@v2
57
+
58
+ - name : Install Rust toolchain
59
+ uses : actions-rs/toolchain@v1
60
+ with :
61
+ toolchain : stable
62
+ profile : minimal
63
+ override : true
64
+
44
65
- name : Install Nodejs
45
66
if : matrix.os == 'ubuntu-16.04'
46
67
uses : actions/setup-node@v1
47
68
with :
48
69
node-version : 12.x
49
70
50
71
- name : Dist
51
- if : matrix.os == 'ubuntu-16.04' && github.ref == 'refs/heads/release'
72
+ if : github.ref == 'refs/heads/release'
52
73
run : cargo xtask dist --client 0.2.$GITHUB_RUN_NUMBER
53
74
54
75
- name : Dist
55
- if : matrix.os == 'ubuntu-16.04' && github.ref != 'refs/heads/release'
76
+ if : github.ref != 'refs/heads/release'
56
77
run : cargo xtask dist --nightly --client 0.3.$GITHUB_RUN_NUMBER-nightly
57
78
79
+ - name : Nightly analysis-stats check
80
+ if : github.ref != 'refs/heads/release'
81
+ run : ./dist/rust-analyzer-linux analysis-stats .
82
+
83
+ - name : Upload artifacts
84
+ uses : actions/upload-artifact@v1
85
+ with :
86
+ name : dist-ubuntu-16.04
87
+ path : ./dist
88
+
89
+ dist-macos-latest :
90
+ name : dist (MacOS latest)
91
+ runs-on : macos-latest
92
+
93
+ steps :
94
+ - name : Checkout repository
95
+ uses : actions/checkout@v2
96
+
97
+ - name : Install Rust toolchain
98
+ uses : actions-rs/toolchain@v1
99
+ with :
100
+ toolchain : stable
101
+ profile : minimal
102
+ override : true
103
+
58
104
- name : Dist
59
- if : matrix.os != 'ubuntu-16.04'
60
105
run : cargo xtask dist
61
106
62
- - name : Nightly analysis-stats check
63
- if : matrix.os == 'ubuntu-16.04' && github.ref != 'refs/heads/release'
64
- run : ./dist/rust-analyzer-linux analysis-stats .
107
+ - name : Upload artifacts
108
+ uses : actions/upload-artifact@v1
109
+ with :
110
+ name : dist-macos-latest
111
+ path : ./dist
112
+
113
+ dist-macos-11.0 :
114
+ name : dist (MacOS 11.0)
115
+ runs-on : macos-11.0
116
+
117
+ steps :
118
+ - name : Checkout repository
119
+ uses : actions/checkout@v2
120
+
121
+ - name : Install Rust toolchain (beta)
122
+ if : matrix.os == 'macos-11.0'
123
+ uses : actions-rs/toolchain@v1
124
+ with :
125
+ toolchain : beta
126
+ target : aarch64-apple-darwin
127
+ profile : minimal
128
+ override : true
129
+
130
+ - name : Dist
131
+ run : cargo xtask dist
132
+ env :
133
+ RA_TARGET : aarch64-apple-darwin
65
134
66
135
- name : Upload artifacts
67
136
uses : actions/upload-artifact@v1
68
137
with :
69
- name : dist-${{ matrix.os }}
138
+ name : dist-macos-11.0
70
139
path : ./dist
71
140
72
141
publish :
73
142
name : publish
74
143
runs-on : ubuntu-16.04
75
- needs : ['dist']
144
+ needs : ['dist-windows', 'dist-ubuntu-16.04', 'dist-macos-latest', 'dist-macos-11.0 ']
76
145
steps :
77
146
- name : Install Nodejs
78
147
uses : actions/setup-node@v1
@@ -91,6 +160,10 @@ jobs:
91
160
- run : echo "HEAD_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
92
161
- run : ' echo "HEAD_SHA: $HEAD_SHA"'
93
162
163
+ - uses : actions/download-artifact@v1
164
+ with :
165
+ name : dist-macos-11.0
166
+ path : dist
94
167
- uses : actions/download-artifact@v1
95
168
with :
96
169
name : dist-macos-latest
@@ -103,7 +176,7 @@ jobs:
103
176
with :
104
177
name : dist-windows-latest
105
178
path : dist
106
- - run : ls -all ./dist
179
+ - run : ls -al ./dist
107
180
108
181
- name : Publish Release
109
182
uses : ./.github/actions/github-release
0 commit comments