Update for Android cross-compilation. (#10180)
* build-unix update * .gitlab-ci update * Update build-unix.sh add android postprocessing * path to android lib libparity.so * fix path to libparity * add android lib to artifacts
This commit is contained in:
parent
53c408f549
commit
ed6f2877d7
@ -146,8 +146,9 @@ build-android:
|
|||||||
script:
|
script:
|
||||||
- scripts/gitlab/build-unix.sh
|
- scripts/gitlab/build-unix.sh
|
||||||
tags:
|
tags:
|
||||||
- rust-arm
|
- linux-docker
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
<<: *collect_artifacts
|
||||||
|
|
||||||
test-beta:
|
test-beta:
|
||||||
stage: optional
|
stage: optional
|
||||||
|
@ -10,26 +10,18 @@ echo "CARGO_TARGET: " $CARGO_TARGET
|
|||||||
echo "CC: " $CC
|
echo "CC: " $CC
|
||||||
echo "CXX: " $CXX
|
echo "CXX: " $CXX
|
||||||
|
|
||||||
echo "__________CARGO CONFIG__________"
|
echo "_____ Building target: "$CARGO_TARGET" _____"
|
||||||
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
||||||
then
|
then
|
||||||
# use build container's cargo config
|
# only thing we need for android
|
||||||
cat /.cargo/config
|
time cargo build --target $CARGO_TARGET --release -p parity-clib --features final
|
||||||
else
|
else
|
||||||
mkdir -p .cargo
|
|
||||||
rm -f .cargo/config
|
|
||||||
echo "[target.$CARGO_TARGET]" >> .cargo/config
|
|
||||||
echo "linker= \"$CC\"" >> .cargo/config
|
|
||||||
cat .cargo/config
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo "_____ Building target: "$CARGO_TARGET" _____"
|
|
||||||
time cargo build --target $CARGO_TARGET --release --features final
|
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 evmbin
|
||||||
time cargo build --target $CARGO_TARGET --release -p ethstore-cli
|
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 ethkey-cli
|
||||||
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
time cargo build --target $CARGO_TARGET --release -p whisper-cli
|
||||||
|
fi
|
||||||
|
|
||||||
echo "_____ Post-processing binaries _____"
|
echo "_____ Post-processing binaries _____"
|
||||||
rm -rf artifacts
|
rm -rf artifacts
|
||||||
@ -37,11 +29,17 @@ mkdir -p artifacts
|
|||||||
cd artifacts
|
cd artifacts
|
||||||
mkdir -p $CARGO_TARGET
|
mkdir -p $CARGO_TARGET
|
||||||
cd $CARGO_TARGET
|
cd $CARGO_TARGET
|
||||||
|
if [ "${CARGO_TARGET}" = "armv7-linux-androideabi" ]
|
||||||
|
then
|
||||||
|
# only thing we need for android
|
||||||
|
cp -v ../../target/$CARGO_TARGET/release/libparity.so ./libparity.so
|
||||||
|
else
|
||||||
cp -v ../../target/$CARGO_TARGET/release/parity ./parity
|
cp -v ../../target/$CARGO_TARGET/release/parity ./parity
|
||||||
cp -v ../../target/$CARGO_TARGET/release/parity-evm ./parity-evm
|
cp -v ../../target/$CARGO_TARGET/release/parity-evm ./parity-evm
|
||||||
cp -v ../../target/$CARGO_TARGET/release/ethstore ./ethstore
|
cp -v ../../target/$CARGO_TARGET/release/ethstore ./ethstore
|
||||||
cp -v ../../target/$CARGO_TARGET/release/ethkey ./ethkey
|
cp -v ../../target/$CARGO_TARGET/release/ethkey ./ethkey
|
||||||
cp -v ../../target/$CARGO_TARGET/release/whisper ./whisper
|
cp -v ../../target/$CARGO_TARGET/release/whisper ./whisper
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# stripping can also be done on release build time
|
# stripping can also be done on release build time
|
||||||
|
Loading…
Reference in New Issue
Block a user