-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(fix): update scripts for ci workflows (#3)
Description Updated some of the workflow use dscripts Motivation and Context Improve CI How Has This Been Tested? Not What process can a PR reviewer use to test or verify this change? Not yet <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
- Loading branch information
Showing
10 changed files
with
347 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Move all cross-compiling steps into a single sourced script | ||
# | ||
|
||
set -e | ||
|
||
printenv | ||
|
||
if [ "${TARGETARCH}" = "arm64" ] ; then | ||
platform_env=aarch64 | ||
export BUILD_TARGET="${platform_env}-unknown-linux-gnu/" | ||
export RUST_TARGET="--target=${platform_env}-unknown-linux-gnu" | ||
#export ARCH=${ARCH:-generic} | ||
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=${platform_env}-linux-gnu-gcc | ||
export CC_aarch64_unknown_linux_gnu=${platform_env}-linux-gnu-gcc | ||
export CXX_aarch64_unknown_linux_gnu=${platform_env}-linux-gnu-g++ | ||
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot /usr/${platform_env}-linux-gnu/include/" | ||
#export RUSTFLAGS="-C target_cpu=$ARCH" | ||
#export ROARING_ARCH=$ARCH | ||
rustup target add ${platform_env}-unknown-linux-gnu | ||
rustup toolchain install stable-${platform_env}-unknown-linux-gnu --force-non-host | ||
|
||
# Check for Debian | ||
if [ -f "/etc/debian_version" ] ; then | ||
dpkg --add-architecture ${TARGETARCH} | ||
apt-get update || true | ||
apt-get install -y pkg-config libssl-dev:${TARGETARCH} gcc-${platform_env}-linux-gnu g++-${platform_env}-linux-gnu | ||
export AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR=/usr/include/${platform_env}-linux-gnu/openssl/ | ||
export PKG_CONFIG_ALLOW_CROSS=1 | ||
fi | ||
|
||
elif [ "${TARGETARCH}" = "amd64" ] ; then | ||
platform_env=x86_64 | ||
platform_env_alt=x86-64 | ||
export BUILD_TARGET="${platform_env}-unknown-linux-gnu/" | ||
export RUST_TARGET="--target=${platform_env}-unknown-linux-gnu" | ||
# https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html | ||
#export ARCH=${ARCH:-x86-64} | ||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=${platform_env}-linux-gnu-gcc | ||
export CC_x86_64_unknown_linux_gnu=${platform_env_alt}-linux-gnu-gcc | ||
export CXX_x86_64_unknown_linux_gnu=${platform_env_alt}-linux-gnu-g++ | ||
export BINDGEN_EXTRA_CLANG_ARGS="--sysroot /usr/${platform_env}-linux-gnu/include/" | ||
rustup target add ${platform_env}-unknown-linux-gnu | ||
rustup toolchain install stable-${platform_env}-unknown-linux-gnu --force-non-host | ||
|
||
# Check for Debian | ||
if [ -f "/etc/debian_version" ] ; then | ||
dpkg --add-architecture ${TARGETARCH} | ||
apt-get update | ||
apt-get install -y pkg-config libssl-dev:${TARGETARCH} gcc-${platform_env_alt}-linux-gnu g++-${platform_env_alt}-linux-gnu | ||
export X86_64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR=/usr/include/${platform_env}-linux-gnu/openssl/ | ||
export PKG_CONFIG_ALLOW_CROSS=1 | ||
fi | ||
|
||
else | ||
echo "Need to source [ ${0##*/} ] with env TARGETARCH set to either arm64 or amd64" | ||
exit 1 | ||
fi |
Oops, something went wrong.