Skip to content

Commit

Permalink
Consolidate CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Jun 25, 2018
1 parent adfcb79 commit 3496dd9
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 70 deletions.
16 changes: 5 additions & 11 deletions ci/buildkite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,22 @@ steps:
- command: "ci/docker-run.sh rust ci/test-stable.sh"
name: "stable [public]"
timeout_in_minutes: 20
- command: "ci/shellcheck.sh"
name: "shellcheck [public]"
timeout_in_minutes: 20
- wait
- command: "ci/docker-run.sh rustlang/rust:nightly ci/test-nightly.sh"
name: "nightly [public]"
timeout_in_minutes: 20
- command: "ci/docker-run.sh rust ci/test-ignored.sh"
name: "ignored [public]"
timeout_in_minutes: 20
- command: "ci/test-cuda.sh"
name: "cuda [public]"
- command: "ci/test-stable-perf.sh"
name: "stable-perf [public]"
timeout_in_minutes: 20
retry:
automatic:
- exit_status: "*"
limit: 2
agents:
- "queue=cuda"
- command: "ci/shellcheck.sh"
name: "shellcheck [public]"
timeout_in_minutes: 20
- command: "ci/docker-run.sh rust ci/test-erasure.sh"
name: "erasure [public]"
timeout_in_minutes: 20
- command: "ci/snap.sh [public]"
timeout_in_minutes: 20
name: "snap [public]"
Expand Down
18 changes: 0 additions & 18 deletions ci/coverage.sh

This file was deleted.

2 changes: 1 addition & 1 deletion ci/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ ARGS+=(
)

set -x
docker run "${ARGS[@]}" "$IMAGE" "$@"
exec docker run "${ARGS[@]}" "$IMAGE" "$@"
2 changes: 1 addition & 1 deletion ci/run-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ if [[ ! -x $BKRUN ]]; then
fi

set -x
./ci/node_modules/.bin/bkrun ci/buildkite.yml
exec ./ci/node_modules/.bin/bkrun ci/buildkite.yml
10 changes: 9 additions & 1 deletion ci/snap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ else
SNAP_CHANNEL=beta
fi

if [[ -n $SNAPCRAFT_CREDENTIALS_KEY ]]; then
if [[ -z $DRYRUN ]]; then
[[ -n $SNAPCRAFT_CREDENTIALS_KEY ]] || {
echo SNAPCRAFT_CREDENTIALS_KEY not defined
exit 1;
}
(
openssl aes-256-cbc -d \
-in ci/snapcraft.credentials.enc \
Expand All @@ -28,5 +32,9 @@ if [[ -n $SNAPCRAFT_CREDENTIALS_KEY ]]; then
fi

set -x

echo --- build
snapcraft

echo --- publish
$DRYRUN snapcraft push solana_*.snap --release $SNAP_CHANNEL
13 changes: 0 additions & 13 deletions ci/test-erasure.sh

This file was deleted.

9 changes: 0 additions & 9 deletions ci/test-ignored.sh

This file was deleted.

30 changes: 24 additions & 6 deletions ci/test-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,31 @@

cd "$(dirname "$0")/.."

export RUST_BACKTRACE=1
rustc --version
cargo --version

export RUST_BACKTRACE=1
cargo build --verbose --features unstable
cargo test --verbose --features unstable
cargo bench --verbose --features unstable
ci/coverage.sh
_() {
echo "--- $*"
"$@"
}

_ cargo build --verbose --features unstable
_ cargo test --verbose --features unstable
_ cargo bench --verbose --features unstable


# Coverage ...
_ cargo install --force cargo-cov
_ cargo cov test
_ cargo cov report

echo --- Coverage report:
ls -l target/cov/report/index.html

if [[ -z "$CODECOV_TOKEN" ]]; then
echo CODECOV_TOKEN undefined
else
bash <(curl -s https://codecov.io/bash) -x 'llvm-cov gcov'
fi

exit 0
7 changes: 3 additions & 4 deletions ci/test-cuda.sh → ci/test-stable-perf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ cd "$(dirname "$0")/.."

./fetch-perf-libs.sh

export LD_LIBRARY_PATH=/usr/local/cuda/lib64
export LD_LIBRARY_PATH=$PWD:/usr/local/cuda/lib64
export PATH=$PATH:/usr/local/cuda/bin

export RUST_BACKTRACE=1
cargo test --features=cuda

exit 0
set -x
exec cargo test --features=cuda,erasure
16 changes: 10 additions & 6 deletions ci/test-stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

cd "$(dirname "$0")/.."

export RUST_BACKTRACE=1
rustc --version
cargo --version

export RUST_BACKTRACE=1
rustup component add rustfmt-preview
cargo fmt -- --write-mode=diff
cargo build --verbose
cargo test --verbose
_() {
echo "--- $*"
"$@"
}

exit 0
_ rustup component add rustfmt-preview
_ cargo fmt -- --write-mode=diff
_ cargo build --verbose
_ cargo test --verbose
_ cargo test -- --ignored

0 comments on commit 3496dd9

Please sign in to comment.