Skip to content

Commit

Permalink
feat: Download correct musl toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
mthmulders committed Aug 9, 2024
1 parent 5c82762 commit c7e1bd1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,27 @@ jobs:
run: |
TMP_DIR=$(mktemp -d)
pushd $TMP_DIR
curl -LOJ http://more.musl.cc/10/x86_64-linux-musl/x86_64-linux-musl-native.tgz
tar -xvf x86_64-linux-musl-native.tgz
case $MATRIX_OS in
ubuntu-latest)
curl -LOJ https://musl.cc/x86_64-linux-musl-native.tgz
tar -xvf x86_64-linux-musl-native.tgz
TOOLCHAIN_DIR=$TMP_DIR/x86_64-linux-musl-native
;;
linux-arm64)
curl -LOJ https://musl.cc/aarch64-linux-musl-native.tgz
tar -xvf aarch64-linux-musl-native.tgz
TOOLCHAIN_DIR=$TMP_DIR/aarch64-linux-musl-native
;;
*)
echo 'Unexpected CPU architecture!
exit 1
;;
esac
curl -LOJ https://zlib.net/fossils/zlib-1.3.tar.gz
tar -xzf zlib-1.3.tar.gz
cd zlib-1.3
TOOLCHAIN_DIR=$TMP_DIR/x86_64-linux-musl-native
CC=$TOOLCHAIN_DIR/bin/gcc
./configure --prefix=$TOOLCHAIN_DIR --static
Expand All @@ -74,6 +87,8 @@ jobs:
echo "TOOLCHAIN_DIR=$TOOLCHAIN_DIR" >> $GITHUB_OUTPUT
if: matrix.os == 'ubuntu-latest' || matrix.os == 'linux-arm64'
env:
MATRIX_OS: ${{ matrix.os }}

- name: Cache Maven packages
id: restore-maven-package-cache
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,27 @@ jobs:
run: |
TMP_DIR=$(mktemp -d)
pushd $TMP_DIR
curl -LOJ http://more.musl.cc/10/x86_64-linux-musl/x86_64-linux-musl-native.tgz
tar -xvf x86_64-linux-musl-native.tgz
case $MATRIX_OS in
ubuntu-latest)
curl -LOJ https://musl.cc/x86_64-linux-musl-native.tgz
tar -xvf x86_64-linux-musl-native.tgz
TOOLCHAIN_DIR=$TMP_DIR/x86_64-linux-musl-native
;;
linux-arm64)
curl -LOJ https://musl.cc/aarch64-linux-musl-native.tgz
tar -xvf aarch64-linux-musl-native.tgz
TOOLCHAIN_DIR=$TMP_DIR/aarch64-linux-musl-native
;;
*)
echo 'Unexpected CPU architecture!
exit 1
;;
esac
curl -LOJ https://zlib.net/fossils/zlib-1.3.tar.gz
tar -xzf zlib-1.3.tar.gz
cd zlib-1.3
TOOLCHAIN_DIR=$TMP_DIR/x86_64-linux-musl-native
CC=$TOOLCHAIN_DIR/bin/gcc
./configure --prefix=$TOOLCHAIN_DIR --static
Expand All @@ -133,6 +146,8 @@ jobs:
echo "TOOLCHAIN_DIR=$TOOLCHAIN_DIR" >> $GITHUB_OUTPUT
if: matrix.os == 'ubuntu-latest' || matrix.os == 'linux-arm64'
env:
MATRIX_OS: ${{ matrix.os }}

- name: Cache Maven packages
uses: actions/[email protected]
Expand Down

0 comments on commit c7e1bd1

Please sign in to comment.