Bring in Travis CI to build Windows and mac OS release binaries (#4591)
* Bring in Travis CI to build Windows and mac OS release binaries * Update .travis.yml
This commit is contained in:
@@ -15,6 +15,7 @@ if ${CI:-false}; then
|
||||
else
|
||||
export CI_PULL_REQUEST=
|
||||
fi
|
||||
export CI_OS_NAME=$TRAVIS_OS_NAME
|
||||
export CI_TAG=$TRAVIS_TAG
|
||||
fi
|
||||
if ${BUILDKITE:-false}; then
|
||||
@@ -30,6 +31,7 @@ if ${CI:-false}; then
|
||||
else
|
||||
export CI_PULL_REQUEST=
|
||||
fi
|
||||
export CI_OS_NAME=linux
|
||||
# TRIGGERED_BUILDKITE_TAG is a workaround to propagate BUILDKITE_TAG into
|
||||
# the solana-secondary builder
|
||||
if [[ -n $TRIGGERED_BUILDKITE_TAG ]]; then
|
||||
@@ -44,6 +46,7 @@ else
|
||||
export CI_BUILD_ID=
|
||||
export CI_COMMIT=
|
||||
export CI_JOB_ID=
|
||||
export CI_OS_NAME=
|
||||
export CI_PULL_REQUEST=
|
||||
export CI_TAG=
|
||||
fi
|
||||
@@ -54,6 +57,7 @@ CI_BRANCH=$CI_BRANCH
|
||||
CI_BUILD_ID=$CI_BUILD_ID
|
||||
CI_COMMIT=$CI_COMMIT
|
||||
CI_JOB_ID=$CI_JOB_ID
|
||||
CI_OS_NAME=$CI_OS_NAME
|
||||
CI_PULL_REQUEST=$CI_PULL_REQUEST
|
||||
CI_TAG=$CI_TAG
|
||||
EOF
|
||||
|
@@ -24,12 +24,17 @@ if [[ -z $CHANNEL_OR_TAG ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$(uname)" in
|
||||
Darwin)
|
||||
PERF_LIBS=false
|
||||
case "$CI_OS_NAME" in
|
||||
osx)
|
||||
TARGET=x86_64-apple-darwin
|
||||
;;
|
||||
Linux)
|
||||
linux)
|
||||
TARGET=x86_64-unknown-linux-gnu
|
||||
PERF_LIBS=true
|
||||
;;
|
||||
windows)
|
||||
TARGET=x86_64-pc-windows-msvc
|
||||
;;
|
||||
*)
|
||||
TARGET=unknown-unknown-unknown
|
||||
@@ -53,18 +58,21 @@ echo --- Creating tarball
|
||||
source ci/rust-version.sh stable
|
||||
scripts/cargo-install-all.sh +"$rust_stable" solana-release
|
||||
|
||||
rm -rf target/perf-libs
|
||||
./fetch-perf-libs.sh
|
||||
mkdir solana-release/target
|
||||
cp -a target/perf-libs solana-release/target/
|
||||
if $PERF_LIBS; then
|
||||
rm -rf target/perf-libs
|
||||
./fetch-perf-libs.sh
|
||||
mkdir solana-release/target
|
||||
cp -a target/perf-libs solana-release/target/
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source ./target/perf-libs/env.sh
|
||||
(
|
||||
cd validator
|
||||
cargo +"$rust_stable" install --path . --features=cuda --root ../solana-release-cuda
|
||||
)
|
||||
cp solana-release-cuda/bin/solana-validator solana-release/bin/solana-validator-cuda
|
||||
fi
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
source ./target/perf-libs/env.sh
|
||||
(
|
||||
cd validator
|
||||
cargo +"$rust_stable" install --path . --features=cuda --root ../solana-release-cuda
|
||||
)
|
||||
cp solana-release-cuda/bin/solana-validator solana-release/bin/solana-validator-cuda
|
||||
cp -a scripts multinode-demo solana-release/
|
||||
|
||||
# Add a wrapper script for validator.sh
|
||||
@@ -103,23 +111,36 @@ if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
|
||||
fi
|
||||
|
||||
for file in solana-release-$TARGET.tar.bz2 solana-install-$TARGET; do
|
||||
echo --- AWS S3 Store: $file
|
||||
(
|
||||
set -x
|
||||
$DRYRUN docker run \
|
||||
--rm \
|
||||
--env AWS_ACCESS_KEY_ID \
|
||||
--env AWS_SECRET_ACCESS_KEY \
|
||||
--volume "$PWD:/solana" \
|
||||
eremite/aws-cli:2018.12.18 \
|
||||
/usr/bin/s3cmd --acl-public put /solana/"$file" s3://release.solana.com/"$CHANNEL_OR_TAG"/"$file"
|
||||
if [[ -n $BUILDKITE ]]; then
|
||||
echo --- AWS S3 Store: $file
|
||||
(
|
||||
set -x
|
||||
$DRYRUN docker run \
|
||||
--rm \
|
||||
--env AWS_ACCESS_KEY_ID \
|
||||
--env AWS_SECRET_ACCESS_KEY \
|
||||
--volume "$PWD:/solana" \
|
||||
eremite/aws-cli:2018.12.18 \
|
||||
/usr/bin/s3cmd --acl-public put /solana/"$file" s3://release.solana.com/"$CHANNEL_OR_TAG"/$file
|
||||
|
||||
echo Published to:
|
||||
$DRYRUN ci/format-url.sh http://release.solana.com/"$CHANNEL_OR_TAG"/"$file"
|
||||
)
|
||||
echo Published to:
|
||||
$DRYRUN ci/format-url.sh http://release.solana.com/"$CHANNEL_OR_TAG"/$file
|
||||
)
|
||||
|
||||
if [[ -n $TAG ]]; then
|
||||
ci/upload-github-release-asset.sh $file
|
||||
if [[ -n $TAG ]]; then
|
||||
ci/upload-github-release-asset.sh $file
|
||||
fi
|
||||
elif [[ -n $TRAVIS ]]; then
|
||||
# .travis.yaml uploads everything in the travis-s3-upload/ directory to release.solana.com
|
||||
mkdir -p travis-s3-upload/"$CHANNEL_OR_TAG"
|
||||
cp -v $file travis-s3-upload/"$CHANNEL_OR_TAG"/
|
||||
|
||||
if [[ -n $TAG ]]; then
|
||||
# .travis.yaml uploads everything in the travis-$TAG-upload/ directory to
|
||||
# the associated Github Release
|
||||
mkdir -p travis-"$TAG"-upload/
|
||||
cp -v $file travis-"$TAG"-upload/
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user