2018-11-11 08:19:04 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2018-10-30 15:31:52 -07:00
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
DRYRUN=
|
|
|
|
if [[ -z $BUILDKITE_BRANCH ]]; then
|
|
|
|
DRYRUN="echo"
|
2018-11-07 10:56:40 -08:00
|
|
|
CHANNEL=unknown
|
2018-10-30 15:31:52 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
eval "$(ci/channel-info.sh)"
|
|
|
|
|
2018-11-06 15:03:58 -08:00
|
|
|
if [[ -n "$BUILDKITE_TAG" ]]; then
|
|
|
|
CHANNEL_OR_TAG=$BUILDKITE_TAG
|
|
|
|
elif [[ -n "$TRIGGERED_BUILDKITE_TAG" ]]; then
|
|
|
|
CHANNEL_OR_TAG=$TRIGGERED_BUILDKITE_TAG
|
|
|
|
else
|
|
|
|
CHANNEL_OR_TAG=$CHANNEL
|
|
|
|
fi
|
|
|
|
|
2018-11-07 10:26:07 -08:00
|
|
|
if [[ -z $CHANNEL_OR_TAG ]]; then
|
|
|
|
echo Unable to determine channel to publish into, exiting.
|
2018-11-30 08:50:17 -08:00
|
|
|
exit 1
|
2018-11-07 10:26:07 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2018-10-30 15:31:52 -07:00
|
|
|
echo --- Creating tarball
|
|
|
|
(
|
|
|
|
set -x
|
|
|
|
rm -rf solana-release/
|
|
|
|
mkdir solana-release/
|
|
|
|
(
|
2018-11-07 10:56:40 -08:00
|
|
|
echo "$CHANNEL_OR_TAG"
|
2018-10-30 15:31:52 -07:00
|
|
|
git rev-parse HEAD
|
|
|
|
) > solana-release/version.txt
|
|
|
|
|
2018-12-19 10:30:24 -08:00
|
|
|
scripts/cargo-install-all.sh solana-release
|
2018-11-12 21:47:48 -08:00
|
|
|
|
2018-11-07 10:56:40 -08:00
|
|
|
./fetch-perf-libs.sh
|
2018-11-12 21:47:48 -08:00
|
|
|
# shellcheck source=/dev/null
|
|
|
|
source ./target/perf-libs/env.sh
|
2018-12-13 10:39:54 -08:00
|
|
|
(
|
|
|
|
cd fullnode
|
|
|
|
cargo install --path . --features=cuda --root ../solana-release-cuda
|
|
|
|
)
|
2018-11-07 10:56:40 -08:00
|
|
|
cp solana-release-cuda/bin/solana-fullnode solana-release/bin/solana-fullnode-cuda
|
2018-10-30 15:31:52 -07:00
|
|
|
|
|
|
|
tar jvcf solana-release.tar.bz2 solana-release/
|
|
|
|
)
|
|
|
|
|
2018-11-13 13:33:15 -08:00
|
|
|
echo --- Saving build artifacts
|
2018-12-13 21:44:50 -08:00
|
|
|
source ci/upload-ci-artifact.sh
|
|
|
|
upload-ci-artifact solana-release.tar.bz2
|
2018-11-07 10:56:40 -08:00
|
|
|
|
2018-12-15 10:10:18 -08:00
|
|
|
if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
|
|
|
|
echo Skipped due to DO_NOT_PUBLISH_TAR
|
|
|
|
exit 0
|
2018-10-30 15:31:52 -07:00
|
|
|
fi
|
|
|
|
|
2018-12-15 10:10:18 -08:00
|
|
|
echo --- AWS S3 Store
|
|
|
|
(
|
|
|
|
set -x
|
2018-12-19 12:57:34 -08:00
|
|
|
$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/solana-release.tar.bz2 \
|
2018-12-15 10:10:18 -08:00
|
|
|
s3://solana-release/"$CHANNEL_OR_TAG"/solana-release.tar.bz2
|
|
|
|
|
|
|
|
echo Published to:
|
|
|
|
$DRYRUN ci/format-url.sh http://solana-release.s3.amazonaws.com/"$CHANNEL_OR_TAG"/solana-release.tar.bz2
|
|
|
|
)
|
2018-12-19 14:19:19 -08:00
|
|
|
|
|
|
|
echo --- ok
|