From a3732e9a332ad892dcb778427f5a2f288bf9c441 Mon Sep 17 00:00:00 2001 From: Louis Thibault <9452561+lthibault@users.noreply.github.com> Date: Thu, 25 Jan 2024 17:56:59 -0500 Subject: [PATCH 1/7] Port CI pipeline from suave-geth. --- .github/workflows/go.yml | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 0c673d15f1..289508eb41 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,23 +1,29 @@ -name: i386 linux tests +name: Run unit tests on Linux on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] workflow_dispatch: +env: + CGO_CFLAGS_ALLOW: "-O -D__BLST_PORTABLE__" + CGO_CFLAGS: "-O -D__BLST_PORTABLE__" + jobs: build: - runs-on: self-hosted + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ '1.20', '1.21.x' ] + goarch: [amd64, arm64] + steps: - - uses: actions/checkout@v2 - - name: Set up Go - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v4 with: - go-version: 1.21.4 - - name: Run tests - run: go test -short ./... - env: - GOOS: linux - GOARCH: 386 + go-version: ${{ matrix.go-version }} + - name: Run unit tests + run: go test -short ./accounts ./cmd/geth ./core ./core/types ./core/vm ./eth/... ./internal/ethapi/... ./miner ./params ./suave/... From 2f5d16e33f909f1e9c8f521eeb97f10fea9c9d3e Mon Sep 17 00:00:00 2001 From: Louis Thibault Date: Thu, 25 Jan 2024 19:07:32 -0500 Subject: [PATCH 2/7] Fix failing test. --- cmd/geth/consolecmd_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/geth/consolecmd_test.go b/cmd/geth/consolecmd_test.go index ef6ef5f288..0559c0566a 100644 --- a/cmd/geth/consolecmd_test.go +++ b/cmd/geth/consolecmd_test.go @@ -30,7 +30,7 @@ import ( ) const ( - ipcAPIs = "admin:1.0 clique:1.0 debug:1.0 engine:1.0 eth:1.0 miner:1.0 net:1.0 rpc:1.0 txpool:1.0 web3:1.0" + ipcAPIs = "admin:1.0 clique:1.0 debug:1.0 engine:1.0 eth:1.0 miner:1.0 net:1.0 rpc:1.0 suavex:1.0 txpool:1.0 web3:1.0" httpAPIs = "eth:1.0 net:1.0 rpc:1.0 web3:1.0" ) From a7b8207783f8d43dc9b9d8b4ffcb900bc7f76893 Mon Sep 17 00:00:00 2001 From: Louis Thibault Date: Thu, 25 Jan 2024 19:13:00 -0500 Subject: [PATCH 3/7] Add 'suavex' namespace to WS interfaces (fixes test). --- cmd/geth/config.go | 2 +- cmd/geth/consolecmd_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/geth/config.go b/cmd/geth/config.go index d1cde3766e..d29a8cfc54 100644 --- a/cmd/geth/config.go +++ b/cmd/geth/config.go @@ -118,7 +118,7 @@ func defaultNodeConfig() node.Config { cfg.Name = clientIdentifier cfg.Version = params.VersionWithCommit(git.Commit, git.Date) cfg.HTTPModules = append(cfg.HTTPModules, "eth", "suavex") - cfg.WSModules = append(cfg.WSModules, "eth") + cfg.WSModules = append(cfg.WSModules, "eth", "suavex") cfg.IPCPath = "geth.ipc" return cfg } diff --git a/cmd/geth/consolecmd_test.go b/cmd/geth/consolecmd_test.go index 0559c0566a..1e28265e9d 100644 --- a/cmd/geth/consolecmd_test.go +++ b/cmd/geth/consolecmd_test.go @@ -31,7 +31,7 @@ import ( const ( ipcAPIs = "admin:1.0 clique:1.0 debug:1.0 engine:1.0 eth:1.0 miner:1.0 net:1.0 rpc:1.0 suavex:1.0 txpool:1.0 web3:1.0" - httpAPIs = "eth:1.0 net:1.0 rpc:1.0 web3:1.0" + httpAPIs = "eth:1.0 net:1.0 rpc:1.0 suavex:1.0 web3:1.0" ) // spawns geth with the given command line args, using a set of flags to minimise From 6eae2010d2645f3c607a6997fbb1131ae7800e4d Mon Sep 17 00:00:00 2001 From: Louis Thibault <9452561+lthibault@users.noreply.github.com> Date: Fri, 26 Jan 2024 10:19:02 -0500 Subject: [PATCH 4/7] Update .github/workflows/go.yml Co-authored-by: Chris Hager --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 289508eb41..5106efda99 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -12,7 +12,7 @@ env: CGO_CFLAGS: "-O -D__BLST_PORTABLE__" jobs: - build: + test: runs-on: ubuntu-latest strategy: matrix: From 95276896dbe15bd0ca80bcce28c48398011d1ca5 Mon Sep 17 00:00:00 2001 From: Louis Thibault Date: Fri, 26 Jan 2024 10:23:07 -0500 Subject: [PATCH 5/7] Rename go.yml to checks.yml --- .github/workflows/{go.yml => checks.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{go.yml => checks.yml} (100%) diff --git a/.github/workflows/go.yml b/.github/workflows/checks.yml similarity index 100% rename from .github/workflows/go.yml rename to .github/workflows/checks.yml From 130c2aa65477ca504e5c24d8c4625b2b38876c91 Mon Sep 17 00:00:00 2001 From: Louis Thibault Date: Fri, 26 Jan 2024 10:24:24 -0500 Subject: [PATCH 6/7] Run CI on all PRs. --- .github/workflows/checks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 5106efda99..06ca109270 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -4,7 +4,6 @@ on: push: branches: [ main ] pull_request: - branches: [ main ] workflow_dispatch: env: From 2fd43f93d28724e2311fdf4fce8081caa4ae7098 Mon Sep 17 00:00:00 2001 From: Louis Thibault Date: Fri, 26 Jan 2024 10:26:05 -0500 Subject: [PATCH 7/7] Test on default goarch. --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 06ca109270..dced6220e3 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: go-version: [ '1.20', '1.21.x' ] - goarch: [amd64, arm64] + # goarch: [amd64, arm64] steps: - uses: actions/checkout@v4