ci: chores (#5280)

This commit is contained in:
DaniPopes
2023-11-05 00:22:27 +01:00
committed by GitHub
parent bcd8e6fa89
commit 6e0cf0f33a
17 changed files with 199 additions and 391 deletions

View File

@ -1,6 +1,11 @@
#!/bin/bash
#!/usr/bin/env bash
# This script should be run on the main branch, after running the iai benchmarks on the target branch.
# If the main branch has a better iai performance, exits in error.
# It ignores L2 differences, since they seem hard to stabilize across runs.
# If the main branch has a better iai performance, exits in error. It ignores L2 differences, since they seem hard to stabilize across runs.
cargo bench --package reth-db --bench iai --manifest-path pr/Cargo.toml | tee /dev/tty | awk '/((L1)|(Ins)|(RAM)|(Est))+.*\(\+[1-9]+[0-9]*\..*%\)/{f=1} END{exit f}'
set -eo pipefail
cargo bench --package reth-db --bench iai --manifest-path pr/Cargo.toml \
| tee /dev/tty \
| awk '/((L1)|(Ins)|(RAM)|(Est))+.*\(\+[1-9]+[0-9]*\..*%\)/{f=1} END{exit f}'

View File

@ -1,20 +0,0 @@
#!/bin/bash
set -e
# Runs fuzz tests using `cargo test-fuzz`.
PACKAGE=$1
TEST_TIME=${2:-5}
echo Building corpus.
cargo test -p $PACKAGE
# Gets the list of tests present in the package.
TESTS=$(cargo test-fuzz --list -p $PACKAGE | head -n -3 | tail -n+9 | cat - <(echo \"--list\"]) | cat - | jq -r ".[]")
for test in $TESTS
do
echo Running test: $test
set -x
cargo test-fuzz --no-ui --exact -p "$PACKAGE" $test -- -V $TEST_TIME
set +x
done;

23
.github/scripts/install_geth.sh vendored Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Installs Geth (https://geth.ethereum.org) in $HOME/bin for x86_64 Linux.
set -eo pipefail
GETH_BUILD=${GETH_BUILD:-"1.13.4-3f907d6a"}
name="geth-linux-amd64-$GETH_BUILD"
mkdir -p "$HOME/bin"
wget "https://gethstore.blob.core.windows.net/builds/$name.tar.gz"
tar -xvf "$name.tar.gz"
rm "$name.tar.gz"
mv "$name/geth" "$HOME/bin/geth"
rm -rf "$name"
chmod +x "$HOME/bin/geth"
# Add $HOME/bin to $PATH
[[ "$PATH" != *$HOME/bin* ]] && export PATH=$HOME/bin:$PATH
[ -n "$CI" ] && echo "$HOME/bin" >> "$GITHUB_PATH"
geth version