From 5fef6c7a1967cc5c7ebcbfae8d51c4a6705dc967 Mon Sep 17 00:00:00 2001 From: makspll Date: Sat, 22 Feb 2025 14:47:29 +0000 Subject: [PATCH 1/2] chore: install alsa libraries and other deps on linux in xtask init --- crates/xtask/Dockerfile | 3 --- crates/xtask/src/main.rs | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/crates/xtask/Dockerfile b/crates/xtask/Dockerfile index 4eb4e919db..f73c94ceef 100644 --- a/crates/xtask/Dockerfile +++ b/crates/xtask/Dockerfile @@ -1,8 +1,5 @@ FROM rust:latest AS base -RUN useradd -m appuser -USER appuser - WORKDIR /usr/src/app COPY . . diff --git a/crates/xtask/src/main.rs b/crates/xtask/src/main.rs index 2cc1b701d6..cebc8a1f81 100644 --- a/crates/xtask/src/main.rs +++ b/crates/xtask/src/main.rs @@ -1299,6 +1299,20 @@ impl Xtasks { } fn init(app_settings: GlobalArgs, dont_update_ide: bool) -> Result<()> { + // install alsa et al + if cfg!(target_os = "linux") { + Self::run_system_command( + &app_settings, + "sh", + "Failed to install Linux dependencies", + vec![ + "-c", + "sudo apt-get update && sudo apt-get install --no-install-recommends -y libasound2-dev libudev-dev" + ], + None, + )?; + } + // install cargo mdbook Self::run_system_command( &app_settings, From 7293f83ec137b632d400f11febf555f0229ae4d1 Mon Sep 17 00:00:00 2001 From: makspll Date: Sat, 22 Feb 2025 14:52:08 +0000 Subject: [PATCH 2/2] don't install alsa in CI anymore --- .github/workflows/bevy_mod_scripting.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/bevy_mod_scripting.yml b/.github/workflows/bevy_mod_scripting.yml index dad48446f2..dcbc2c339f 100644 --- a/.github/workflows/bevy_mod_scripting.yml +++ b/.github/workflows/bevy_mod_scripting.yml @@ -83,11 +83,6 @@ jobs: if: ${{ needs.check-needs-run.outputs.any-changes == 'true' }} uses: actions/checkout@v4 - - name: Install alsa and udev - if: ${{ needs.check-needs-run.outputs.any-changes == 'true' && runner.os == 'linux' }} - run: | - sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev - sudo rm -rf /usr/share/dotnet; sudo rm -rf /opt/ghc; sudo rm -rf "/usr/local/share/boost"; sudo rm -rf "$AGENT_TOOLSDIRECTORY" - uses: actions-rs/toolchain@v1 if: ${{ needs.check-needs-run.outputs.any-changes == 'true' }} with: