From c58af574817752dcd2f20b986f1c0ea2b39577f2 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 23 Jun 2023 09:42:39 +0200 Subject: [PATCH 1/5] GitHub: run release build in CI to catch 32bit arch issues --- .github/workflows/main.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c275268c4..4d16ca207 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -77,6 +77,22 @@ jobs: - name: compile code run: go install -v ./... + ######################## + # cross compilation + ######################## + cross-compile: + name: cross compilation + runs-on: ubuntu-latest + steps: + - name: git checkout + uses: actions/checkout@v3 + + - name: setup go ${{ env.GO_VERSION }} + uses: ./.github/actions/setup-go + + - name: build release for all architectures + run: make release + ######################## # Lint check. ######################## From f5a97590c26a22063982de6afab5c951242baf2c Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 23 Jun 2023 09:50:24 +0200 Subject: [PATCH 2/5] multi: fix comments about Go version change --- .github/workflows/main.yaml | 6 ++++++ Dockerfile | 6 +++--- dev.Dockerfile | 7 ++++++- make/builder.Dockerfile | 6 +++--- taprpc/Dockerfile | 6 ++++++ tools/Dockerfile | 6 ++++++ 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 4d16ca207..1b18fa139 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -22,6 +22,12 @@ env: GOPATH: /home/runner/work/go GO111MODULE: on + # If you change this value, please change it in the following files as well: + # /Dockerfile + # /dev.Dockerfile + # /make/builder.Dockerfile + # /taprpc/Dockerfile + # /tools/Dockerfile GO_VERSION: '1.20.5' jobs: diff --git a/Dockerfile b/Dockerfile index a94466be5..ab9816586 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # If you change this value, please change it in the following files as well: -# /.travis.yml +# /.github/workflows/main.yaml # /dev.Dockerfile # /make/builder.Dockerfile -# /.github/workflows/main.yml -# /.github/workflows/release.yml +# /taprpc/Dockerfile +# /tools/Dockerfile FROM golang:1.20.5-alpine as builder # Force Go to use the cgo based DNS resolver. This is required to ensure DNS diff --git a/dev.Dockerfile b/dev.Dockerfile index fef8eba66..a310cf373 100644 --- a/dev.Dockerfile +++ b/dev.Dockerfile @@ -1,4 +1,9 @@ -# IMAGE FOR BUILDING +# If you change this value, please change it in the following files as well: +# /.github/workflows/main.yaml +# /Dockerfile +# /make/builder.Dockerfile +# /taprpc/Dockerfile +# /tools/Dockerfile FROM golang:1.20.5 as builder WORKDIR /app diff --git a/make/builder.Dockerfile b/make/builder.Dockerfile index fd63cba28..75ef3015d 100644 --- a/make/builder.Dockerfile +++ b/make/builder.Dockerfile @@ -1,9 +1,9 @@ # If you change this value, please change it in the following files as well: -# /.travis.yml +# /.github/workflows/main.yaml # /Dockerfile # /dev.Dockerfile -# /.github/workflows/main.yml -# /.github/workflows/release.yml +# /taprpc/Dockerfile +# /tools/Dockerfile FROM golang:1.20.5-buster MAINTAINER Olaoluwa Osuntokun diff --git a/taprpc/Dockerfile b/taprpc/Dockerfile index a5c7e2e8e..97661cacd 100644 --- a/taprpc/Dockerfile +++ b/taprpc/Dockerfile @@ -1,3 +1,9 @@ +# If you change this value, please change it in the following files as well: +# /.github/workflows/main.yaml +# /Dockerfile +# /dev.Dockerfile +# /make/builder.Dockerfile +# /tools/Dockerfile FROM golang:1.20.4-buster RUN apt-get update && apt-get install -y \ diff --git a/tools/Dockerfile b/tools/Dockerfile index 8230c8962..a8f21a50d 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -1,3 +1,9 @@ +# If you change this value, please change it in the following files as well: +# /.github/workflows/main.yaml +# /Dockerfile +# /dev.Dockerfile +# /make/builder.Dockerfile +# /taprpc/Dockerfile FROM golang:1.20.4-buster RUN apt-get update && apt-get install -y git From 7527e6f51fe487e37551aa1cb4a4dba115e770c9 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 23 Jun 2023 09:50:50 +0200 Subject: [PATCH 3/5] taprpc+tools: bump Golang version --- taprpc/Dockerfile | 2 +- tools/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/taprpc/Dockerfile b/taprpc/Dockerfile index 97661cacd..216931684 100644 --- a/taprpc/Dockerfile +++ b/taprpc/Dockerfile @@ -4,7 +4,7 @@ # /dev.Dockerfile # /make/builder.Dockerfile # /tools/Dockerfile -FROM golang:1.20.4-buster +FROM golang:1.20.5-buster RUN apt-get update && apt-get install -y \ git \ diff --git a/tools/Dockerfile b/tools/Dockerfile index a8f21a50d..da74c1b80 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -4,7 +4,7 @@ # /dev.Dockerfile # /make/builder.Dockerfile # /taprpc/Dockerfile -FROM golang:1.20.4-buster +FROM golang:1.20.5-buster RUN apt-get update && apt-get install -y git ENV GOCACHE=/tmp/build/.cache From 2d0c85081e2a6a58dbd042a583784d6977389402 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 23 Jun 2023 09:53:49 +0200 Subject: [PATCH 4/5] proof+itest: move aperture harness to itest This avoids including the itest package in the production build of tapd. --- proof/aperture.go => itest/aperture_harness.go | 7 ++++--- itest/tapd_harness.go | 2 +- itest/test_harness.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) rename proof/aperture.go => itest/aperture_harness.go (94%) diff --git a/proof/aperture.go b/itest/aperture_harness.go similarity index 94% rename from proof/aperture.go rename to itest/aperture_harness.go index a1754a671..406ae375a 100644 --- a/proof/aperture.go +++ b/itest/aperture_harness.go @@ -1,4 +1,4 @@ -package proof +package itest import ( "crypto/tls" @@ -11,6 +11,7 @@ import ( "time" "github.com/lightninglabs/aperture" + "github.com/lightninglabs/taproot-assets/proof" "github.com/lightningnetwork/lnd/lntest/wait" "github.com/stretchr/testify/require" ) @@ -121,5 +122,5 @@ func (h *ApertureHarness) Stop() error { return h.Service.Stop() } -// Ensure that ApertureHarness implements the CourierHarness interface. -var _ CourierHarness = (*ApertureHarness)(nil) +// Ensure that ApertureHarness implements the proof.CourierHarness interface. +var _ proof.CourierHarness = (*ApertureHarness)(nil) diff --git a/itest/tapd_harness.go b/itest/tapd_harness.go index f97811304..75a67abf6 100644 --- a/itest/tapd_harness.go +++ b/itest/tapd_harness.go @@ -137,7 +137,7 @@ func newTapdHarness(ht *harnessTest, cfg tapdConfig, // Populate proof courier specific config fields. switch typedProofCourier := (proofCourier).(type) { - case *proof.ApertureHarness: + case *ApertureHarness: // Use passed in backoff config or default config. backoffCfg := &proof.BackoffCfg{ BackoffResetWait: 20 * time.Second, diff --git a/itest/test_harness.go b/itest/test_harness.go index de7a5d8de..bf2211046 100644 --- a/itest/test_harness.go +++ b/itest/test_harness.go @@ -284,7 +284,7 @@ func setupHarnesses(t *testing.T, ht *harnessTest, case proof.ApertureCourier: port := nextAvailablePort() - apHarness := proof.NewApertureHarness(ht.t, port) + apHarness := NewApertureHarness(ht.t, port) proofCourier = &apHarness } From 9746bd314aafa05c0f3c9b8e0158064d13c4870d Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 23 Jun 2023 09:54:58 +0200 Subject: [PATCH 5/5] version: bump version to v0.2.2-alpha --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index cc74daea7..12bc6209a 100644 --- a/version.go +++ b/version.go @@ -45,7 +45,7 @@ const ( AppMinor uint = 2 // AppPatch defines the application patch for this binary. - AppPatch uint = 1 + AppPatch uint = 2 // AppPreRelease MUST only contain characters from semanticAlphabet // per the semantic versioning spec.