Skip to content

Commit e0f8e60

Browse files
committed
Auto merge of #103177 - lnicola:rust-analyzer-2022-10-18, r=lnicola
⬆️ rust-analyzer r? `@ghost`
2 parents a03ca01 + cb8fdff commit e0f8e60

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+3127
-1631
lines changed

Diff for: src/tools/rust-analyzer/.github/workflows/ci.yaml

+22-5
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,31 @@ jobs:
4343
rustup component add rustfmt rust-src
4444
4545
- name: Cache Dependencies
46-
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
46+
uses: Swatinem/rust-cache@76686c56f2b581d1bb5bda44b51f7e24bd9b8b8e
4747

48-
- name: Compile
48+
- name: Bump opt-level
49+
if: matrix.os == 'ubuntu-latest'
50+
run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml
51+
52+
- name: Compile (tests)
4953
run: cargo test --no-run --locked
5054

55+
# It's faster to `test` before `build` ¯\_(ツ)_/¯
56+
- name: Compile (rust-analyzer)
57+
if: matrix.os == 'ubuntu-latest'
58+
run: cargo build --quiet
59+
5160
- name: Test
5261
run: cargo test -- --nocapture --quiet
5362

63+
- name: Run analysis-stats on rust-analyzer
64+
if: matrix.os == 'ubuntu-latest'
65+
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats .
66+
67+
- name: Run analysis-stats on rust std library
68+
if: matrix.os == 'ubuntu-latest'
69+
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std
70+
5471
# Weird targets to catch non-portable code
5572
rust-cross:
5673
if: github.repository == 'rust-lang/rust-analyzer'
@@ -73,7 +90,7 @@ jobs:
7390
rustup target add ${{ env.targets }} ${{ env.targets_ide }}
7491
7592
- name: Cache Dependencies
76-
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
93+
uses: Swatinem/rust-cache@76686c56f2b581d1bb5bda44b51f7e24bd9b8b8e
7794

7895
- name: Check
7996
run: |
@@ -99,9 +116,9 @@ jobs:
99116
uses: actions/checkout@v3
100117

101118
- name: Install Nodejs
102-
uses: actions/setup-node@v1
119+
uses: actions/setup-node@v3
103120
with:
104-
node-version: 16.x
121+
node-version: 16
105122

106123
- name: Install xvfb
107124
if: matrix.os == 'ubuntu-latest'

Diff for: src/tools/rust-analyzer/.github/workflows/release.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ jobs:
7676
rustup component add rust-src
7777
7878
- name: Install Node.js
79-
uses: actions/setup-node@v1
79+
uses: actions/setup-node@v3
8080
with:
81-
node-version: 16.x
81+
node-version: 16
8282

8383
- name: Update apt repositories
8484
if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf'
@@ -184,9 +184,9 @@ jobs:
184184
needs: ["dist", "dist-x86_64-unknown-linux-musl"]
185185
steps:
186186
- name: Install Nodejs
187-
uses: actions/setup-node@v1
187+
uses: actions/setup-node@v3
188188
with:
189-
node-version: 16.x
189+
node-version: 16
190190

191191
- run: echo "TAG=$(date --iso -u)" >> $GITHUB_ENV
192192
if: github.ref == 'refs/heads/release'
@@ -259,6 +259,7 @@ jobs:
259259
working-directory: ./editors/code
260260
# token from https://dev.azure.com/rust-analyzer/
261261
run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix || true
262+
timeout-minutes: 2
262263

263264
- name: Publish Extension (Code Marketplace, nightly)
264265
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
@@ -269,3 +270,4 @@ jobs:
269270
if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer')
270271
working-directory: ./editors/code
271272
run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix || true
273+
timeout-minutes: 2

0 commit comments

Comments
 (0)