Avoid docker buildkite plugin, which is not supported by bkrun
This commit is contained in:
@ -1,32 +1,12 @@
|
|||||||
steps:
|
steps:
|
||||||
- command: "ci/coverage.sh"
|
- command: "ci/coverage.sh"
|
||||||
name: "coverage [public]"
|
name: "coverage [public]"
|
||||||
# TODO: Run coverage in a docker image rather than assuming kcov/cargo-kcov
|
- command: "ci/docker-run.sh rust ci/test-stable.sh"
|
||||||
# is installed on the build agent...
|
|
||||||
#plugins:
|
|
||||||
# docker#v1.1.1:
|
|
||||||
# image: "rust"
|
|
||||||
# user: "998:997" # buildkite-agent:buildkite-agent
|
|
||||||
# environment:
|
|
||||||
# - CODECOV_TOKEN
|
|
||||||
- command: "ci/test-stable.sh"
|
|
||||||
name: "stable [public]"
|
name: "stable [public]"
|
||||||
plugins:
|
- command: "ci/docker-run.sh rustlang/rust:nightly ci/test-nightly.sh || true"
|
||||||
docker#v1.1.1:
|
|
||||||
image: "rust"
|
|
||||||
user: "998:997" # buildkite-agent:buildkite-agent
|
|
||||||
- command: "ci/test-nightly.sh || true"
|
|
||||||
name: "nightly - FAILURES IGNORED [public]"
|
name: "nightly - FAILURES IGNORED [public]"
|
||||||
plugins:
|
- command: "ci/docker-run.sh rust ci/test-ignored.sh"
|
||||||
docker#v1.1.1:
|
|
||||||
image: "rustlang/rust:nightly"
|
|
||||||
user: "998:997" # buildkite-agent:buildkite-agent
|
|
||||||
- command: "ci/test-ignored.sh"
|
|
||||||
name: "ignored [public]"
|
name: "ignored [public]"
|
||||||
plugins:
|
|
||||||
docker#v1.1.1:
|
|
||||||
image: "rust"
|
|
||||||
user: "998:997" # buildkite-agent:buildkite-agent
|
|
||||||
- command: "ci/test-cuda.sh"
|
- command: "ci/test-cuda.sh"
|
||||||
name: "cuda"
|
name: "cuda"
|
||||||
- command: "ci/shellcheck.sh"
|
- command: "ci/shellcheck.sh"
|
||||||
@ -34,10 +14,3 @@ steps:
|
|||||||
- wait
|
- wait
|
||||||
- command: "ci/publish.sh"
|
- command: "ci/publish.sh"
|
||||||
name: "publish release artifacts"
|
name: "publish release artifacts"
|
||||||
plugins:
|
|
||||||
docker#v1.1.1:
|
|
||||||
image: "rust"
|
|
||||||
user: "998:997" # buildkite-agent:buildkite-agent
|
|
||||||
environment:
|
|
||||||
- BUILDKITE_TAG
|
|
||||||
- CRATES_IO_TOKEN
|
|
||||||
|
@ -2,20 +2,15 @@
|
|||||||
|
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
if [[ -r ~/.cargo/env ]]; then
|
ci/docker-run.sh evilmachines/rust-cargo-kcov \
|
||||||
# Pick up local install of kcov/cargo-kcov
|
bash -exc "\
|
||||||
# shellcheck disable=SC1090
|
export RUST_BACKTRACE=1; \
|
||||||
source ~/.cargo/env
|
cargo build --verbose; \
|
||||||
fi
|
cargo kcov --lib --verbose; \
|
||||||
|
"
|
||||||
|
|
||||||
rustc --version
|
echo Coverage report:
|
||||||
cargo --version
|
ls -l target/cov/index.html
|
||||||
kcov --version
|
|
||||||
cargo-kcov --version
|
|
||||||
|
|
||||||
export RUST_BACKTRACE=1
|
|
||||||
cargo build
|
|
||||||
cargo kcov --lib
|
|
||||||
|
|
||||||
if [[ -z "$CODECOV_TOKEN" ]]; then
|
if [[ -z "$CODECOV_TOKEN" ]]; then
|
||||||
echo CODECOV_TOKEN undefined
|
echo CODECOV_TOKEN undefined
|
||||||
|
41
ci/docker-run.sh
Executable file
41
ci/docker-run.sh
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $0 [docker image name] [command]"
|
||||||
|
echo
|
||||||
|
echo Runs command in the specified docker image with
|
||||||
|
echo a CI-appropriate environment
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
IMAGE="$1"
|
||||||
|
if [[ -z "$IMAGE" ]]; then
|
||||||
|
echo Error: image not defined
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker pull "$IMAGE"
|
||||||
|
shift
|
||||||
|
|
||||||
|
ARGS=(--workdir /solana --volume "$PWD:/solana" --rm)
|
||||||
|
|
||||||
|
ARGS+=(--env "CARGO_HOME=/solana/.cargo")
|
||||||
|
|
||||||
|
# kcov tries to set the personality of the binary which docker
|
||||||
|
# doesn't allow by default.
|
||||||
|
ARGS+=(--security-opt "seccomp=unconfined")
|
||||||
|
|
||||||
|
# Ensure files are created with the current host uid/gid
|
||||||
|
ARGS+=(--user "$(id -u):$(id -g)")
|
||||||
|
|
||||||
|
# Environment variables to propagate into the container
|
||||||
|
ARGS+=(
|
||||||
|
--env BUILDKITE_TAG
|
||||||
|
--env CODECOV_TOKEN
|
||||||
|
--env CRATES_IO_TOKEN
|
||||||
|
)
|
||||||
|
|
||||||
|
set -x
|
||||||
|
docker run "${ARGS[@]}" "$IMAGE" "$@"
|
@ -12,8 +12,8 @@ if [[ -z "$CRATES_IO_TOKEN" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cargo package
|
|
||||||
# TODO: Ensure the published version matches the contents of BUILDKITE_TAG
|
# TODO: Ensure the published version matches the contents of BUILDKITE_TAG
|
||||||
cargo publish --token "$CRATES_IO_TOKEN"
|
ci/docker-run.sh rust \
|
||||||
|
bash -exc "cargo package; cargo publish --token $CRATES_IO_TOKEN"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -5,10 +5,7 @@
|
|||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
docker pull koalaman/shellcheck
|
find . -name "*.sh" -not -regex ".*/.cargo/.*" -not -regex ".*/node_modules/.*" -print0 \
|
||||||
find -E . -name "*.sh" -not -regex ".*/(.cargo|node_modules)/.*" -print0 \
|
|
||||||
| xargs -0 \
|
| xargs -0 \
|
||||||
docker run -w /work -v "$PWD:/work" \
|
ci/docker-run.sh koalaman/shellcheck --color=always --external-sources --shell=bash
|
||||||
koalaman/shellcheck --color=always --external-sources --shell=bash
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user