@@ -1,4 +1,4 @@
-#!/bin/bash -e
+#!/usr/bin/env bash -e
#
# Audits project dependencies for security vulnerabilities
-#!/bin/bash
+#!/usr/bin/env bash
# Computes the current branch names of the edge, beta and stable
# channels, as well as the latest tagged release for beta and stable.
# Outputs the current crate version
usage() {
echo "Usage: $0 [--nopull] [docker image name] [command]"
-#!/bin/bash -ex
+#!/usr/bin/env bash -ex
cd "$(dirname "$0")"
eval "$(../channel-info.sh)"
export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info
export RUST_BACKTRACE=1
# Regular maintenance performed on a buildkite agent to control disk usage
# The standard BUILDKITE_PULL_REQUEST environment variable is always "false" due
# to how solana-ci-gate is used to trigger PR builds rather than using the
# Perform a quick sanity test on a leader, drone, validator and client running
# locally on the same machine
# Only run snap.sh for pull requests that modify files under /snap
cd "$(dirname "$0")/.."
# Run the entire buildkite CI pipeline locally for pre-testing before sending a
# Github pull request
# Reference: https://github.com/koalaman/shellcheck/wiki/Directive
here=$(dirname "$0")
cd "$here"/..
source ci/upload_ci_artifact.sh
cd "$(dirname "$0")"/..
require() {
declare expectedProgram="$1"
if [[ $(uname) != Linux ]]; then
echo Performance libraries are only available for Linux
# shellcheck source=multinode-demo/common.sh
# Starts an instance of solana-drone
# Starts a leader node
# Creates a fullnode configuration
# Start a dynamically-configured validator node
# Start a validator node
# shellcheck source=net/common.sh
@@ -380,7 +380,7 @@ EOF
declare startupScript="$netConfigDir"/instance-startup-script.sh
cat > "$startupScript" <<EOF
# autogenerated at $(date)
cat > /etc/motd <<EOM
SOLANA_ROOT="$(cd "$here"/..; pwd)"
cd "$(dirname "$0")"/../..
# This script is to be run on the leader node
[[ $(uname) = Linux ]] || exit 1
[[ $USER = root ]] || exit 1
# Prevent background upgrades that block |apt-get|
# Install EarlyOOM
# Rsync setup for Snap builds
# Some instances have docker running and docker0 network interface confuses
# gossip and airdrops fail. As a workaround for now simply remove the docker0
# rsync wrapper that retries a few times on failure
# Updates the default cuda symlink to the supported version
# TODO building release flavor with rust produces a bunch of output .bc files
INTERDIR=../../../target/release
cat <<EOF
# Installs native programs as |cargo install| doesn't know about them
# Send a metrics datapoint
# Reports network statistics
# Reports Linux OOM Killer activity
# Snap daemons have no access to the environment so |snap set solana ...| is
# used to set runtime configuration.
# Wallet sanity test