Skip to content

Commit

Permalink
release: support more arm architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 6, 2023
1 parent d6ee86e commit af05d81
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 15 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/rtx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,14 @@ jobs:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- arm-unknown-linux-musleabihf
- armv7-unknown-linux-gnueabihf
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- armv7-unknown-linux-gnueabi
- armv7-unknown-linux-musleabi
- arm-unknown-linux-gnueabi
- arm-unknown-linux-musleabi
steps:
- uses: actions/checkout@v4
- name: Rust Cache
Expand All @@ -104,7 +108,7 @@ jobs:
- run: scripts/setup-zipsign.sh
env:
ZIPSIGN: ${{ secrets.ZIPSIGN }}
- run: scripts/build-tarball.sh rtx --release --features openssl/vendored --target ${{matrix.target}}
- run: scripts/build_tarball.sh rtx --release --features openssl/vendored --target ${{matrix.target}}
env:
CROSS: "1"
- uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -136,7 +140,7 @@ jobs:
- run: scripts/setup-zipsign.sh
env:
ZIPSIGN: ${{ secrets.ZIPSIGN }}
- run: scripts/build-tarball.sh rtx --release --features openssl/vendored --target ${{matrix.target}}
- run: scripts/build_tarball.sh rtx --release --features openssl/vendored --target ${{matrix.target}}
- uses: actions/upload-artifact@v3
with:
name: tarball-${{matrix.target}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
shared-key: "build-linux-x86_64-unknown-linux-gnu"
save-if: false
- run: scripts/build-tarball.sh rtx --release --target x86_64-unknown-linux-gnu
- run: scripts/build_tarball.sh rtx --release --target x86_64-unknown-linux-gnu
- uses: actions/upload-artifact@v3
with:
name: tarball-x86_64-unknown-linux-gnu
Expand Down
12 changes: 11 additions & 1 deletion scripts/build-tarball.sh → scripts/build_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,21 @@ get_arch() {
;;
esac
}
get_suffix() {
case "$RUST_TRIPLE" in
*-musl | *-musleabi | *-musleabihf)
echo "-musl"
;;
*)
echo ""
;;
esac
}
#endregion

set -x
VERSION=$(./scripts/get-version.sh)
BASENAME=$NAME-$VERSION-$(get_os)-$(get_arch)
BASENAME=$NAME-$VERSION-$(get_os)-$(get_arch)$(get_suffix)

if [ "${CROSS:-}" = "1" ]; then
cross build "$@"
Expand Down
4 changes: 4 additions & 0 deletions scripts/release-npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ dist_tag="$(dist_tag_from_version "$RTX_VERSION")"

platforms=(
linux-x64
linux-x64-musl
linux-arm64
linux-arm64-musl
linux-armv6
linux-armv6-musl
linux-armv7
linux-armv7-musl
macos-x64
macos-arm64
)
Expand Down
13 changes: 5 additions & 8 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,21 @@ export RTX_VERSION RELEASE_DIR
rm -rf "${RELEASE_DIR:?}/$RTX_VERSION"
mkdir -p "$RELEASE_DIR/$RTX_VERSION"

targets=(
x86_64-unknown-linux-gnu
aarch64-unknown-linux-gnu
arm-unknown-linux-gnueabihf
armv7-unknown-linux-gnueabihf
x86_64-apple-darwin
aarch64-apple-darwin
)
targets=$(find artifacts -name 'tarball-*' -exec basename {} \; | sed 's/^tarball-//')
for target in "${targets[@]}"; do
cp "artifacts/tarball-$target/"*.tar.gz "$RELEASE_DIR/$RTX_VERSION"
cp "artifacts/tarball-$target/"*.tar.xz "$RELEASE_DIR/$RTX_VERSION"
done

platforms=(
linux-x64
linux-x64-musl
linux-arm64
linux-arm64-musl
linux-armv6
linux-armv6-musl
linux-armv7
linux-armv7-musl
macos-x64
macos-arm64
)
Expand Down
4 changes: 4 additions & 0 deletions scripts/render-homebrew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ set -euxo pipefail
# shellcheck disable=SC2016
RTX_VERSION=${RTX_VERSION#v*} \
RTX_CHECKSUM_LINUX_X86_64=$(grep "rtx-v$RTX_VERSION-linux-x64.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_LINUX_X86_64_MUSL=$(grep "rtx-v$RTX_VERSION-linux-x64-musl.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_LINUX_ARM64=$(grep "rtx-v$RTX_VERSION-linux-arm64.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_LINUX_ARM64_MUSL=$(grep "rtx-v$RTX_VERSION-linux-arm64-musl.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_LINUX_ARMV6=$(grep "rtx-v$RTX_VERSION-linux-armv6.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_LINUX_ARMV6_MUSL=$(grep "rtx-v$RTX_VERSION-linux-armv6-musl.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_LINUX_ARMV7=$(grep "rtx-v$RTX_VERSION-linux-armv7.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_LINUX_ARMV7_MUSL=$(grep "rtx-v$RTX_VERSION-linux-armv7-musl.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_MACOS_X86_64=$(grep "rtx-v$RTX_VERSION-macos-x64.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
RTX_CHECKSUM_MACOS_ARM64=$(grep "rtx-v$RTX_VERSION-macos-arm64.tar.xz" "$RELEASE_DIR/v$RTX_VERSION/SHASUMS256.txt" | cut -d ' ' -f1) \
envsubst '$RTX_VERSION,$RTX_CHECKSUM_LINUX_X86_64,$RTX_CHECKSUM_LINUX_ARM64,$RTX_CHECKSUM_MACOS_X86_64,$RTX_CHECKSUM_MACOS_ARM64' \
Expand Down
4 changes: 4 additions & 0 deletions scripts/render-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ set -euxo pipefail
# shellcheck disable=SC2016
RTX_VERSION=$RTX_VERSION \
RTX_CHECKSUM_LINUX_X86_64=$(grep "rtx-v.*linux-x64.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_LINUX_X86_64_MUSL=$(grep "rtx-v.*linux-x64-musl.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_LINUX_ARM64=$(grep "rtx-v.*linux-arm64.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_LINUX_ARM64_MUSL=$(grep "rtx-v.*linux-arm64-musl.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_LINUX_ARMV6=$(grep "rtx-v.*linux-armv6.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_LINUX_ARMV6_MUSL=$(grep "rtx-v.*linux-armv6-musl.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_LINUX_ARMV7=$(grep "rtx-v.*linux-armv7.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_LINUX_ARMV7_MUSL=$(grep "rtx-v.*linux-armv7-musl.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_MACOS_X86_64=$(grep "rtx-v.*macos-x64.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
RTX_CHECKSUM_MACOS_ARM64=$(grep "rtx-v.*macos-arm64.tar.gz" "$RELEASE_DIR/$RTX_VERSION/SHASUMS256.txt") \
envsubst '$RTX_VERSION,$RTX_CHECKSUM_LINUX_X86_64,$RTX_CHECKSUM_LINUX_ARM64,$RTX_CHECKSUM_MACOS_X86_64,$RTX_CHECKSUM_MACOS_ARM64' \
Expand Down

0 comments on commit af05d81

Please sign in to comment.