Skip to content

chore: install alsa libraries and other deps on linux in xtask init #309

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

Merged
merged 2 commits into from
Feb 22, 2025
Merged
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
5 changes: 0 additions & 5 deletions .github/workflows/bevy_mod_scripting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions crates/xtask/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM rust:latest AS base

RUN useradd -m appuser
USER appuser

WORKDIR /usr/src/app

COPY . .
Expand Down
14 changes: 14 additions & 0 deletions crates/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading