Change build target to x86_64-unknown-linux-musl and update system dependencies

- Change build target from `x86_64-unknown-linux-gnu` to `x86_64-unknown-linux-musl`
- Default install `x86_64-unknown-linux-musl` toolchain in setup action
- Add `musl-tools` and `build-essential` to system dependencies
This commit is contained in:
houseme
2025-04-07 16:55:14 +08:00
parent 4136dd5393
commit 5204cb67d8
2 changed files with 14 additions and 11 deletions

View File

@@ -21,6 +21,8 @@ runs:
run: |
sudo apt update
sudo apt install -y \
musl-tools \
build-essential \
lld \
libdbus-1-dev \
libwayland-dev \
@@ -38,6 +40,7 @@ runs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ inputs.rust-version }}
targets: x86_64-unknown-linux-musl
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2

View File

@@ -7,7 +7,7 @@ on:
push:
branches:
- main
tags: ["v*", "*"]
tags: [ "v*", "*" ]
jobs:
build-rustfs:
@@ -16,17 +16,17 @@ jobs:
strategy:
matrix:
variant:
- { profile: dev, target: x86_64-unknown-linux-gnu, glibc: "default" }
- { profile: dev, target: x86_64-unknown-linux-musl, glibc: "default" }
- {
profile: release,
target: x86_64-unknown-linux-gnu,
glibc: "default",
}
profile: release,
target: x86_64-unknown-linux-musl,
glibc: "default",
}
- {
profile: release,
target: x86_64-unknown-linux-gnu,
glibc: "2.31",
}
profile: release,
target: x86_64-unknown-linux-musl,
glibc: "2.31",
}
steps:
- uses: actions/checkout@v4
@@ -190,7 +190,7 @@ jobs:
merge:
runs-on: ubuntu-latest
needs: [build-rustfs, build-rustfs-gui]
needs: [ build-rustfs, build-rustfs-gui ]
steps:
- uses: actions/upload-artifact/merge@v4
with: