Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Update for Android cross-compilation. #10180

Merged
merged 6 commits into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ build-android:
script:
- scripts/gitlab/build-unix.sh
tags:
- rust-arm
- linux-docker
allow_failure: true

test-beta:
Expand Down
24 changes: 8 additions & 16 deletions scripts/gitlab/build-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,19 @@ echo "CARGO_TARGET: " $CARGO_TARGET
echo "CC: " $CC
echo "CXX: " $CXX

echo "__________CARGO CONFIG__________"
echo "_____ Building target: "$CARGO_TARGET" _____"
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
then
# use build container's cargo config
cat /.cargo/config
# only thing we need for android
time cargo build --target $CARGO_TARGET --release -p parity-clib --features final
else
mkdir -p .cargo
rm -f .cargo/config
echo "[target.$CARGO_TARGET]" >> .cargo/config
echo "linker= \"$CC\"" >> .cargo/config
cat .cargo/config
time cargo build --target $CARGO_TARGET --release --features final
time cargo build --target $CARGO_TARGET --release -p evmbin
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
time cargo build --target $CARGO_TARGET --release -p whisper-cli
fi


echo "_____ Building target: "$CARGO_TARGET" _____"
time cargo build --target $CARGO_TARGET --release --features final
time cargo build --target $CARGO_TARGET --release -p evmbin
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
time cargo build --target $CARGO_TARGET --release -p ethkey-cli
time cargo build --target $CARGO_TARGET --release -p whisper-cli

echo "_____ Post-processing binaries _____"
rm -rf artifacts
mkdir -p artifacts
Expand Down