1515 RUSTUP_MAX_RETRIES : 10
1616
1717jobs :
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
2421
2522 steps :
2623 - name : Checkout repository
3027 # which takes a long time. The fastest way to do this is to rename the
3128 # existing folder, as deleting it takes about as much time as not doing
3229 # 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
3531 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
3632
3733 - name : Install Rust toolchain
@@ -41,38 +37,116 @@ jobs:
4137 profile : minimal
4238 override : true
4339
40+ - name : Dist
41+ run : cargo xtask dist
42+ env :
43+ RA_TARGET : x86_64-pc-windows-msvc
44+
45+ - name : Upload artifacts
46+ uses : actions/upload-artifact@v1
47+ with :
48+ name : dist-windows-latest
49+ path : ./dist
50+
51+ dist-ubuntu :
52+ name : dist (Ubuntu 16.04)
53+ runs-on : ubuntu-16.04
54+
55+ steps :
56+ - name : Checkout repository
57+ uses : actions/checkout@v2
58+
59+ - name : Install Rust toolchain
60+ uses : actions-rs/toolchain@v1
61+ with :
62+ toolchain : stable
63+ profile : minimal
64+ override : true
65+
4466 - name : Install Nodejs
45- if : matrix.os == 'ubuntu-16.04'
4667 uses : actions/setup-node@v1
4768 with :
4869 node-version : 12.x
4970
5071 - name : Dist
51- if : matrix.os == 'ubuntu-16.04' && github.ref == 'refs/heads/release'
72+ if : github.ref == 'refs/heads/release'
5273 run : cargo xtask dist --client 0.2.$GITHUB_RUN_NUMBER
74+ env :
75+ RA_TARGET : x86_64-unknown-linux-gnu
5376
5477 - name : Dist
55- if : matrix.os == 'ubuntu-16.04' && github.ref != 'refs/heads/release'
78+ if : github.ref != 'refs/heads/release'
5679 run : cargo xtask dist --nightly --client 0.3.$GITHUB_RUN_NUMBER-nightly
80+ env :
81+ RA_TARGET : x86_64-unknown-linux-gnu
82+
83+ - name : Nightly analysis-stats check
84+ if : github.ref != 'refs/heads/release'
85+ run : ./dist/rust-analyzer-x86_64-unknown-linux-gnu analysis-stats .
86+
87+ - name : Upload artifacts
88+ uses : actions/upload-artifact@v1
89+ with :
90+ name : dist-ubuntu-16.04
91+ path : ./dist
92+
93+ dist-macos-latest :
94+ name : dist (MacOS latest)
95+ runs-on : macos-latest
96+
97+ steps :
98+ - name : Checkout repository
99+ uses : actions/checkout@v2
100+
101+ - name : Install Rust toolchain
102+ uses : actions-rs/toolchain@v1
103+ with :
104+ toolchain : stable
105+ profile : minimal
106+ override : true
57107
58108 - name : Dist
59- if : matrix.os != 'ubuntu-16.04'
60109 run : cargo xtask dist
110+ env :
111+ RA_TARGET : x86_64-apple-darwin
61112
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 .
113+ - name : Upload artifacts
114+ uses : actions/upload-artifact@v1
115+ with :
116+ name : dist-macos-latest
117+ path : ./dist
118+
119+ dist-macos-11 :
120+ name : dist (MacOS 11.0)
121+ runs-on : macos-11.0
122+
123+ steps :
124+ - name : Checkout repository
125+ uses : actions/checkout@v2
126+
127+ - name : Install Rust toolchain (beta)
128+ uses : actions-rs/toolchain@v1
129+ with :
130+ toolchain : beta
131+ target : aarch64-apple-darwin
132+ profile : minimal
133+ override : true
134+
135+ - name : Dist
136+ run : cargo xtask dist
137+ env :
138+ RA_TARGET : aarch64-apple-darwin
65139
66140 - name : Upload artifacts
67141 uses : actions/upload-artifact@v1
68142 with :
69- name : dist-${{ matrix.os }}
143+ name : dist-macos-11.0
70144 path : ./dist
71145
72146 publish :
73147 name : publish
74148 runs-on : ubuntu-16.04
75- needs : ['dist']
149+ needs : ['dist-windows', 'dist-ubuntu', 'dist-macos-latest', 'dist-macos-11 ']
76150 steps :
77151 - name : Install Nodejs
78152 uses : actions/setup-node@v1
@@ -91,6 +165,10 @@ jobs:
91165 - run : echo "HEAD_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
92166 - run : ' echo "HEAD_SHA: $HEAD_SHA"'
93167
168+ - uses : actions/download-artifact@v1
169+ with :
170+ name : dist-macos-11.0
171+ path : dist
94172 - uses : actions/download-artifact@v1
95173 with :
96174 name : dist-macos-latest
@@ -103,7 +181,7 @@ jobs:
103181 with :
104182 name : dist-windows-latest
105183 path : dist
106- - run : ls -all ./dist
184+ - run : ls -al ./dist
107185
108186 - name : Publish Release
109187 uses : ./.github/actions/github-release
0 commit comments