Skip to content

Commit

Permalink
build: Produce statically-linked images with MUSL
Browse files Browse the repository at this point in the history
  • Loading branch information
olix0r committed May 16, 2024
1 parent 7a57803 commit c2959bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,10 @@ jobs:
PACKAGE_VERSION: ${{ needs.meta.outputs.version }}
CARGO_RELEASE: "1"
DEBIAN_FRONTEND: noninteractive
container: docker://ghcr.io/linkerd/dev:v43-rust
container: docker://ghcr.io/linkerd/dev:v43-rust-musl
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- run: just rustup
if: matrix.arch != 'amd64'
- run: apt-get update && apt-get install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu libc6-dev-arm64-cross
if: matrix.arch == 'arm64'
- run: apt-get update && apt-get install -y g++-arm-linux-gnueabihf gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
if: matrix.arch == 'arm'
- run: just release
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ package_arch := env_var_or_default("ARCH", "amd64")
# If a `package_arch` is specified, then we change the default cargo `--target`
# to support cross-compilation. Otherwise, we use `rustup` to find the default.
_cargo_target := if package_arch == "amd64" {
"x86_64-unknown-linux-gnu"
"x86_64-unknown-linux-musl"
} else if package_arch == "arm64" {
"aarch64-unknown-linux-gnu"
"aarch64-unknown-linux-musl"
} else if package_arch == "arm" {
"armv7-unknown-linux-gnueabihf"
"armv7-unknown-linux-musleabihf"
} else {
`rustup show | sed -n 's/^Default host: \(.*\)/\1/p'`
}
Expand Down

0 comments on commit c2959bd

Please sign in to comment.