Skip to content

Commit

Permalink
Merge branch 'velas:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Tirka authored Jan 18, 2024
2 parents 10e237b + 0485115 commit e90726d
Show file tree
Hide file tree
Showing 837 changed files with 83,746 additions and 55,134 deletions.
19 changes: 19 additions & 0 deletions .buildkite/coverage-in-disk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# This script is used to upload the full buildkite pipeline. The steps defined
# in the buildkite UI should simply be:
#
# steps:
# - command: ".buildkite/pipeline-upload.sh"
#

set -e
cd "$(dirname "$0")"/..
source ci/_
sudo chmod 0777 ci/buildkite-pipeline-in-disk.sh

_ ci/buildkite-pipeline-in-disk.sh pipeline.yml
echo +++ pipeline
cat pipeline.yml

_ buildkite-agent pipeline upload pipeline.yml
29 changes: 12 additions & 17 deletions .buildkite/hooks/post-command
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
#!/bin/bash -e

#
# Save target/ for the next CI build on this machine
#
if [[ -z $CARGO_TARGET_CACHE ]]; then
echo "+++ CARGO_TARGET_CACHE not defined" # pre-command should have defined it
else
(
set -x
mkdir -p "$CARGO_TARGET_CACHE"
set -x
rsync -a --delete --link-dest="$PWD" target "$CARGO_TARGET_CACHE"
du -hs "$CARGO_TARGET_CACHE"
read -r cacheSizeInGB _ < <(du -s --block-size=1800000000 "$CARGO_TARGET_CACHE")
echo "--- ${cacheSizeInGB}GB: $CARGO_TARGET_CACHE"
)
fi

#
# Add job_stats data point
#
Expand All @@ -37,6 +20,18 @@ else
SUCCESS=false
fi

if [[ -n $BUILDKITE && -f "results.json" ]]; then
# prepare result file
awk '/{ "type": .* }/' results.json > sanitized-results.json

# upload to buildkite
buildkite-test-collector < sanitized-results.json

# upload to datadog
cargo2junit > results.xml < sanitized-results.json
datadog-ci junit upload --service solana results.xml
fi

point_tags="pipeline=$BUILDKITE_PIPELINE_SLUG,job=$CI_LABEL,pr=$PR,success=$SUCCESS"
point_tags="${point_tags// /\\ }" # Escape spaces

Expand Down
34 changes: 6 additions & 28 deletions .buildkite/hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,9 @@ export PS4="++"
#
eval "$(ci/channel-info.sh)"
eval "$(ci/sbf-tools-info.sh)"
export CARGO_TARGET_CACHE=$HOME/cargo-target-cache/"$CHANNEL"-"$BUILDKITE_LABEL"-"$SBF_TOOLS_VERSION"
(
set -x
MAX_CACHE_SIZE=18 # gigabytes

if [[ -d $CARGO_TARGET_CACHE ]]; then
du -hs "$CARGO_TARGET_CACHE"
read -r cacheSizeInGB _ < <(du -s --block-size=1800000000 "$CARGO_TARGET_CACHE")
echo "--- ${cacheSizeInGB}GB: $CARGO_TARGET_CACHE"
if [[ $cacheSizeInGB -gt $MAX_CACHE_SIZE ]]; then
echo "--- $CARGO_TARGET_CACHE is too large, removing it"
rm -rf "$CARGO_TARGET_CACHE"
fi
else
echo "--- $CARGO_TARGET_CACHE not present"
fi

mkdir -p "$CARGO_TARGET_CACHE"/target
rsync -a --delete --link-dest="$CARGO_TARGET_CACHE" "$CARGO_TARGET_CACHE"/target .

# Don't reuse BPF target build artifacts due to incremental build issues with
# `std:
# "found possibly newer version of crate `std` which `xyz` depends on
rm -rf target/bpfel-unknown-unknown
if [[ $BUILDKITE_LABEL = "stable-perf" ]]; then
rm -rf target/release
fi
)
source "ci/rust-version.sh"
HOST_RUST_VERSION="$rust_stable"
pattern='^[0-9]+\.[0-9]+\.[0-9]+$'
if [[ ${HOST_RUST_VERSION} =~ ${pattern} ]]; then
HOST_RUST_VERSION="${rust_stable%.*}"
fi
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#### Problem



