Skip to content

Commit

Permalink
Add s390x arch build
Browse files Browse the repository at this point in the history
rust using cross build tool
so it can build out s390x binary from x86 platform

fix: starship#5808
  • Loading branch information
lysliu committed Mar 1, 2024
1 parent f38bf82 commit 38a14ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ jobs:
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
name: starship-aarch64-unknown-linux-musl.tar.gz

- target: s390x-unknown-linux-gnu
os: ubuntu-latest
name: starship-s390x-unknown-linux-gnu.tar.gz

- target: arm-unknown-linux-musleabihf
os: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SUPPORTED_TARGETS="x86_64-unknown-linux-gnu x86_64-unknown-linux-musl \
arm-unknown-linux-musleabihf x86_64-apple-darwin \
aarch64-apple-darwin x86_64-pc-windows-msvc \
i686-pc-windows-msvc aarch64-pc-windows-msvc \
x86_64-unknown-freebsd"
x86_64-unknown-freebsd s390x-unknown-linux-gnu"

info() {
printf '%s\n' "${BOLD}${GREY}>${NO_COLOR} $*"
Expand Down Expand Up @@ -225,13 +225,15 @@ detect_platform() {
# - i386
# - arm
# - arm64
# - s390x
detect_arch() {
arch="$(uname -m | tr '[:upper:]' '[:lower:]')"

case "${arch}" in
amd64) arch="x86_64" ;;
armv*) arch="arm" ;;
arm64) arch="aarch64" ;;
s390x) arch="s390x" ;;
esac

# `uname -m` in some cases mis-reports 32-bit OS as 64-bit, so double check
Expand Down

0 comments on commit 38a14ad

Please sign in to comment.