diff --git a/ci/buildkite.yml b/ci/buildkite.yml index d6cc061cf60d4b..2d69fbdca46f17 100644 --- a/ci/buildkite.yml +++ b/ci/buildkite.yml @@ -2,15 +2,15 @@ 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: @@ -18,12 +18,6 @@ steps: 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]" diff --git a/ci/coverage.sh b/ci/coverage.sh deleted file mode 100755 index 166235cdfdaa52..00000000000000 --- a/ci/coverage.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -e - -cd "$(dirname "$0")/.." - -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 diff --git a/ci/snap.sh b/ci/snap.sh index ad9232a7b8cfef..c12a9f2801dff0 100755 --- a/ci/snap.sh +++ b/ci/snap.sh @@ -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 \ @@ -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 diff --git a/ci/test-erasure.sh b/ci/test-erasure.sh deleted file mode 100755 index 8705abe38b68c7..00000000000000 --- a/ci/test-erasure.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -e - -set -o xtrace - -cd "$(dirname "$0")/.." - -./fetch-perf-libs.sh - -export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH - -cargo test --features="erasure" - -exit 0 diff --git a/ci/test-ignored.sh b/ci/test-ignored.sh deleted file mode 100755 index cab9545c898ec3..00000000000000 --- a/ci/test-ignored.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -e - -cd "$(dirname "$0")/.." - -rustc --version -cargo --version - -export RUST_BACKTRACE=1 -cargo test -- --ignored diff --git a/ci/test-nightly.sh b/ci/test-nightly.sh index 3f38e3d1bc2c39..512c8d7bf89946 100755 --- a/ci/test-nightly.sh +++ b/ci/test-nightly.sh @@ -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 diff --git a/ci/test-cuda.sh b/ci/test-stable-perf.sh similarity index 57% rename from ci/test-cuda.sh rename to ci/test-stable-perf.sh index ba6f0b1c126ab5..58985180eab56c 100755 --- a/ci/test-cuda.sh +++ b/ci/test-stable-perf.sh @@ -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 +cargo test --features=cuda,erasure diff --git a/ci/test-stable.sh b/ci/test-stable.sh index f21b465ac2f91e..9c31a3afdaf4ab 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -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