#### Summary of Changes



Fixes #
30 changes: 13 additions & 17 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- devnet
- 'build/**'

env:
APP_REPO: velas-solana

jobs:
docker-build-push:
name: Build and push
Expand All @@ -16,20 +19,13 @@ jobs:
image_tag: ${{ steps.build.outputs.image_tag }}
steps:
- uses: actions/checkout@v2
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASS }}
registry: ${{ secrets.REGISTRY_HOST }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
ssh: |
default=${{ env.SSH_AUTH_SOCK }}
push: true
tags: ${{ secrets.REGISTRY_HOST }}/velas/velas-solana:${{github.sha}}
- name: Build, tag, and push image
id: build
env:
REGISTRY: ${{ secrets.REGISTRY_HOST }}/velas
REPOSITORY: ${{ env.APP_REPO }}
IMAGE_TAG: ${{github.sha}}
run: |
docker pull ubuntu:20.04
DOCKER_BUILDKIT=1 docker build -t $REGISTRY/$REPOSITORY:$IMAGE_TAG --no-cache .
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG
39 changes: 35 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pull_request_rules:
- author≠@core-contributors
- author≠mergify[bot]
- author≠dependabot[bot]
- author≠github-actions[bot]
actions:
label:
add:
Expand All @@ -18,6 +19,7 @@ pull_request_rules:
- author≠@core-contributors
- author≠mergify[bot]
- author≠dependabot[bot]
- author≠github-actions[bot]
# Only request reviews from the pr subscribers group if no one
# has reviewed the community PR yet. These checks only match
# reviewers with admin, write or maintain permission on the repository.
Expand Down Expand Up @@ -105,22 +107,51 @@ pull_request_rules:
label:
add:
- automerge
- name: v1.8 backport
- name: v1.9 feature-gate backport
conditions:
- label=v1.8
- label=v1.9
- label=feature-gate
actions:
backport:
assignees: &BackportAssignee
- "{{ merged_by|replace('mergify[bot]', label|select('equalto', 'community')|first|default(author)|replace('community', '@solana-labs/community-pr-subscribers')) }}"
ignore_conflicts: true
labels:
- feature-gate
branches:
- v1.8
- name: v1.9 backport
- v1.9
- name: v1.9 non-feature-gate backport
conditions:
- label=v1.9
- label!=feature-gate
actions:
backport:
assignees: *BackportAssignee
ignore_conflicts: true
branches:
- v1.9
- name: v1.10 feature-gate backport
conditions:
- label=v1.10
- label=feature-gate
actions:
backport:
assignees: *BackportAssignee
ignore_conflicts: true
labels:
- feature-gate
branches:
- v1.10
- name: v1.10 non-feature-gate backport
conditions:
- label=v1.10
- label!=feature-gate
actions:
backport:
assignees: *BackportAssignee
ignore_conflicts: true
branches:
- v1.10

commands_restrictions:
# The author of copied PRs is the Mergify user.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ minutes to execute. Use that time to write a detailed problem description. Once
the description is written and CI succeeds, click the "Ready to Review" button
and add reviewers. Adding reviewers before CI succeeds is a fast path to losing
reviewer engagement. Not only will they be notified and see the PR is not yet
ready for them, they will also be bombarded them with additional notifications
ready for them, they will also be bombarded with additional notifications
each time you push a commit to get past CI or until they "mute" the PR. Once
muted, you'll need to reach out over some other medium, such as Discord, to
request they have another look. When you use draft PRs, no notifications are
Expand Down
Loading

0 comments on commit e90726d

Please sign in to comment.