Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in-tree buildkite pipeline #233

Merged
merged 1 commit into from
May 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ci/buildkite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
steps:
- command: "ci/coverage.sh"
label: "coverage [public]"
- command: "ci/test-stable.sh"
label: "stable [public]"
- command: "ci/test-nightly.sh || true"
label: "nightly - FAILURES IGNORED [public]"
- command: "ci/test-ignored.sh || true"
label: "ignored - FAILURES IGNORED [public]"
- command: "ci/test-cuda.sh"
label: "cuda"
- wait
- command: "ci/publish.sh"
label: "publish release artifacts"
17 changes: 17 additions & 0 deletions ci/coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -e

cd $(dirname $0)/..

source $HOME/.cargo/env
rustup update
export RUST_BACKTRACE=1
cargo build
cargo kcov

if [[ -z "$CODECOV_TOKEN" ]]; then
echo CODECOV_TOKEN undefined
exit 1
fi

bash <(curl -s https://codecov.io/bash)
exit 0
19 changes: 19 additions & 0 deletions ci/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash -e

cd $(dirname $0)/..

if [[ -z "$BUILDKITE_TAG" ]]; then
# Skip publish if this is not a tagged release
exit 0
fi

if [[ -z "$CRATES_IO_TOKEN" ]];
echo CRATES_IO_TOKEN undefined
exit 1
fi

cargo package
# TODO: Ensure the published version matches the contents of BUILDKITE_TAG
cargo publish --token "$CRATES_IO_TOKEN"

exit 0
17 changes: 17 additions & 0 deletions ci/test-cuda.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -e

cd $(dirname $0)/..

if [[ -z "$libcuda_verify_ed25519_URL" ]]; then
echo libcuda_verify_ed25519_URL undefined
exit 1
fi

export LD_LIBRARY_PATH=/usr/local/cuda/lib64
export PATH=$PATH:/usr/local/cuda/bin
curl -X GET -o libcuda_verify_ed25519.a "$libcuda_verify_ed25519_URL"

source $HOME/.cargo/env
cargo test --features=cuda

exit 0
8 changes: 8 additions & 0 deletions ci/test-ignored.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash -e

cd $(dirname $0)/..

source $HOME/.cargo/env
rustup update
export RUST_BACKTRACE=1
cargo test -- --ignored
11 changes: 11 additions & 0 deletions ci/test-nightly.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -e

cd $(dirname $0)/..

source $HOME/.cargo/env
rustup component add rustfmt-preview
cargo fmt -- --write-mode=diff
cargo build --verbose --features unstable
cargo test --verbose --features unstable

exit 0
11 changes: 11 additions & 0 deletions ci/test-stable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -e

cd $(dirname $0)/..

source $HOME/.cargo/env
rustup component add rustfmt-preview
cargo fmt -- --write-mode=diff
cargo build --verbose
cargo test --verbose

exit 0