Skip to content

Commit 7fefc13

Browse files
committed
add component installation to init
1 parent bcef798 commit 7fefc13

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/bevy_mod_scripting.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jobs:
4343
- uses: actions-rs/toolchain@v1
4444
with:
4545
toolchain: stable
46-
components: clippy, rustfmt, grcov, mdbook
4746
override: true
4847
- name: Rust Cache
4948
uses: Swatinem/rust-cache@v2.7.3

crates/xtask/src/main.rs

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,9 @@ impl Xtasks {
464464
}
465465

466466
fn cicd() -> Result<()> {
467+
// setup the CI environment
468+
Self::init()?;
469+
467470
// run everything with the ephemereal profile
468471
// first check everything compiles with every combination of features apart from mutually exclusive ones
469472
let all_features = Features(<Feature as strum::VariantArray>::VARIANTS.into());
@@ -507,7 +510,38 @@ impl Xtasks {
507510
}
508511

509512
fn init() -> Result<()> {
510-
todo!()
513+
// install cargo mdbook
514+
Self::run_system_command(
515+
"cargo",
516+
"Failed to install mdbook",
517+
vec!["install", "mdbook"],
518+
None,
519+
)?;
520+
521+
// install grcov
522+
Self::run_system_command(
523+
"cargo",
524+
"Failed to install grcov",
525+
vec!["install", "grcov"],
526+
None,
527+
)?;
528+
529+
// install llvm-tools and clippy
530+
Self::run_system_command(
531+
"rustup",
532+
"Failed to install rust components",
533+
vec![
534+
"component",
535+
"add",
536+
"rust-src",
537+
"rustc-dev",
538+
"clippy",
539+
"llvm-tools-preview",
540+
],
541+
None,
542+
)?;
543+
544+
Ok(())
511545
}
512546
}
513547

0 commit comments

Comments
 (0)