Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infra: Add suport for building Linux ARM binaries #518

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,19 @@ workflows:
save_cache: true
requires:
- compile_and_test
- codacy/sbt:
name: create_artifacts_linux_arm
cmd: |
graalvm/build-deps.sh ARCH="arm"
export PATH=$HOME/.musl/arm-linux-musleabi-native/bin:$PATH
sbt "assembly;nativeImage"
mkdir -p ~/workdir/tmp-artifacts
mv target/native-image/codacy-coverage-reporter ~/workdir/tmp-artifacts/codacy-coverage-reporter-linux
mv target/codacy-coverage-reporter-assembly-$(cat .version).jar ~/workdir/tmp-artifacts/codacy-coverage-reporter-assembly.jar
persist_to_workspace: true
save_cache: true
requires:
- compile_and_test
- codacy/sbt_osx:
name: create_artifacts_for_osx
openjdk_version: '11'
Expand Down
26 changes: 8 additions & 18 deletions graalvm/build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,11 @@ set -e +o pipefail
mkdir -p $HOME/.musl
cd $HOME/.musl

curl http://more.musl.cc/10/x86_64-linux-musl/x86_64-linux-musl-native.tgz --output musl.tgz
tar -xf musl.tgz
TOOLCHAIN_DIR=$HOME/.musl/x86_64-linux-musl-native
export CC=$TOOLCHAIN_DIR/bin/gcc

zlib='zlib-1.2.13'
zlibtargz=$zlib.tar.gz
curl https://zlib.net/fossils/$zlibtargz --output $zlibtargz
tar -xf $zlibtargz

(
cd $zlib
./configure --prefix=$TOOLCHAIN_DIR --static
make -j "$(nproc)"
sudo make install
)

echo "$TOOLCHAIN_DIR/bin"
if [ "$ARCH" == "arm" ];
then
curl https://more.musl.cc/i686-linux-musl/arm-linux-musleabi-native.tgz -output musl.tgz
TOOLCHAIN_DIR=$HOME/.musl/arm-linux-musleabi-native
else
curl http://more.musl.cc/10/x86_64-linux-musl/x86_64-linux-musl-native.tgz --output musl.tgz
TOOLCHAIN_DIR=$HOME/.musl/x86_64-linux-musl-native
fi