mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
* Simplify e2e tests * Add TODOs * WIP * Replace GetSubnetIDF * Bump avalanchego to v1.9.6-rc.0 * Working on tests * Light client mode to unlock dynamic state sync * revert version to pass ci (?) * fix simulator go.mod * Set env variable using os setenv * Needed renames to run all solidity precompile tests * Cleanup * E2E test GH Action * Remove simualtor from GH Actions * Re-add simulator to GH Actions * nits * Modify run script to support running a network and running simulator * Fix GH Actions file * Bump avalanchego to v1.9.6-rc.2 * go mod tidy * Fix run script * Reduce ctx timeout for starting new subnet to 15s * Set data dir from github action * Update run script * Create separate load test for ginkgo * Refactor scripts * Fix up env variables in run single node script * WIP * Add install_cli.sh script * Create 1 script to start a non-staking network of nodes in a subshell * Fix run script to run 5 node non-staking network and add simple load script * Fix load test * go mod update to ago v1.9.7 * Fix allowed geth imports for simulator * Populate constants to fix blst warning * load constants in run ginkgo * Update run simulator name check * Update data dir * Add plugin dir env variable * Update github action and env var used in install avago script * Filter out both precompile and load test from unit test script * Add comment about skipping load test in unit test script * Fix lint geth allowed pkgs * Address nits * Remove unused DATA_DIRs var from run script * Add TODO to update run script to allow running N nodes instead of just one * Update READMEs * Break down simulator * Cleanup * Update cmd/simulator/README.md * Update cmd/simulator/README.md * Update cmd/simulator/README.md * Update contract-examples/README.md * Address review comments * Address PR comments
45 lines
1.4 KiB
Bash
45 lines
1.4 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Set the PATHS
|
|
GOPATH="$(go env GOPATH)"
|
|
|
|
# Avalabs docker hub
|
|
DOCKERHUB_REPO="avaplatform/avalanchego"
|
|
|
|
# if this isn't a git repository (say building from a release), don't set our git constants.
|
|
if [ ! -d .git ]
|
|
then
|
|
CURRENT_BRANCH=""
|
|
SUBNET_EVM_COMMIT=""
|
|
SUBNET_EVM_COMMIT_ID=""
|
|
else
|
|
# Current branch
|
|
CURRENT_BRANCH=${CURRENT_BRANCH:-$(git describe --tags --exact-match 2> /dev/null || git symbolic-ref -q --short HEAD || git rev-parse --short HEAD || :)}
|
|
|
|
# Image build id
|
|
#
|
|
# Use an abbreviated version of the full commit to tag the image.
|
|
# WARNING: this will use the most recent commit even if there are un-committed changes present
|
|
SUBNET_EVM_COMMIT="$(git --git-dir="$SUBNET_EVM_PATH/.git" rev-parse HEAD || :)"
|
|
SUBNET_EVM_COMMIT_ID="${SUBNET_EVM_COMMIT::8}"
|
|
fi
|
|
|
|
echo "Using branch: ${CURRENT_BRANCH}"
|
|
|
|
BUILD_IMAGE_ID=${BUILD_IMAGE_ID:-"$AVALANCHEGO_VERSION-$SUBNET_EVM_COMMIT_ID"}
|
|
|
|
# Static compilation
|
|
STATIC_LD_FLAGS=''
|
|
if [ "${STATIC_COMPILATION:-}" = 1 ]
|
|
then
|
|
export CC=musl-gcc
|
|
command -v $CC || ( echo $CC must be available for static compilation && exit 1 )
|
|
STATIC_LD_FLAGS=' -extldflags "-static" -linkmode external '
|
|
fi
|
|
|
|
# Set the CGO flags to use the portable version of BLST
|
|
#
|
|
# We use "export" here instead of just setting a bash variable because we need
|
|
# to pass this flag to all child processes spawned by the shell.
|
|
export CGO_CFLAGS="-O -D__BLST_PORTABLE__"
|