-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #381 from ava-labs/dev
v0.8.0
- Loading branch information
Showing
511 changed files
with
6,396 additions
and
11,144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
set -ev | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ev | ||
|
||
cd $TRAVIS_BUILD_DIR | ||
./scripts/build.sh | ||
./scripts/build_test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# binary will be $(go env GOPATH)/bin/golangci-lint | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0 | ||
# or install it into ./bin/ | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.30.0 | ||
# In alpine linux (as it does not come with curl by default) | ||
wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.30.0 | ||
golangci-lint --version | ||
|
||
|
||
golangci-lint run --max-same-issues 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
.ci/before_install_linux.sh | ||
|
||
if [[ $TRAVIS_BRANCH == "master" ]]; then | ||
DOCKER_BUILDKIT=1 docker build --progress plain -t $DOCKERHUB_REPO:$COMMIT -t $DOCKERHUB_REPO:latest . | ||
else | ||
DOCKER_BUILDKIT=1 docker build --progress plain -t $DOCKERHUB_REPO:$COMMIT . | ||
fi | ||
|
||
docker run --rm -v "$PWD:$AVALANCHE_HOME" $DOCKERHUB_REPO:$COMMIT bash "$AVALANCHE_HOME/scripts/build_test.sh" | ||
docker run --rm -v "$PWD:$AVALANCHE_HOME" $DOCKERHUB_REPO:$COMMIT bash "$AVALANCHE_HOME/scripts/build.sh" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
SCRIPTS_PATH=$(cd $(dirname "${BASH_SOURCE[0]}"); pwd) | ||
SRC_PATH=$(dirname "${SCRIPTS_PATH}") | ||
# Build the runnable Gecko docker image | ||
# Build the runnable Avalanche docker image | ||
bash "${SRC_PATH}"/scripts/build_image.sh | ||
GECKO_IMAGE=$(docker image ls --format="{{.Repository}}" | head -n 1) | ||
AVALANCHE_IMAGE=$(docker image ls --format="{{.Repository}}" | head -n 1) | ||
|
||
DOCKER_REPO="avaplatform" | ||
|
||
E2E_TESTING_REMOTE="https://github.com/ava-labs/avalanche-testing.git" | ||
E2E_TAG="v0.8.4-dev" | ||
E2E_TAG="v0.9.2-dev" | ||
|
||
mkdir -p "$E2E_TEST_HOME" | ||
git clone "$E2E_TESTING_REMOTE" "$E2E_TEST_HOME" | ||
cd "$E2E_TEST_HOME" || exit | ||
git fetch origin --tags | ||
git checkout "tags/$E2E_TAG" -b "$E2E_TAG" | ||
|
||
go mod edit -replace github.com/ava-labs/gecko="$GECKO_HOME" | ||
go mod edit -replace github.com/ava-labs/avalanchego="$AVALANCHE_HOME" | ||
bash "./scripts/rebuild_initializer_binary.sh" | ||
|
||
|
||
TESTING_CONTROLLER_IMAGE="$DOCKER_REPO/avalanche-testing_controller:everest-dev" | ||
BYZANTINE_IMAGE="$DOCKER_REPO/gecko-byzantine:everest-dev" | ||
TESTING_CONTROLLER_IMAGE="$DOCKER_REPO/avalanche-testing_controller:everest-v0.9.2-dev" | ||
BYZANTINE_IMAGE="$DOCKER_REPO/gecko-byzantine:everest-name-change" | ||
|
||
docker pull "$TESTING_CONTROLLER_IMAGE" | ||
|
||
# If Docker Credentials are not available skip the Byzantine Tests | ||
if [[ ${#DOCKER_USERNAME} == 0 ]]; then | ||
echo "Skipping Byzantine Tests because Docker Credentials were not present." | ||
./build/avalanche-testing --gecko-image-name="${GECKO_IMAGE}" --test-controller-image-name="${TESTING_CONTROLLER_IMAGE}" | ||
./build/avalanche-testing --avalanche-image-name="${AVALANCHE_IMAGE}" --test-controller-image-name="${TESTING_CONTROLLER_IMAGE}" | ||
else | ||
echo "$DOCKER_PASS" | docker login --username "$DOCKER_USERNAME" --password-stdin | ||
docker pull "${BYZANTINE_IMAGE}" | ||
./build/avalanche-testing --gecko-image-name="${GECKO_IMAGE}" --test-controller-image-name="${TESTING_CONTROLLER_IMAGE}" --byzantine-image-name="${BYZANTINE_IMAGE}" | ||
./build/avalanche-testing --avalanche-image-name="${AVALANCHE_IMAGE}" --test-controller-image-name="${TESTING_CONTROLLER_IMAGE}" --byzantine-image-name="${BYZANTINE_IMAGE}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
set -ev | ||
|
||
docker run --rm -v "$PWD:$GECKO_HOME" $DOCKERHUB_REPO:$COMMIT bash "$GECKO_HOME/scripts/build_test.sh" | ||
docker run --rm -v "$PWD:$GECKO_HOME" $DOCKERHUB_REPO:$COMMIT bash "$GECKO_HOME/scripts/build.sh" | ||
docker run --rm -v "$PWD:$AVALANCHE_HOME" $DOCKERHUB_REPO:$COMMIT bash "$AVALANCHE_HOME/scripts/build_test.sh" | ||
docker run --rm -v "$PWD:$AVALANCHE_HOME" $DOCKERHUB_REPO:$COMMIT bash "$AVALANCHE_HOME/scripts/build.sh" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
linters: | ||
# please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
disable-all: true | ||
|
||
enable: | ||
- gofmt | ||
- goimports | ||
- bodyclose | ||
# - deadcode | ||
# - errcheck | ||
# - varcheck | ||
# - govet | ||
# - gosimple | ||
# - goconst | ||
# - goconst | ||
# - gocritic | ||
# - gocyclo | ||
# - golint | ||
# - gomnd | ||
# - goprintffuncname | ||
# - gosec | ||
# - ineffassign | ||
# - interfacer | ||
# - lll | ||
# - misspell | ||
# - nakedret | ||
# - unconvert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
language: go | ||
|
||
go: | ||
- 1.13.x | ||
- 1.13.x | ||
|
||
jobs: | ||
include: | ||
- os: linux | ||
dist: bionic | ||
- os: osx | ||
osx_image: xcode11.4 | ||
services: | ||
- docker | ||
env: | ||
global: | ||
- CODECOV_TOKEN="8c18c993-fc6e-4706-998b-01ddc7987804" | ||
- GECKO_HOME=$GOPATH/src/github.com/$TRAVIS_REPO_SLUG/ | ||
- AVALANCHE_HOME=$GOPATH/src/github.com/$TRAVIS_REPO_SLUG/ | ||
- E2E_TEST_HOME=$GOPATH/src/github.com/ava-labs/avalanche-testing/ | ||
- COMMIT=${TRAVIS_COMMIT::8} | ||
- DOCKERHUB_REPO=avaplatform/gecko | ||
before_install: | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then .ci/before_install_linux.sh; fi | ||
- secure: Ozsv2nUqUVSdiaEovsffCBaGIaJdSGEq6zSNr1af74+zhYu1G5Dw3s0u5Uq42NTFygGVAg2ODh1/PSviAK3P7Dzgi3yMtUBD8kAAISJW3lKr/JavBOIsUnekhZYniAS77vUHwpOi6vQxgjhy/ymYxXTSRyHPys7DwZhZcCMiR6Bk/O7w8JbYo2m31mCaJZWpt9m4SCXVr+lK1prYuCOAME5SwKq3eVHfUGKn7w8f7kLUDv6XPLlAjzOQHKq4AD9DwDQX2wubAOc87a4BCti9suaXNyzRtS3AUQXjZkHy8BHyWPnMOIwOT6sVAYEm65fcOPxlawnkbs8ny7xnJMqj9R0tyq7XmnGoaALeXxOcV1B55TFjyo0P48NTugFrdqtQ+LSOvvVQJV/QBoe+sZwUTus+LP5lWl86EnQPGxjll+vXO2Mces+F48eoj9dfPBbBLRLEaxk54l6+H6JHvAG2QRtRG3beh7XbdFYPnt+LEuYdW3kyCRD24JhCrglJlebCnqAKR7GfAICf7ca5+WJj4Fiyyh/tUt4Ss0E53Mvz6NXFNpJVTEcFc3RFjIp/louK1Y2Uxbyr+LT9hw2bvo6Obz9sl/YZs10rCWZnC0zF2WE01tADD8YShrA70349hmtE2FSJLCg2LTVgmTFbS47Rn4QFcmo5AGHDNl31iwj9gKk= | ||
- secure: Si2xR7IOINZRHtH6DbgxhpOH/oX1XL+DvlutmQVS5ZbjXFmvtqB8CT9uDUAKj38R+sgEmAwOENLJcl7SWZfXDE4EYqlcafh/pcBMjm8O6atWrrwmpZSEiHNba2t+yXBN7z5M/KV777FY43SbOEA+/5Bytcluk3Mxjjl5iFXEWai0RH9jmk7lsHmIyPYsAG9/SRwYgr0uZ3T5872HBD7td7+umiTyWshdT3dOXilYWWflc4eniv/ifp/H6A5k9uXrE50KdtaeDcAl5eAp9mItNd8nLenmaNzDkq6IBTUwy+gmEHctq8YbjmtQhdWtdIXDxPFknpBqKsg7oXgstJt11UVqhDcsnX6Trj1GO8InUykMLRDxWMwlCZfZdAuUvhbrHmbFOWF1ANL5Rl7RzUXSov02WAPvrze/8ZFq2O2f28CVkcWCZy/Vei9EhAwQUyJOug6R/1cSOkcqpovc5yf65dLnpUMb+f4fbMk5Z/YPijJ8VZSFU9ul73re6xcWz9PbxZWqsN2Ubqm6EKRB02gxsLbdl56lHcMl6uawrTUFDoie+alkiqlxP8Ey7Phw43os/lxHq9lQN0bZ2Mkq4LMVc4noa5TQNTNxS/hrAIly7IzZVV0VfiLeHJVT/2BWCUhNqw/jL2lpGTPbH0NqG/wIRAAW9BYDlQKc17vBM9Xvs8g= | ||
|
||
install: | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then DOCKER_BUILDKIT=1 docker build --progress plain -t $DOCKERHUB_REPO:$COMMIT . ; fi | ||
jobs: | ||
include: | ||
- stage: lint | ||
os: linux | ||
dist: bionic | ||
script: | ||
- ".ci/lint.sh" | ||
|
||
script: | ||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then .ci/runscript_osx.sh; fi | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then .ci/runscript_linux.sh; .ci/run_e2e_tests.sh; fi | ||
- stage: build | ||
os: linux | ||
dist: bionic | ||
script: | ||
- ".ci/build_and_test.sh" | ||
- ".ci/run_docker.sh" | ||
- ".ci/run_e2e_tests.sh" | ||
- ".ci/after_success.sh" | ||
|
||
#Need to push to docker hub only from one build | ||
after_success: | ||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then .ci/after_success.sh; fi | ||
- stage: build | ||
os: osx | ||
osx_image: xcode11.4 | ||
script: | ||
- ".ci/build_and_test.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.