mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
ci: chores (#5280)
This commit is contained in:
11
.github/scripts/compare_iai.sh
vendored
11
.github/scripts/compare_iai.sh
vendored
@ -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}'
|
||||
|
||||
20
.github/scripts/fuzz.sh
vendored
20
.github/scripts/fuzz.sh
vendored
@ -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
23
.github/scripts/install_geth.sh
vendored
Executable 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
|
||||
Reference in New Issue
Block a user