Skip to content

Commit

Permalink
Merge branch 'v2.0' into v2.0.24-release
Browse files Browse the repository at this point in the history
  • Loading branch information
nibty committed Feb 5, 2025
2 parents 336796a + 6355562 commit e02cf3f
Show file tree
Hide file tree
Showing 86 changed files with 945 additions and 667 deletions.
34 changes: 0 additions & 34 deletions .buildkite/hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,3 @@ CI_BUILD_START=$(date +%s)
export CI_BUILD_START

source ci/env.sh

#
# Kill any running docker containers, which are potentially left over from the
# previous CI job
#
(
echo "+++ Killing stale docker containers"
while read -r line; do
read -r id image _ <<<"$line"

if [[ $image =~ "anzaxyz/ci" ]]; then
if docker kill "$id" >/dev/null; then
echo "kill $id $image"
fi
fi

done < <(docker ps | tail -n +2)
)

# Processes from previously aborted CI jobs seem to loiter, unclear why as one
# would expect the buildkite-agent to clean up all child processes of the
# aborted CI job.
# But as a workaround for now manually kill some known loiterers. These
# processes will all have the `init` process as their PPID:
(
victims=
for name in bash cargo docker solana; do
victims="$victims $(pgrep -u "$(id -u)" -P 1 -d \ $name)"
done
for victim in $victims; do
echo "Killing pid $victim"
kill -9 "$victim" || true
done
)
6 changes: 3 additions & 3 deletions .buildkite/scripts/build-bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build_steps() {
{
"name": "$1",
"command": "$2",
"timeout_in_minutes": 30,
"timeout_in_minutes": 60,
"agent": "$agent",
"retry": 3
}
Expand All @@ -22,5 +22,5 @@ EOF

# shellcheck disable=SC2016
group "bench" \
"$(build_steps "bench-part-1" "ci/docker-run-default-image.sh ci/bench/part1.sh")" \
"$(build_steps "bench-part-2" "ci/docker-run-default-image.sh ci/bench/part2.sh")"
"$(build_steps "bench-part-1" "ci/bench/part1.sh")" \
"$(build_steps "bench-part-2" "ci/bench/part2.sh")"
58 changes: 56 additions & 2 deletions .buildkite/scripts/build-bench.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,69 @@ want=$(
steps:
- name: "bench-part-1"
command: "ci/bench/part1.sh"
timeout_in_minutes: 30
plugins:
- docker#v5.12.0:
image: "anzaxyz/ci:rust_1.78.0_nightly-2024-05-02"
workdir: /solana
propagate-environment: true
propagate-uid-gid: true
environment:
- "RUSTC_WRAPPER=/usr/local/cargo/bin/sccache"
- BUILDKITE_AGENT_ACCESS_TOKEN
- AWS_SECRET_ACCESS_KEY
- AWS_ACCESS_KEY_ID
- SCCACHE_BUCKET
- SCCACHE_REGION
- SCCACHE_S3_KEY_PREFIX
- BUILDKITE_PARALLEL_JOB
- BUILDKITE_PARALLEL_JOB_COUNT
- CI
- CI_BRANCH
- CI_BASE_BRANCH
- CI_TAG
- CI_BUILD_ID
- CI_COMMIT
- CI_JOB_ID
- CI_PULL_REQUEST
- CI_REPO_SLUG
- CRATES_IO_TOKEN
- THREADS_OVERRIDE
timeout_in_minutes: 60
agents:
queue: "solana"
retry:
automatic:
- limit: 3
- name: "bench-part-2"
command: "ci/bench/part2.sh"
timeout_in_minutes: 30
plugins:
- docker#v5.12.0:
image: "anzaxyz/ci:rust_1.78.0_nightly-2024-05-02"
workdir: /solana
propagate-environment: true
propagate-uid-gid: true
environment:
- "RUSTC_WRAPPER=/usr/local/cargo/bin/sccache"
- BUILDKITE_AGENT_ACCESS_TOKEN
- AWS_SECRET_ACCESS_KEY
- AWS_ACCESS_KEY_ID
- SCCACHE_BUCKET
- SCCACHE_REGION
- SCCACHE_S3_KEY_PREFIX
- BUILDKITE_PARALLEL_JOB
- BUILDKITE_PARALLEL_JOB_COUNT
- CI
- CI_BRANCH
- CI_BASE_BRANCH
- CI_TAG
- CI_BUILD_ID
- CI_COMMIT
- CI_JOB_ID
- CI_PULL_REQUEST
- CI_REPO_SLUG
- CRATES_IO_TOKEN
- THREADS_OVERRIDE
timeout_in_minutes: 60
agents:
queue: "solana"
retry:
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/scripts/build-stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ partitions=$(
cat <<EOF
{
"name": "partitions",
"command": "ci/docker-run-default-image.sh ci/stable/run-partition.sh",
"command": "ci/stable/run-partition.sh",
"timeout_in_minutes": 30,
"agent": "$agent",
"parallelism": 2,
Expand All @@ -25,7 +25,7 @@ local_cluster_partitions=$(
cat <<EOF
{
"name": "local-cluster",
"command": "ci/docker-run-default-image.sh ci/stable/run-local-cluster-partially.sh",
"command": "ci/stable/run-local-cluster-partially.sh",
"timeout_in_minutes": 30,
"agent": "$agent",
"parallelism": 5,
Expand All @@ -38,7 +38,7 @@ localnet=$(
cat <<EOF
{
"name": "localnet",
"command": "ci/docker-run-default-image.sh ci/stable/run-localnet.sh",
"command": "ci/stable/run-localnet.sh",
"timeout_in_minutes": 30,
"agent": "$agent"
}
Expand Down
96 changes: 93 additions & 3 deletions .buildkite/scripts/build-stable.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,106 @@ want=$(
- group: "stable"
steps:
- name: "partitions"
command: ". ci/rust-version.sh; ci/docker-run.sh $$rust_stable_docker_image ci/stable/run-partition.sh"
command: "ci/stable/run-partition.sh"
plugins:
- docker#v5.12.0:
image: "anzaxyz/ci:rust_1.78.0_nightly-2024-05-02"
workdir: /solana
propagate-environment: true
propagate-uid-gid: true
environment:
- "RUSTC_WRAPPER=/usr/local/cargo/bin/sccache"
- BUILDKITE_AGENT_ACCESS_TOKEN
- AWS_SECRET_ACCESS_KEY
- AWS_ACCESS_KEY_ID
- SCCACHE_BUCKET
- SCCACHE_REGION
- SCCACHE_S3_KEY_PREFIX
- BUILDKITE_PARALLEL_JOB
- BUILDKITE_PARALLEL_JOB_COUNT
- CI
- CI_BRANCH
- CI_BASE_BRANCH
- CI_TAG
- CI_BUILD_ID
- CI_COMMIT
- CI_JOB_ID
- CI_PULL_REQUEST
- CI_REPO_SLUG
- CRATES_IO_TOKEN
- THREADS_OVERRIDE
timeout_in_minutes: 30
agents:
queue: "solana"
parallelism: 3
parallelism: 2
retry:
automatic:
- limit: 3
- name: "local-cluster"
command: "ci/stable/run-local-cluster-partially.sh"
plugins:
- docker#v5.12.0:
image: "anzaxyz/ci:rust_1.78.0_nightly-2024-05-02"
workdir: /solana
propagate-environment: true
propagate-uid-gid: true
environment:
- "RUSTC_WRAPPER=/usr/local/cargo/bin/sccache"
- BUILDKITE_AGENT_ACCESS_TOKEN
- AWS_SECRET_ACCESS_KEY
- AWS_ACCESS_KEY_ID
- SCCACHE_BUCKET
- SCCACHE_REGION
- SCCACHE_S3_KEY_PREFIX
- BUILDKITE_PARALLEL_JOB
- BUILDKITE_PARALLEL_JOB_COUNT
- CI
- CI_BRANCH
- CI_BASE_BRANCH
- CI_TAG
- CI_BUILD_ID
- CI_COMMIT
- CI_JOB_ID
- CI_PULL_REQUEST
- CI_REPO_SLUG
- CRATES_IO_TOKEN
- THREADS_OVERRIDE
timeout_in_minutes: 30
agents:
queue: "solana"
parallelism: 5
retry:
automatic:
- limit: 3
- name: "localnet"
command: ". ci/rust-version.sh; ci/docker-run.sh $$rust_stable_docker_image ci/stable/run-localnet.sh"
command: "ci/stable/run-localnet.sh"
plugins:
- docker#v5.12.0:
image: "anzaxyz/ci:rust_1.78.0_nightly-2024-05-02"
workdir: /solana
propagate-environment: true
propagate-uid-gid: true
environment:
- "RUSTC_WRAPPER=/usr/local/cargo/bin/sccache"
- BUILDKITE_AGENT_ACCESS_TOKEN
- AWS_SECRET_ACCESS_KEY
- AWS_ACCESS_KEY_ID
- SCCACHE_BUCKET
- SCCACHE_REGION
- SCCACHE_S3_KEY_PREFIX
- BUILDKITE_PARALLEL_JOB
- BUILDKITE_PARALLEL_JOB_COUNT
- CI
- CI_BRANCH
- CI_BASE_BRANCH
- CI_TAG
- CI_BUILD_ID
- CI_COMMIT
- CI_JOB_ID
- CI_PULL_REQUEST
- CI_REPO_SLUG
- CRATES_IO_TOKEN
- THREADS_OVERRIDE
timeout_in_minutes: 30
agents:
queue: "solana"
Expand Down
29 changes: 29 additions & 0 deletions .buildkite/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

export INDENT_LEVEL=2

. ci/rust-version.sh

indent() {
local indent=${1:-"$INDENT_LEVEL"}
sed "s/^/$(printf ' %.0s' $(seq 1 "$indent"))/"
Expand Down Expand Up @@ -69,6 +71,33 @@ EOF
cat <<EOF | indent | sed '/DELETE_THIS_LINE/d'
- name: "$name"
command: "$command"
plugins:
- docker#v5.12.0:
image: "$ci_docker_image"
workdir: /solana
propagate-environment: true
propagate-uid-gid: true
environment:
- "RUSTC_WRAPPER=/usr/local/cargo/bin/sccache"
- BUILDKITE_AGENT_ACCESS_TOKEN
- AWS_SECRET_ACCESS_KEY
- AWS_ACCESS_KEY_ID
- SCCACHE_BUCKET
- SCCACHE_REGION
- SCCACHE_S3_KEY_PREFIX
- BUILDKITE_PARALLEL_JOB
- BUILDKITE_PARALLEL_JOB_COUNT
- CI
- CI_BRANCH
- CI_BASE_BRANCH
- CI_TAG
- CI_BUILD_ID
- CI_COMMIT
- CI_JOB_ID
- CI_PULL_REQUEST
- CI_REPO_SLUG
- CRATES_IO_TOKEN
- THREADS_OVERRIDE
timeout_in_minutes: $timeout_in_minutes
agents:
queue: "$agent"
Expand Down
Loading

0 comments on commit e02cf3f

Please sign in to comment.