mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-17 22:24:34 +08:00
fix: repair dist builds, restore binaries in main Dockerfile, fix build on Windows and non-x86_64 targets
This commit is contained in:
@@ -9,4 +9,6 @@ api/data
|
||||
testnet/index.html
|
||||
testnet.log
|
||||
testnet-logs*
|
||||
legacy
|
||||
legacy
|
||||
build-scripts
|
||||
dist
|
||||
29
.github/workflows/deploy.yml
vendored
Normal file
29
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
dist:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [ windows_x64, macos_x64, linux_x64, linux_musl_x64, linux_musl_x64, linux_armv7, linux_arm64 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build distributable
|
||||
env:
|
||||
DIST_TARGET_FILTER: ${{ matrix.platform }}
|
||||
run: build-scripts/build-dist.sh
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
11
Cargo.toml
11
Cargo.toml
@@ -49,9 +49,8 @@ regex = "1"
|
||||
mio = "0.6"
|
||||
libc = "0.2"
|
||||
lazy_static = "1.4.0"
|
||||
url = "2.1.1"
|
||||
sha2 = { version = "0.8.0", optional = true }
|
||||
sha2-asm = { version="0.5.3", optional = true }
|
||||
url = "2.1.1"
|
||||
sha2 = "0.8.0"
|
||||
|
||||
[dependencies.serde_json]
|
||||
version = "1.0"
|
||||
@@ -83,10 +82,10 @@ criterion = "0.3"
|
||||
|
||||
[features]
|
||||
developer-mode = []
|
||||
asm = ["sha2", "sha2-asm"]
|
||||
aarch64 = ["developer-mode", "sha2"]
|
||||
default = ["developer-mode", "asm"]
|
||||
default = ["developer-mode"]
|
||||
|
||||
[target.'cfg(all(target_arch = "x86_64", not(target_env = "msvc")))'.dependencies]
|
||||
sha2-asm = "0.5.3"
|
||||
|
||||
[workspace]
|
||||
members = [".", "testnet/"]
|
||||
|
||||
11
Dockerfile
11
Dockerfile
@@ -1,13 +1,16 @@
|
||||
FROM rust:latest as build
|
||||
|
||||
WORKDIR /src/stacks-blockchain
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN cd testnet && cargo install --path . --root .
|
||||
RUN cargo build --release --workspace=./
|
||||
RUN cd /src/target/release && \
|
||||
mkdir /out && \
|
||||
cp blockstack-core /out && cp blockstack-cli /out && cp clarity-cli /out && cp stacks-node /out
|
||||
|
||||
FROM debian:stable-slim
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends libssl-dev
|
||||
COPY --from=build /src/stacks-blockchain/testnet/bin /bin
|
||||
|
||||
COPY --from=build /out/ /bin/
|
||||
|
||||
CMD ["stacks-node", "neon"]
|
||||
17
build-scripts/Dockerfile.linux-arm64
Normal file
17
build-scripts/Dockerfile.linux-arm64
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM rust:stretch as build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rustup target add aarch64-unknown-linux-gnu
|
||||
|
||||
RUN apt-get update && apt-get install -y gcc-aarch64-linux-gnu
|
||||
|
||||
RUN CC=aarch64-linux-gnu-gcc \
|
||||
CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
|
||||
cargo build --release --workspace=./ --target aarch64-unknown-linux-gnu
|
||||
|
||||
FROM scratch AS export-stage
|
||||
COPY --from=build /src/target/aarch64-unknown-linux-gnu/release /
|
||||
17
build-scripts/Dockerfile.linux-armv7
Normal file
17
build-scripts/Dockerfile.linux-armv7
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM rust:stretch as build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rustup target add armv7-unknown-linux-gnueabihf
|
||||
|
||||
RUN apt-get update && apt-get install -y gcc-arm-linux-gnueabihf
|
||||
|
||||
RUN CC=arm-linux-gnueabihf-gcc \
|
||||
CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
|
||||
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
|
||||
cargo build --release --workspace=./ --target armv7-unknown-linux-gnueabihf
|
||||
|
||||
FROM scratch AS export-stage
|
||||
COPY --from=build /src/target/armv7-unknown-linux-gnueabihf/release /
|
||||
17
build-scripts/Dockerfile.linux-musl-x64
Normal file
17
build-scripts/Dockerfile.linux-musl-x64
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM rust:stretch as build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
RUN apt-get update && apt-get install -y musl-tools
|
||||
|
||||
RUN CC=musl-gcc \
|
||||
CC_x86_64_unknown_linux_musl=musl-gcc \
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \
|
||||
cargo build --release --workspace=./ --target x86_64-unknown-linux-musl
|
||||
|
||||
FROM scratch AS export-stage
|
||||
COPY --from=build /src/target/x86_64-unknown-linux-musl/release /
|
||||
12
build-scripts/Dockerfile.linux-x64
Normal file
12
build-scripts/Dockerfile.linux-x64
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM rust:stretch as build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rustup target add x86_64-unknown-linux-gnu
|
||||
|
||||
RUN cargo build --release --workspace=./ --target x86_64-unknown-linux-gnu
|
||||
|
||||
FROM scratch AS export-stage
|
||||
COPY --from=build /src/target/x86_64-unknown-linux-gnu/release /
|
||||
24
build-scripts/Dockerfile.macos-x64
Normal file
24
build-scripts/Dockerfile.macos-x64
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM rust:stretch as build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rustup target add x86_64-apple-darwin
|
||||
|
||||
RUN apt-get update && apt-get install -y clang
|
||||
|
||||
RUN wget -nc "https://github.com/blockstackpbc/osxcross/releases/download/v1/osxcross-e0a1718_xcode-v10.2.1.tar.xz" && \
|
||||
tar --checkpoint=25000 -xf "osxcross-e0a1718_xcode-v10.2.1.tar.xz" -C /tmp && \
|
||||
PATH="/tmp/osxcross/bin:$PATH" \
|
||||
LD_LIBRARY_PATH="/tmp/osxcross/lib:$LD_LIBRARY_PATH" \
|
||||
CC=o64-clang \
|
||||
CXX=o64-clang++ \
|
||||
LIBZ_SYS_STATIC=1 \
|
||||
CC_x86_64_apple_darwin=x86_64-apple-darwin18-clang \
|
||||
CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=x86_64-apple-darwin18-clang \
|
||||
CARGO_TARGET_X86_64_APPLE_DARWIN_AR=x86_64-apple-darwin18-ar \
|
||||
cargo build --target x86_64-apple-darwin --release --workspace=./
|
||||
|
||||
FROM scratch AS export-stage
|
||||
COPY --from=build /src/target/x86_64-apple-darwin/release /
|
||||
16
build-scripts/Dockerfile.windows-x64
Normal file
16
build-scripts/Dockerfile.windows-x64
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM rust:stretch as build
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN rustup target add x86_64-pc-windows-gnu
|
||||
|
||||
RUN apt-get update && apt-get install -y gcc-mingw-w64-x86-64
|
||||
|
||||
RUN CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc \
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc \
|
||||
cargo build --release --workspace=./ --target x86_64-pc-windows-gnu
|
||||
|
||||
FROM scratch AS export-stage
|
||||
COPY --from=build /src/target/x86_64-pc-windows-gnu/release /
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This is intended to run within the rust-stretch docker image (or a debian-like system with required dependencies).
|
||||
|
||||
cd "$(dirname "$(dirname "$0")")"
|
||||
|
||||
apt-get update
|
||||
apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc-aarch64-linux-gnu \
|
||||
libc6-dev-arm64-cross
|
||||
|
||||
rustup target add aarch64-unknown-linux-gnu
|
||||
|
||||
CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \
|
||||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \
|
||||
cargo build --target aarch64-unknown-linux-gnu --release --features "aarch64" --no-default-features
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This is intended to run within the rust-stretch docker image (or a debian-like system with required dependencies).
|
||||
|
||||
cd "$(dirname "$(dirname "$0")")"
|
||||
|
||||
apt-get update
|
||||
apt-get install -qq gcc-arm-linux-gnueabihf
|
||||
|
||||
rustup target add armv7-unknown-linux-gnueabihf
|
||||
|
||||
CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc \
|
||||
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc \
|
||||
cargo build --target armv7-unknown-linux-gnueabihf --release --features "aarch64" --no-default-features
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This is intended to run within the rust-stretch docker image (or a debian-like system with required dependencies).
|
||||
|
||||
cd "$(dirname "$(dirname "$0")")"
|
||||
|
||||
apt-get update
|
||||
apt-get install -y musl-tools
|
||||
|
||||
rustup target add x86_64-unknown-linux-musl
|
||||
|
||||
CC_x86_64_unknown_linux_musl=musl-gcc \
|
||||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc \
|
||||
cargo build --target x86_64-unknown-linux-musl --release
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This is intended to run within the rust-stretch docker image (or a debian-like system with required dependencies).
|
||||
|
||||
cd "$(dirname "$(dirname "$0")")"
|
||||
|
||||
rustup target add x86_64-unknown-linux-gnu
|
||||
cargo build --target x86_64-unknown-linux-gnu --release
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This is intended to run within the rust-stretch docker image (or a debian-like system with required dependencies).
|
||||
|
||||
### This script uses osxcross [https://github.com/tpoechtrager/osxcross] to cross-compile from linux to MacOS.
|
||||
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$(dirname "$0")")"
|
||||
|
||||
apt-get update
|
||||
apt-get install -y clang
|
||||
|
||||
build_sdk () {
|
||||
apt-get update
|
||||
apt-get install -y clang cmake
|
||||
git clone https://github.com/blockstackpbc/osxcross --depth=1
|
||||
wget -N "https://github.com/blockstackpbc/osxcross/releases/download/v1/MacOSX10.14.sdk.tar.bz2" --directory-prefix=osxcross/tarballs/
|
||||
UNATTENDED=yes DISABLE_LTO_SUPPORT=1 OSX_VERSION_MIN=10.7 ./osxcross/build.sh
|
||||
cd ./osxcross
|
||||
BINARYPACKAGE=1 ./package.sh
|
||||
}
|
||||
|
||||
fetch_extract_sdk() {
|
||||
wget -nc "https://github.com/blockstackpbc/osxcross/releases/download/v1/osxcross-e0a1718_xcode-v10.2.1.tar.xz"
|
||||
echo "Extracting osxcross package..."
|
||||
tar --checkpoint=25000 -xf "osxcross-e0a1718_xcode-v10.2.1.tar.xz" -C /tmp
|
||||
}
|
||||
|
||||
fetch_extract_sdk
|
||||
rustup target add x86_64-apple-darwin
|
||||
|
||||
PATH="/tmp/osxcross/bin:$PATH" \
|
||||
LD_LIBRARY_PATH="/tmp/osxcross/lib:$LD_LIBRARY_PATH" \
|
||||
CC=o64-clang \
|
||||
CXX=o64-clang++ \
|
||||
LIBZ_SYS_STATIC=1 \
|
||||
CC_x86_64_apple_darwin=x86_64-apple-darwin18-clang \
|
||||
CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=x86_64-apple-darwin18-clang \
|
||||
CARGO_TARGET_X86_64_APPLE_DARWIN_AR=x86_64-apple-darwin18-ar \
|
||||
cargo build --target x86_64-apple-darwin --release
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This is intended to run within the rust-stretch docker image (or a debian-like system with required dependencies).
|
||||
|
||||
cd "$(dirname "$(dirname "$0")")"
|
||||
|
||||
apt-get update
|
||||
apt-get install -y gcc-mingw-w64-x86-64
|
||||
|
||||
rustup target add x86_64-pc-windows-gnu
|
||||
|
||||
CC_x86_64_pc_windows_gnu=x86_64-w64-mingw32-gcc \
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc \
|
||||
cargo build --target x86_64-pc-windows-gnu --release
|
||||
81
build-scripts/build-dist.sh
Executable file
81
build-scripts/build-dist.sh
Executable file
@@ -0,0 +1,81 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
script_path="$(dirname "$0")"
|
||||
src_dir="$(dirname "$script_path")"
|
||||
cd "$src_dir"
|
||||
|
||||
build_linux_x64 () {
|
||||
dist_archive="dist/stacks-blockchain-linux-x64.tar.bz2"
|
||||
rm -rf $dist_archive dist/linux-x64
|
||||
DOCKER_BUILDKIT=1 docker build -o dist/linux-x64 -f ./build-scripts/Dockerfile.linux-x64 .
|
||||
tar cfvj $dist_archive -C dist/linux-x64 blockstack-core blockstack-cli clarity-cli stacks-node
|
||||
rm -rf dist/linux-x64
|
||||
}
|
||||
|
||||
build_linux_musl_x64 () {
|
||||
dist_archive="dist/stacks-blockchain-linux-musl-x64.tar.bz2"
|
||||
rm -rf $dist_archive dist/linux-musl-x64
|
||||
DOCKER_BUILDKIT=1 docker build -o dist/linux-musl-x64 -f ./build-scripts/Dockerfile.linux-musl-x64 .
|
||||
tar cfvj $dist_archive -C dist/linux-musl-x64 blockstack-core blockstack-cli clarity-cli stacks-node
|
||||
rm -rf dist/linux-musl-x64
|
||||
}
|
||||
|
||||
build_linux_armv7 () {
|
||||
dist_archive="dist/stacks-blockchain-linux-armv7.tar.bz2"
|
||||
rm -rf $dist_archive dist/linux-armv7
|
||||
DOCKER_BUILDKIT=1 docker build -o dist/linux-armv7 -f ./build-scripts/Dockerfile.linux-armv7 .
|
||||
tar cfvj $dist_archive -C dist/linux-armv7 blockstack-core blockstack-cli clarity-cli stacks-node
|
||||
rm -rf dist/linux-armv7
|
||||
}
|
||||
|
||||
build_linux_arm64 () {
|
||||
dist_archive="dist/stacks-blockchain-linux-arm64.tar.bz2"
|
||||
rm -rf $dist_archive dist/linux-arm64
|
||||
DOCKER_BUILDKIT=1 docker build -o dist/linux-arm64 -f ./build-scripts/Dockerfile.linux-arm64 .
|
||||
tar cfvj $dist_archive -C dist/linux-arm64 blockstack-core blockstack-cli clarity-cli stacks-node
|
||||
rm -rf dist/linux-arm64
|
||||
}
|
||||
|
||||
build_macos_x64 () {
|
||||
dist_archive="dist/stacks-blockchain-macos-x64.tar.bz2"
|
||||
rm -rf $dist_archive dist/macos-x64
|
||||
DOCKER_BUILDKIT=1 docker build -o dist/macos-x64 -f ./build-scripts/Dockerfile.macos-x64 .
|
||||
tar cfvj $dist_archive -C dist/macos-x64 blockstack-core blockstack-cli clarity-cli stacks-node
|
||||
rm -rf dist/macos-x64
|
||||
}
|
||||
|
||||
build_windows_x64 () {
|
||||
dist_archive="dist/stacks-blockchain-windows-x64.tar.bz2"
|
||||
rm -rf $dist_archive dist/windows-x64
|
||||
DOCKER_BUILDKIT=1 docker build -o dist/windows-x64 -f ./build-scripts/Dockerfile.windows-x64 .
|
||||
tar cfvj $dist_archive -C dist/windows-x64 blockstack-core.exe blockstack-cli.exe clarity-cli.exe stacks-node.exe
|
||||
rm -rf dist/windows-x64
|
||||
}
|
||||
|
||||
case $DIST_TARGET_FILTER in
|
||||
(*[![:blank:]]*)
|
||||
case $DIST_TARGET_FILTER in
|
||||
linux_x64) build_linux_x64 ;;
|
||||
linux_musl_x64) build_linux_musl_x64 ;;
|
||||
linux_armv7) build_linux_armv7 ;;
|
||||
linux_arm64) build_linux_arm64 ;;
|
||||
windows_x64) build_windows_x64 ;;
|
||||
macos_x64) build_macos_x64 ;;
|
||||
*)
|
||||
echo "Invalid dist target filter '$DIST_TARGET_FILTER'"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(*)
|
||||
echo "Building distrubtions for all targets."
|
||||
build_linux_x64
|
||||
build_linux_musl_x64
|
||||
build_linux_armv7
|
||||
build_linux_arm64
|
||||
build_windows_x64
|
||||
build_macos_x64
|
||||
;;
|
||||
esac
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
script_path="$(dirname "$0")"
|
||||
src_dir="$(dirname "$script_path")"
|
||||
cd "$src_dir"
|
||||
|
||||
rust_image="rust:1.42.0-stretch"
|
||||
|
||||
docker run \
|
||||
--volume `pwd`:/build \
|
||||
--workdir /build \
|
||||
--tty \
|
||||
--env "DIST_TARGET_FILTER=$DIST_TARGET_FILTER" \
|
||||
$rust_image \
|
||||
bash "$(basename "$script_path")/start-builds.sh"
|
||||
@@ -1,117 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
### This is intended to run within the rust-stretch docker image (or a debian-like system with required dependencies).
|
||||
|
||||
script_path="$(dirname "$0")"
|
||||
src_dir="$(dirname "$script_path")"
|
||||
cd "$src_dir"
|
||||
|
||||
|
||||
dist_dir="$src_dir/dist"
|
||||
mkdir -p "$dist_dir"
|
||||
|
||||
|
||||
### Build and package for Linux-x64 (GNU)
|
||||
build_linux_x64 () {
|
||||
"$script_path/build-dist-linux-x64.sh"
|
||||
dist_archive_linux="$dist_dir/blockstack-core-linux-x64.tar.bz2"
|
||||
rm -f "$dist_archive_linux"
|
||||
tar cfvj "$dist_archive_linux" -C "$src_dir/target/x86_64-unknown-linux-gnu/release" blockstack-core blockstack-cli clarity-cli
|
||||
|
||||
clarity_tgz="$dist_dir/clarity-cli-linux-x64.tar.gz"
|
||||
rm -f "$clarity_tgz"
|
||||
tar czvf "$clarity_tgz" -C "$src_dir/target/x86_64-unknown-linux-gnu/release" clarity-cli
|
||||
}
|
||||
|
||||
|
||||
### Build and package for Linux-musl-x64
|
||||
build_linux_musl_x64 () {
|
||||
"$script_path/build-dist-linux-musl-x64.sh"
|
||||
dist_archive_linux_musl="$dist_dir/blockstack-core-linux-musl-x64.tar.bz2"
|
||||
rm -f "$dist_archive_linux_musl"
|
||||
tar cfvj "$dist_archive_linux_musl" -C "$src_dir/target/x86_64-unknown-linux-musl/release" blockstack-core blockstack-cli clarity-cli
|
||||
|
||||
clarity_tgz="$dist_dir/clarity-cli-linux-musl-x64.tar.gz"
|
||||
rm -f "$clarity_tgz"
|
||||
tar czvf "$clarity_tgz" -C "$src_dir/target/x86_64-unknown-linux-musl/release" clarity-cli
|
||||
}
|
||||
|
||||
### Build and package for Linux-ARMv7 hardfloat
|
||||
build_linux_armv7 () {
|
||||
"$script_path/build-dist-linux-armv7.sh"
|
||||
dist_archive="$dist_dir/blockstack-core-linux-armv7.tar.bz2"
|
||||
rm -f "$dist_archive"
|
||||
tar cfvj "$dist_archive" -C "$src_dir/target/armv7-unknown-linux-gnueabihf/release" blockstack-core blockstack-cli clarity-cli
|
||||
|
||||
clarity_tgz="$dist_dir/clarity-cli-linux-armv7.tar.gz"
|
||||
rm -f "$clarity_tgz"
|
||||
tar czvf "$clarity_tgz" -C "$src_dir/target/armv7-unknown-linux-gnueabihf/release" clarity-cli
|
||||
}
|
||||
|
||||
### Build and package for Linux-ARM64
|
||||
build_linux_arm64 () {
|
||||
"$script_path/build-dist-linux-arm64.sh"
|
||||
dist_archive="$dist_dir/blockstack-core-linux-arm64.tar.bz2"
|
||||
rm -f "$dist_archive"
|
||||
tar cfvj "$dist_archive" -C "$src_dir/target/aarch64-unknown-linux-gnu/release" blockstack-core blockstack-cli clarity-cli
|
||||
|
||||
clarity_tgz="$dist_dir/clarity-cli-linux-arm64.tar.gz"
|
||||
rm -f "$clarity_tgz"
|
||||
tar czvf "$clarity_tgz" -C "$src_dir/target/aarch64-unknown-linux-gnu/release" clarity-cli
|
||||
}
|
||||
|
||||
### Build and package for MacOS-x64
|
||||
build_mac_x64 () {
|
||||
"$script_path/build-dist-mac-x64.sh"
|
||||
dist_archive_mac="$dist_dir/blockstack-core-mac-x64.tar.bz2"
|
||||
rm -f "$dist_archive_mac"
|
||||
tar cfvj "$dist_archive_mac" -C "$src_dir/target/x86_64-apple-darwin/release" blockstack-core blockstack-cli clarity-cli
|
||||
|
||||
clarity_tgz="$dist_dir/clarity-cli-mac-x64.tar.gz"
|
||||
rm -f "$clarity_tgz"
|
||||
tar czvf "$clarity_tgz" -C "$src_dir/target/x86_64-apple-darwin/release" clarity-cli
|
||||
}
|
||||
|
||||
|
||||
### Build and package for Windows-x64 (GNU/mingw)
|
||||
build_win_x64 () {
|
||||
"$script_path/build-dist-win-x64.sh"
|
||||
dist_archive_win="$dist_dir/blockstack-core-win-x64.zip"
|
||||
rm -f "$dist_archive_win"
|
||||
apt-get update && apt-get install -y zip
|
||||
zip -j "$dist_archive_win" \
|
||||
"$src_dir/target/x86_64-pc-windows-gnu/release/blockstack-core.exe" \
|
||||
"$src_dir/target/x86_64-pc-windows-gnu/release/blockstack-cli.exe" \
|
||||
"$src_dir/target/x86_64-pc-windows-gnu/release/clarity-cli.exe"
|
||||
|
||||
clarity_tgz="$dist_dir/clarity-cli-win-x64.tar.gz"
|
||||
rm -f "$clarity_tgz"
|
||||
tar czvf "$clarity_tgz" -C "$src_dir/target/x86_64-pc-windows-gnu/release" clarity-cli.exe
|
||||
}
|
||||
|
||||
|
||||
case $DIST_TARGET_FILTER in
|
||||
(*[![:blank:]]*)
|
||||
case $DIST_TARGET_FILTER in
|
||||
linux_x64) build_linux_x64 ;;
|
||||
linux_musl_x64) build_linux_musl_x64 ;;
|
||||
linux_armv7) build_linux_armv7 ;;
|
||||
linux_arm64) build_linux_arm64 ;;
|
||||
win_x64) build_win_x64 ;;
|
||||
mac_x64) build_mac_x64 ;;
|
||||
*)
|
||||
echo "Invalid dist target filter '$DIST_TARGET_FILTER'"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
(*)
|
||||
build_mac_x64
|
||||
build_linux_x64
|
||||
build_linux_armv7
|
||||
## do not build arm64 by default
|
||||
# build_linux_arm64
|
||||
build_linux_musl_x64
|
||||
build_win_x64
|
||||
;;
|
||||
esac
|
||||
13
circle.yml
13
circle.yml
@@ -6,18 +6,6 @@ executors:
|
||||
docker:
|
||||
- image: circleci/buildpack-deps:stretch
|
||||
jobs:
|
||||
deploy:
|
||||
working_directory: /build
|
||||
docker:
|
||||
- image: rust:1.40-stretch
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
command: |
|
||||
bash build-scripts/start-builds.sh
|
||||
- store_artifacts:
|
||||
path: /build/dist/
|
||||
destination: dist/
|
||||
test_demo:
|
||||
working_directory: /test
|
||||
docker:
|
||||
@@ -115,7 +103,6 @@ workflows:
|
||||
jobs:
|
||||
- unit_tests
|
||||
- test_demo
|
||||
- deploy
|
||||
- build-docker:
|
||||
requires:
|
||||
- unit_tests
|
||||
|
||||
@@ -9,7 +9,7 @@ lazy_static = "1.4.0"
|
||||
mio = "0.6"
|
||||
pico-args = "0.3.1"
|
||||
rand = "=0.7.2"
|
||||
reqwest = { version = "0.10", features = ["blocking", "json"] }
|
||||
reqwest = { version = "0.10", features = ["blocking", "json", "native-tls-vendored"] }
|
||||
secp256k1 = { version = "0.11.5" }
|
||||
serde = "1"
|
||||
serde_derive = "1"
|
||||
|
||||
Reference in New Issue
Block a user