diff options
Diffstat (limited to 'src/tools/rust-analyzer/.github/workflows')
| -rw-r--r-- | src/tools/rust-analyzer/.github/workflows/ci.yaml | 27 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/.github/workflows/release.yaml | 10 |
2 files changed, 28 insertions, 9 deletions
diff --git a/src/tools/rust-analyzer/.github/workflows/ci.yaml b/src/tools/rust-analyzer/.github/workflows/ci.yaml index 1563ee0b143..bb77324378a 100644 --- a/src/tools/rust-analyzer/.github/workflows/ci.yaml +++ b/src/tools/rust-analyzer/.github/workflows/ci.yaml @@ -43,14 +43,31 @@ jobs: rustup component add rustfmt rust-src - name: Cache Dependencies - uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 + uses: Swatinem/rust-cache@76686c56f2b581d1bb5bda44b51f7e24bd9b8b8e - - name: Compile + - name: Bump opt-level + if: matrix.os == 'ubuntu-latest' + run: sed -i '/\[profile.dev]/a opt-level=1' Cargo.toml + + - name: Compile (tests) run: cargo test --no-run --locked + # It's faster to `test` before `build` ¯\_(ツ)_/¯ + - name: Compile (rust-analyzer) + if: matrix.os == 'ubuntu-latest' + run: cargo build --quiet + - name: Test run: cargo test -- --nocapture --quiet + - name: Run analysis-stats on rust-analyzer + if: matrix.os == 'ubuntu-latest' + run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats . + + - name: Run analysis-stats on rust std library + if: matrix.os == 'ubuntu-latest' + run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std + # Weird targets to catch non-portable code rust-cross: if: github.repository == 'rust-lang/rust-analyzer' @@ -73,7 +90,7 @@ jobs: rustup target add ${{ env.targets }} ${{ env.targets_ide }} - name: Cache Dependencies - uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 + uses: Swatinem/rust-cache@76686c56f2b581d1bb5bda44b51f7e24bd9b8b8e - name: Check run: | @@ -99,9 +116,9 @@ jobs: uses: actions/checkout@v3 - name: Install Nodejs - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 16 - name: Install xvfb if: matrix.os == 'ubuntu-latest' diff --git a/src/tools/rust-analyzer/.github/workflows/release.yaml b/src/tools/rust-analyzer/.github/workflows/release.yaml index f4d472e3d5c..422fe29f9d5 100644 --- a/src/tools/rust-analyzer/.github/workflows/release.yaml +++ b/src/tools/rust-analyzer/.github/workflows/release.yaml @@ -76,9 +76,9 @@ jobs: rustup component add rust-src - name: Install Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 16 - name: Update apt repositories if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf' @@ -184,9 +184,9 @@ jobs: needs: ["dist", "dist-x86_64-unknown-linux-musl"] steps: - name: Install Nodejs - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 16 - run: echo "TAG=$(date --iso -u)" >> $GITHUB_ENV if: github.ref == 'refs/heads/release' @@ -259,6 +259,7 @@ jobs: working-directory: ./editors/code # token from https://dev.azure.com/rust-analyzer/ run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix || true + timeout-minutes: 2 - name: Publish Extension (Code Marketplace, nightly) if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer') @@ -269,3 +270,4 @@ jobs: if: github.ref != 'refs/heads/release' && (github.repository == 'rust-analyzer/rust-analyzer' || github.repository == 'rust-lang/rust-analyzer') working-directory: ./editors/code run: npx ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../../dist/rust-analyzer-*.vsix || true + timeout-minutes: 2 |
