Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 7abf8f4

Browse files
committed
Add in-tree buildkite pipeline
1 parent 2786357 commit 7abf8f4

7 files changed

+98
-0
lines changed

ci/buildkite.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
steps:
2+
- command: "ci/coverage.sh"
3+
label: "coverage [public]"
4+
- command: "ci/test-stable.sh"
5+
label: "stable [public]"
6+
- command: "ci/test-nightly.sh || true"
7+
label: "nightly - FAILURES IGNORED [public]"
8+
- command: "ci/test-ignored.sh || true"
9+
label: "ignored - FAILURES IGNORED [public]"
10+
- command: "ci/test-cuda.sh"
11+
label: "cuda"
12+
- wait
13+
- command: "ci/publish.sh"
14+
label: "publish release artifacts"

ci/coverage.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash -e
2+
3+
cd $(dirname $0)/..
4+
5+
source $HOME/.cargo/env
6+
rustup update
7+
export RUST_BACKTRACE=1
8+
cargo build
9+
cargo kcov
10+
11+
if [[ -z "$CODECOV_TOKEN" ]]; then
12+
echo CODECOV_TOKEN undefined
13+
exit 1
14+
fi
15+
16+
17+
bash <(curl -s https://codecov.io/bash)
18+
exit 0

ci/publish.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash -euo pipefail
2+
3+
cd $(dirname $0)/..
4+
5+
if [[ -z "$BUILDKITE_TAG" ]]; then
6+
# Skip publish if this is not a tagged release
7+
exit 0
8+
fi
9+
10+
if [[ -z "$CRATES_IO_TOKEN" ]];
11+
echo CRATES_IO_TOKEN undefined
12+
exit 1
13+
fi
14+
15+
cargo package
16+
# TODO: Ensure the published version matches the contents of BUILDKITE_TAG
17+
cargo publish --token "$CRATES_IO_TOKEN"
18+
19+
exit 0

ci/test-cuda.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash -e
2+
3+
cd $(dirname $0)/..
4+
5+
if [[ -z "$libcuda_verify_ed25519_URL" ]]; then
6+
echo libcuda_verify_ed25519_URL undefined
7+
exit 1
8+
fi
9+
10+
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
11+
export PATH=$PATH:/usr/local/cuda/bin
12+
curl -X GET -o libcuda_verify_ed25519.a "$libcuda_verify_ed25519_URL"
13+
14+
source $HOME/.cargo/env
15+
cargo test --features=cuda
16+
17+
exit 0

ci/test-ignored.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash -e
2+
3+
cd $(dirname $0)/..
4+
5+
source $HOME/.cargo/env
6+
rustup update
7+
export RUST_BACKTRACE=1
8+
cargo test -- --ignored

ci/test-nightly.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash -e
2+
3+
cd $(dirname $0)/..
4+
5+
source $HOME/.cargo/env
6+
rustup component add rustfmt-preview
7+
cargo fmt -- --write-mode=diff
8+
cargo build --verbose --features unstable
9+
cargo test --verbose --features unstable
10+
11+
exit 0

ci/test-stable.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash -e
2+
3+
cd $(dirname $0)/..
4+
5+
source $HOME/.cargo/env
6+
rustup component add rustfmt-preview
7+
cargo fmt -- --write-mode=diff
8+
cargo build --verbose
9+
cargo test --verbose
10+
11+
exit 0

0 commit comments

Comments
 (0)