mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Auto merge of #13401 - lnicola:opt-tests, r=lnicola
Run `analysis-stats` on CI, with `opt-level = 1` We might want to run `analysis-stats` on PRs, and this makes it less unbearable.
This commit is contained in:
commit
36a70b7435
19
.github/workflows/ci.yaml
vendored
19
.github/workflows/ci.yaml
vendored
@ -45,12 +45,29 @@ jobs:
|
||||
- name: Cache Dependencies
|
||||
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
|
||||
|
||||
- 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'
|
||||
|
@ -89,7 +89,7 @@ pub mod ext {
|
||||
}
|
||||
|
||||
pub fn ty_name(name: ast::Name) -> ast::Type {
|
||||
ty_path(ident_path(&format!("{name}")))
|
||||
ty_path(ident_path(&name.to_string()))
|
||||
}
|
||||
pub fn ty_bool() -> ast::Type {
|
||||
ty_path(ident_path("bool"))
|
||||
|
Loading…
Reference in New Issue
Block a user