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:
40
.travis.yml
Normal file
40
.travis.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
os:
|
||||||
|
- osx
|
||||||
|
- windows
|
||||||
|
|
||||||
|
language: rust
|
||||||
|
cache: cargo
|
||||||
|
rust:
|
||||||
|
- 1.35.0
|
||||||
|
|
||||||
|
install:
|
||||||
|
- source ci/rust-version.sh
|
||||||
|
- test $rust_stable = $TRAVIS_RUST_VERSION # Update .travis.yml rust version above when this fails
|
||||||
|
|
||||||
|
script:
|
||||||
|
- source ci/env.sh
|
||||||
|
- ci/publish-tarball.sh
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
recipients:
|
||||||
|
- mvines@solana.com
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
- provider: s3
|
||||||
|
access_key_id: $AWS_ACCESS_KEY_ID
|
||||||
|
secret_access_key: $AWS_SECRET_ACCESS_KEY
|
||||||
|
bucket: release.solana.com
|
||||||
|
region: us-west-1
|
||||||
|
skip_cleanup: true
|
||||||
|
acl: public_read
|
||||||
|
local_dir: travis-s3-upload
|
||||||
|
on:
|
||||||
|
all_branches: true
|
||||||
|
- provider: releases
|
||||||
|
api_key: $GITHUB_TOKEN
|
||||||
|
skip_cleanup: true
|
||||||
|
file_glob: true
|
||||||
|
file: travis-$TRAVIS_TAG-upload/*
|
||||||
|
on:
|
||||||
|
tags: true
|
31
README.md
31
README.md
@ -30,6 +30,37 @@ Before you jump into the code, review the online book [Solana: Blockchain Rebuil
|
|||||||
|
|
||||||
(The _latest_ development version of the online book is also [available here](https://solana-labs.github.io/book-edge/).)
|
(The _latest_ development version of the online book is also [available here](https://solana-labs.github.io/book-edge/).)
|
||||||
|
|
||||||
|
Release Binaries
|
||||||
|
===
|
||||||
|
Official release binaries are available at [Github Releases](https://github.com/solana-labs/solana/releases).
|
||||||
|
|
||||||
|
Additionally we provide pre-release binaries for the latest code on the edge and
|
||||||
|
beta channels. Note that these pre-release binaries may be less stable than an
|
||||||
|
official release.
|
||||||
|
|
||||||
|
### Edge channel
|
||||||
|
#### Linux (x86_64-unknown-linux-gnu)
|
||||||
|
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-unknown-linux-gnu.tar.bz2)
|
||||||
|
* [solana-install](http://release.solana.com/edge/solana-install-x86_64-unknown-linux-gnu) as a stand-alone executable
|
||||||
|
#### mac OS (x86_64-apple-darwin)
|
||||||
|
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-apple-darwin.tar.bz2)
|
||||||
|
* [solana-install](http://release.solana.com/edge/solana-install-x86_64-apple-darwin) as a stand-alone executable
|
||||||
|
#### Windows (x86_64-pc-windows-msvc)
|
||||||
|
* [solana.tar.bz2](http://release.solana.com/edge/solana-release-x86_64-pc-windows-msvc.tar.bz2)
|
||||||
|
* [solana-install.exe](http://release.solana.com/edge/solana-install-x86_64-pc-windows-msvc.exe) as a stand-alone executable
|
||||||
|
|
||||||
|
|
||||||
|
### Beta channel
|
||||||
|
#### Linux (x86_64-unknown-linux-gnu)
|
||||||
|
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-unknown-linux-gnu.tar.bz2)
|
||||||
|
* [solana-install](http://release.solana.com/beta/solana-install-x86_64-unknown-linux-gnu) as a stand-alone executable
|
||||||
|
#### mac OS (x86_64-apple-darwin)
|
||||||
|
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-apple-darwin.tar.bz2)
|
||||||
|
* [solana-install](http://release.solana.com/beta/solana-install-x86_64-apple-darwin) as a stand-alone executable
|
||||||
|
#### Windows (x86_64-pc-windows-msvc)
|
||||||
|
* [solana.tar.bz2](http://release.solana.com/beta/solana-release-x86_64-pc-windows-msvc.tar.bz2)
|
||||||
|
* [solana-install.exe](http://release.solana.com/beta/solana-install-x86_64-pc-windows-msvc.exe) as a stand-alone executable
|
||||||
|
|
||||||
Developing
|
Developing
|
||||||
===
|
===
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ if ${CI:-false}; then
|
|||||||
else
|
else
|
||||||
export CI_PULL_REQUEST=
|
export CI_PULL_REQUEST=
|
||||||
fi
|
fi
|
||||||
|
export CI_OS_NAME=$TRAVIS_OS_NAME
|
||||||
export CI_TAG=$TRAVIS_TAG
|
export CI_TAG=$TRAVIS_TAG
|
||||||
fi
|
fi
|
||||||
if ${BUILDKITE:-false}; then
|
if ${BUILDKITE:-false}; then
|
||||||
@ -30,6 +31,7 @@ if ${CI:-false}; then
|
|||||||
else
|
else
|
||||||
export CI_PULL_REQUEST=
|
export CI_PULL_REQUEST=
|
||||||
fi
|
fi
|
||||||
|
export CI_OS_NAME=linux
|
||||||
# TRIGGERED_BUILDKITE_TAG is a workaround to propagate BUILDKITE_TAG into
|
# TRIGGERED_BUILDKITE_TAG is a workaround to propagate BUILDKITE_TAG into
|
||||||
# the solana-secondary builder
|
# the solana-secondary builder
|
||||||
if [[ -n $TRIGGERED_BUILDKITE_TAG ]]; then
|
if [[ -n $TRIGGERED_BUILDKITE_TAG ]]; then
|
||||||
@ -44,6 +46,7 @@ else
|
|||||||
export CI_BUILD_ID=
|
export CI_BUILD_ID=
|
||||||
export CI_COMMIT=
|
export CI_COMMIT=
|
||||||
export CI_JOB_ID=
|
export CI_JOB_ID=
|
||||||
|
export CI_OS_NAME=
|
||||||
export CI_PULL_REQUEST=
|
export CI_PULL_REQUEST=
|
||||||
export CI_TAG=
|
export CI_TAG=
|
||||||
fi
|
fi
|
||||||
@ -54,6 +57,7 @@ CI_BRANCH=$CI_BRANCH
|
|||||||
CI_BUILD_ID=$CI_BUILD_ID
|
CI_BUILD_ID=$CI_BUILD_ID
|
||||||
CI_COMMIT=$CI_COMMIT
|
CI_COMMIT=$CI_COMMIT
|
||||||
CI_JOB_ID=$CI_JOB_ID
|
CI_JOB_ID=$CI_JOB_ID
|
||||||
|
CI_OS_NAME=$CI_OS_NAME
|
||||||
CI_PULL_REQUEST=$CI_PULL_REQUEST
|
CI_PULL_REQUEST=$CI_PULL_REQUEST
|
||||||
CI_TAG=$CI_TAG
|
CI_TAG=$CI_TAG
|
||||||
EOF
|
EOF
|
||||||
|
@ -24,12 +24,17 @@ if [[ -z $CHANNEL_OR_TAG ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$(uname)" in
|
PERF_LIBS=false
|
||||||
Darwin)
|
case "$CI_OS_NAME" in
|
||||||
|
osx)
|
||||||
TARGET=x86_64-apple-darwin
|
TARGET=x86_64-apple-darwin
|
||||||
;;
|
;;
|
||||||
Linux)
|
linux)
|
||||||
TARGET=x86_64-unknown-linux-gnu
|
TARGET=x86_64-unknown-linux-gnu
|
||||||
|
PERF_LIBS=true
|
||||||
|
;;
|
||||||
|
windows)
|
||||||
|
TARGET=x86_64-pc-windows-msvc
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
TARGET=unknown-unknown-unknown
|
TARGET=unknown-unknown-unknown
|
||||||
@ -53,6 +58,7 @@ echo --- Creating tarball
|
|||||||
source ci/rust-version.sh stable
|
source ci/rust-version.sh stable
|
||||||
scripts/cargo-install-all.sh +"$rust_stable" solana-release
|
scripts/cargo-install-all.sh +"$rust_stable" solana-release
|
||||||
|
|
||||||
|
if $PERF_LIBS; then
|
||||||
rm -rf target/perf-libs
|
rm -rf target/perf-libs
|
||||||
./fetch-perf-libs.sh
|
./fetch-perf-libs.sh
|
||||||
mkdir solana-release/target
|
mkdir solana-release/target
|
||||||
@ -65,6 +71,8 @@ echo --- Creating tarball
|
|||||||
cargo +"$rust_stable" install --path . --features=cuda --root ../solana-release-cuda
|
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 solana-release-cuda/bin/solana-validator solana-release/bin/solana-validator-cuda
|
||||||
|
fi
|
||||||
|
|
||||||
cp -a scripts multinode-demo solana-release/
|
cp -a scripts multinode-demo solana-release/
|
||||||
|
|
||||||
# Add a wrapper script for validator.sh
|
# Add a wrapper script for validator.sh
|
||||||
@ -103,6 +111,7 @@ if [[ -n $DO_NOT_PUBLISH_TAR ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for file in solana-release-$TARGET.tar.bz2 solana-install-$TARGET; do
|
for file in solana-release-$TARGET.tar.bz2 solana-install-$TARGET; do
|
||||||
|
if [[ -n $BUILDKITE ]]; then
|
||||||
echo --- AWS S3 Store: $file
|
echo --- AWS S3 Store: $file
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
@ -112,15 +121,27 @@ for file in solana-release-$TARGET.tar.bz2 solana-install-$TARGET; do
|
|||||||
--env AWS_SECRET_ACCESS_KEY \
|
--env AWS_SECRET_ACCESS_KEY \
|
||||||
--volume "$PWD:/solana" \
|
--volume "$PWD:/solana" \
|
||||||
eremite/aws-cli:2018.12.18 \
|
eremite/aws-cli:2018.12.18 \
|
||||||
/usr/bin/s3cmd --acl-public put /solana/"$file" s3://release.solana.com/"$CHANNEL_OR_TAG"/"$file"
|
/usr/bin/s3cmd --acl-public put /solana/"$file" s3://release.solana.com/"$CHANNEL_OR_TAG"/$file
|
||||||
|
|
||||||
echo Published to:
|
echo Published to:
|
||||||
$DRYRUN ci/format-url.sh http://release.solana.com/"$CHANNEL_OR_TAG"/"$file"
|
$DRYRUN ci/format-url.sh http://release.solana.com/"$CHANNEL_OR_TAG"/$file
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ -n $TAG ]]; then
|
if [[ -n $TAG ]]; then
|
||||||
ci/upload-github-release-asset.sh $file
|
ci/upload-github-release-asset.sh $file
|
||||||
fi
|
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
|
done
|
||||||
|
|
||||||
echo --- ok
|
echo --- ok
|
||||||
|
@ -66,9 +66,9 @@ main() {
|
|||||||
Linux)
|
Linux)
|
||||||
TARGET=x86_64-unknown-linux-gnu
|
TARGET=x86_64-unknown-linux-gnu
|
||||||
;;
|
;;
|
||||||
# Darwin)
|
Darwin)
|
||||||
# TARGET=x86_64-apple-darwin
|
TARGET=x86_64-apple-darwin
|
||||||
# ;;
|
;;
|
||||||
*)
|
*)
|
||||||
err "machine architecture is currently unsupported"
|
err "machine architecture is currently unsupported"
|
||||||
;;
|
;;
|
||||||
|
@ -29,26 +29,26 @@ SECONDS=0
|
|||||||
cargo $rust_version build --all --release --features="$cargoFeatures"
|
cargo $rust_version build --all --release --features="$cargoFeatures"
|
||||||
)
|
)
|
||||||
|
|
||||||
BIN_CRATES=(
|
PROGRAMS=(
|
||||||
bench-exchange
|
solana-drone
|
||||||
bench-streamer
|
solana-genesis
|
||||||
bench-tps
|
solana-gossip
|
||||||
drone
|
solana-install
|
||||||
genesis
|
solana-keygen
|
||||||
gossip
|
solana-ledger-tool
|
||||||
install
|
solana-replicator
|
||||||
keygen
|
solana-validator
|
||||||
ledger-tool
|
solana-wallet
|
||||||
replicator
|
solana-bench-exchange
|
||||||
validator
|
solana-bench-streamer
|
||||||
wallet
|
solana-bench-tps
|
||||||
)
|
)
|
||||||
|
|
||||||
for crate in "${BIN_CRATES[@]}"; do
|
for program in "${PROGRAMS[@]}"; do
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote $rust_version
|
mkdir -p "$installDir"/bin
|
||||||
cargo $rust_version install --force --path "$crate" --root "$installDir" --features="$cargoFeatures"
|
cp target/release/"$program" "$installDir"/bin
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user