Skip to content

Commit 7237fa1

Browse files
Merge pull request #94 from ava-labs/automated-release
Automated release
2 parents 402eac2 + e5c029f commit 7237fa1

File tree

12 files changed

+835
-293
lines changed

12 files changed

+835
-293
lines changed

.github/workflows/e2e.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/lint-and-tests.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Build + test + release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- "*"
9+
pull_request:
10+
11+
jobs:
12+
lint_test:
13+
name: Lint
14+
runs-on: ubuntu-18.04
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: golangci-lint
18+
uses: golangci/golangci-lint-action@v2
19+
with:
20+
version: latest
21+
working-directory: .
22+
args: --timeout 3m
23+
24+
unit_test:
25+
name: Golang Unit Tests v${{ matrix.go }} (${{ matrix.os }})
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
go: ["1.17"]
30+
os: [ubuntu-20.04]
31+
steps:
32+
- uses: actions/checkout@v2
33+
- uses: actions/setup-go@v1
34+
with:
35+
go-version: ${{ matrix.go }}
36+
- run: go mod download
37+
shell: bash
38+
- run: ./scripts/build.sh ./build/subnetevm
39+
shell: bash
40+
- run: ./scripts/build_test.sh -race
41+
shell: bash
42+
- run: ./scripts/coverage.sh
43+
shell: bash
44+
45+
e2e_test:
46+
name: e2e tests
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Git checkout
50+
uses: actions/checkout@v2
51+
with:
52+
fetch-depth: 0
53+
- name: Set up Go
54+
uses: actions/setup-go@v2
55+
with:
56+
go-version: 1.17
57+
- name: Run e2e tests
58+
shell: bash
59+
run: E2E=true scripts/run.sh 1.7.11 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
60+
61+
release:
62+
needs: [lint_test, unit_test, e2e_test]
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Git checkout
66+
uses: actions/checkout@v2
67+
with:
68+
fetch-depth: 0
69+
- name: Set up Go
70+
uses: actions/setup-go@v2
71+
with:
72+
go-version: 1.17
73+
- name: Run GoReleaser
74+
uses: goreleaser/goreleaser-action@v2
75+
with:
76+
distribution: goreleaser
77+
version: latest
78+
args: release --rm-dist
79+
env:
80+
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ bin/
4646
build/
4747

