Skip to content

Commit 2028736

Browse files
authored
chore: install alsa libraries and other deps on linux in xtask init (#309)
1 parent e2cd959 commit 2028736

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

.github/workflows/bevy_mod_scripting.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ jobs:
8383
if: ${{ needs.check-needs-run.outputs.any-changes == 'true' }}
8484
uses: actions/checkout@v4
8585

86-
- name: Install alsa and udev
87-
if: ${{ needs.check-needs-run.outputs.any-changes == 'true' && runner.os == 'linux' }}
88-
run: |
89-
sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
90-
sudo rm -rf /usr/share/dotnet; sudo rm -rf /opt/ghc; sudo rm -rf "/usr/local/share/boost"; sudo rm -rf "$AGENT_TOOLSDIRECTORY"
9186
- uses: actions-rs/toolchain@v1
9287
if: ${{ needs.check-needs-run.outputs.any-changes == 'true' }}
9388
with:

crates/xtask/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM rust:latest AS base
22

3-
RUN useradd -m appuser
4-
USER appuser
5-
63
WORKDIR /usr/src/app
74

85
COPY . .

crates/xtask/src/main.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,20 @@ impl Xtasks {
12991299
}
13001300

13011301
fn init(app_settings: GlobalArgs, dont_update_ide: bool) -> Result<()> {
1302+
// install alsa et al
1303+
if cfg!(target_os = "linux") {
1304+
Self::run_system_command(
1305+
&app_settings,
1306+
"sh",
1307+
"Failed to install Linux dependencies",
1308+
vec![
1309+
"-c",
1310+
"sudo apt-get update && sudo apt-get install --no-install-recommends -y libasound2-dev libudev-dev"
1311+
],
1312+
None,
1313+
)?;
1314+
}
1315+
13021316
// install cargo mdbook
13031317
Self::run_system_command(
13041318
&app_settings,

0 commit comments

Comments
 (0)