Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Speedup ci #9788

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,8 @@ jobs:
- string_enum
- swc
- swc_bundler
# - swc_ecma_codegen
# - swc_ecma_minifier
- swc_ecma_codegen
- swc_ecma_minifier
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -536,7 +536,12 @@ jobs:
toolchain: "${{ steps.rustup-version.outputs.RUST_TOOLCHAIN }}"
components: miri

- run: cargo miri test -p ${{ matrix.crate }} --no-fail-fast
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest

- run: cargo miri nextest run -p ${{ matrix.crate }} --no-fail-fast -j 4
continue-on-error: true
env:
MIRIFLAGS: "-Zmiri-disable-isolation"
Expand Down
24 changes: 14 additions & 10 deletions crates/testing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,20 @@ mod string_errors;
pub fn init() -> tracing::subscriber::DefaultGuard {
let log_env = env::var("RUST_LOG").unwrap_or_else(|_| "debug".to_string());

let logger = tracing_subscriber::FmtSubscriber::builder()
.without_time()
.with_target(false)
.with_ansi(true)
.with_env_filter(EnvFilter::from_str(&log_env).unwrap())
.with_test_writer()
.pretty()
.finish();

tracing::subscriber::set_default(logger)
if cfg!(miri) {
tracing::subscriber::set_default(tracing::subscriber::NoSubscriber::new())
} else {
// This makes miri slow
let logger = tracing_subscriber::FmtSubscriber::builder()
.without_time()
.with_target(false)
.with_ansi(true)
.with_env_filter(EnvFilter::from_str(&log_env).unwrap())
.with_test_writer()
.pretty()
.finish();
tracing::subscriber::set_default(logger)
}
}

pub fn find_executable(name: &str) -> Option<PathBuf> {
Expand Down
Loading