4848
cmd/simulator/.simulator/*
49+
50+
# goreleaser
51+
dist/

.goreleaser.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# ref. https://goreleaser.com/customization/build/
2+
builds:
3+
- id: subnet-evm
4+
main: ./plugin
5+
binary: subnet-evm
6+
flags:
7+
- -v
8+
ignore:
9+
- goos: darwin
10+
goarch: 386
11+
- goos: linux
12+
goarch: 386
13+
- goos: windows
14+
goarch: 386
15+
- goos: freebsd
16+
goarch: 386
17+
18+
release:
19+
# Repo in which the release will be created.
20+
# Default is extracted from the origin remote URL or empty if its private hosted.
21+
github:
22+
owner: ava-labs
23+
name: subnet-evm

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
![Github Actions](https://github.com/ava-labs/subnet-evm/actions/workflows/lint-tests-release.yml/badge.svg)
3+
14
# Subnet EVM
25

36
[Avalanche](https://docs.avax.network/learn/platform-overview) is a network composed of multiple blockchains.
@@ -19,6 +22,7 @@ The Subnet EVM runs in a separate process from the main AvalancheGo process and
1922
[v0.1.1-v0.1.2] [email protected]
2023
2124
25+
2226
```
2327

2428
## API
@@ -50,8 +54,8 @@ To support these changes, there have been a number of changes to the SubnetEVM b
5054

5155
### Block Header
5256

53-
* `BaseFee`: Added by EIP-1559 to represent the base fee of the block (present in Ethereum as of EIP-1559)
54-
* `BlockGasCost`: surcharge for producing a block faster than the target rate
57+
- `BaseFee`: Added by EIP-1559 to represent the base fee of the block (present in Ethereum as of EIP-1559)
58+
- `BlockGasCost`: surcharge for producing a block faster than the target rate
5559

5660

5761
## Run Local Network
@@ -65,9 +69,9 @@ See [Create an EVM Subnet on Fuji Testnet](https://docs.avax.network/subnets/cre
6569

6670
## Customize a Subnet
6771

68-
* [Genesis](https://docs.avax.network/subnets/customize-a-subnet#genesis)
69-
* [Precompile](https://docs.avax.network/subnets/customize-a-subnet#precompiles)
70-
* [Priority Regossip](https://docs.avax.network/subnets/customize-a-subnet#priority-regossip)
72+
- [Genesis](https://docs.avax.network/subnets/customize-a-subnet#genesis)
73+
- [Precompile](https://docs.avax.network/subnets/customize-a-subnet#precompiles)
74+
- [Priority Regossip](https://docs.avax.network/subnets/customize-a-subnet#priority-regossip)
7175

7276
## Join the WAGMI Subnet Demo
7377

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.17
44

55
require (
66
github.com/VictoriaMetrics/fastcache v1.10.0
7-
github.com/ava-labs/avalanchego v1.7.11-rc.27
7+
github.com/ava-labs/avalanchego v1.7.11
88
github.com/cespare/cp v0.1.0
99
github.com/davecgh/go-spew v1.1.1
1010
github.com/deckarep/golang-set v1.8.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax
7171
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
7272
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
7373
github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0=
74-
github.com/ava-labs/avalanchego v1.7.11-rc.27 h1:GjjGmo1FCcQRsWwVtOxhXLXVczyyriN3wE5uu8nTnYU=
75-
github.com/ava-labs/avalanchego v1.7.11-rc.27/go.mod h1:tbCKLCFYkAm9Q4eaXVhexar9ycJoDNEtwzjlH0PQ82Q=
74+
github.com/ava-labs/avalanchego v1.7.11 h1:tb/dYm85sUm1M0N+2yfwq4dm1X967PKDdjU3lmg7qEs=
75+
github.com/ava-labs/avalanchego v1.7.11/go.mod h1:z/zteB07lMn/xO0aPRJOw80VGuLsn7FRfgbMCd0y4HY=
7676
github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo=
7777
github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y=
7878
github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo=

scripts/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ set -e
44
# e.g.,
55
#
66
# run without e2e tests
7-
# ./scripts/run.sh 1.7.10 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
7+
# ./scripts/run.sh 1.7.11 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
88
#
99
# run without e2e tests with DEBUG log level
10-
# AVALANCHE_LOG_LEVEL=DEBUG ./scripts/run.sh 1.7.10 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
10+
# AVALANCHE_LOG_LEVEL=DEBUG ./scripts/run.sh 1.7.11 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
1111
#
1212
# run with e2e tests
13-
# E2E=true ./scripts/run.sh 1.7.10 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
13+
# E2E=true ./scripts/run.sh 1.7.11 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC
1414
if ! [[ "$0" =~ scripts/run.sh ]]; then
1515
echo "must be run from repository root"
1616
exit 255
@@ -191,7 +191,7 @@ EOF
191191
# download avalanche-network-runner
192192
# https://github.com/ava-labs/avalanche-network-runner
193193
# TODO: use "go install -v github.com/ava-labs/avalanche-network-runner/cmd/avalanche-network-runner@v${NETWORK_RUNNER_VERSION}"
194-
NETWORK_RUNNER_VERSION=1.0.12
194+
NETWORK_RUNNER_VERSION=1.0.16
195195
DOWNLOAD_PATH=/tmp/avalanche-network-runner.tar.gz
196196
DOWNLOAD_URL=https://github.com/ava-labs/avalanche-network-runner/releases/download/v${NETWORK_RUNNER_VERSION}/avalanche-network-runner_${NETWORK_RUNNER_VERSION}_linux_amd64.tar.gz
197197
if [[ ${GOOS} == "darwin" ]]; then

tests/e2e/e2e_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"testing"
1313
"time"
1414

15-
"github.com/ava-labs/avalanche-network-runner/client"
15+
runner_sdk "github.com/ava-labs/avalanche-network-runner-sdk"
1616
"github.com/ava-labs/avalanchego/ids"
1717
ginkgo "github.com/onsi/ginkgo/v2"
1818
"github.com/onsi/ginkgo/v2/formatter"
@@ -120,15 +120,15 @@ const (
120120
)
121121

122122
var (
123-
cli client.Client
123+
cli runner_sdk.Client
124124
subnetEVMRPCEps []string
125125
)
126126

127127
var _ = ginkgo.BeforeSuite(func() {
128128
gomega.Expect(mode).Should(gomega.Or(gomega.Equal("test"), gomega.Equal("run")))
129129

130130
var err error
131-
cli, err = client.New(client.Config{
131+
cli, err = runner_sdk.New(runner_sdk.Config{
132132
LogLevel: networkRunnerLogLevel,
133133
Endpoint: gRPCEp,
134134
DialTimeout: 10 * time.Second,
@@ -141,9 +141,9 @@ var _ = ginkgo.BeforeSuite(func() {
141141
resp, err := cli.Start(
142142
ctx,
143143
execPath,
144-
client.WithLogLevel(logLevel),
145-
client.WithPluginDir(pluginDir),
146-
client.WithCustomVMs(map[string]string{
144+
runner_sdk.WithLogLevel(logLevel),
145+
runner_sdk.WithPluginDir(pluginDir),
146+
runner_sdk.WithCustomVMs(map[string]string{
147147
vmName: vmGenesisPath,
148148
}))
149149
cancel()

0 commit comments

Comments
 (0)