Skip to content

Commit c2e0e0b

Browse files
committed
use goreleaser for build/release
1 parent 7f0de62 commit c2e0e0b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3289
-984
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Darwin Binaries
2+
3+
# reusable workflow, do not add triggers
4+
on:
5+
workflow_call:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-binaries:
10+
name: Build xiond-${{ matrix.os }}-${{ matrix.arch }}
11+
runs-on: 'ubuntu-latest'
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os:
17+
- darwin
18+
arch:
19+
- amd64
20+
- arm64
21+
22+
steps:
23+
- name: Check Out Code
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set Go Version
29+
run: sed -En 's/^go (.*)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
30+
31+
- name: Set up Go
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version: ${{ env.GO_VERSION }}
35+
36+
- name: Build darwin Binary
37+
env:
38+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
39+
run: |
40+
make build-${{ matrix.os }}-${{ matrix.arch }}
41+
42+
- name: Upload Binary
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: xiond-${{ matrix.os }}-${{ matrix.arch }}
46+
path: dist/**/xiond-${{ matrix.os }}-${{ matrix.arch }}
47+
retention-days: 3
48+
if-no-files-found: error
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build Linux Binaries
2+
3+
# reusable workflow, do not add triggers
4+
on:
5+
workflow_call:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-binaries:
10+
name: Build xiond-${{ matrix.os }}-${{ matrix.arch }}
11+
runs-on: ${{ matrix.arch == 'arm64' && format('github-{0}', matrix.arch) || 'ubuntu-latest' }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os:
17+
- linux
18+
arch:
19+
- amd64
20+
- arm64
21+
22+
steps:
23+
- name: Check Out Code
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set Go Version
29+
run: sed -En 's/^go (.*)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
30+
31+
- name: Set up Go
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version: ${{ env.GO_VERSION }}
35+
36+
- name: Build Linux Binary
37+
env:
38+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
39+
run: |
40+
make build-${{ matrix.os }}-${{ matrix.arch }}
41+
42+
- name: Upload Binary
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: xiond-${{ matrix.os }}-${{ matrix.arch }}
46+
path: dist/**/xiond-${{ matrix.os }}-${{ matrix.arch }}
47+
retention-days: 3
48+
if-no-files-found: error
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build Test Binaries
2+
3+
# reusable workflow, do not add triggers
4+
on:
5+
workflow_call:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-integration:
10+
name: Build test-${{ matrix.os }}-${{ matrix.arch }}
11+
runs-on: ${{ matrix.arch == 'arm64' && format('github-{0}', matrix.arch) || 'ubuntu-latest' }}
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os:
17+
- linux
18+
arch:
19+
- amd64
20+
- arm64
21+
22+
steps:
23+
- name: Check Out Code
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Set Go Version
29+
run: sed -En 's/^go (.*)$/GO_VERSION=\1/p' integration_tests/go.mod >> $GITHUB_ENV
30+
31+
- name: Set up Go
32+
uses: actions/setup-go@v5
33+
with:
34+
go-version: ${{ env.GO_VERSION }}
35+
36+
- name: Build Test Binary
37+
working-directory: integration_tests
38+
run: |
39+
go test -c -o ../dist/test-${{ matrix.os }}-${{ matrix.arch }}
40+
41+
- name: Upload Test Binaries
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: test-${{ matrix.os }}-${{ matrix.arch }}
45+
path: dist/test-${{ matrix.os }}-${{ matrix.arch }}
46+
retention-days: 3
47+
if-no-files-found: error
48+
49+
- name: find wasmvm lib
50+
run: |
51+
WASM_PATH="$(find /home/runner/go/pkg/mod -name libwasmvm.$(uname -m).so 2>/dev/null | head -n 1)"
52+
echo "WASM_PATH=$WASM_PATH" | tee -a $GITHUB_ENV
53+
echo "WASM_FILE=$(basename $WASM_PATH)" | tee -a $GITHUB_ENV
54+
55+
- name: Upload wasmvm lib
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: ${{ env.WASM_FILE }}
59+
path: ${{ env.WASM_PATH }}
60+
if-no-files-found: error
61+
retention-days: 3

.github/workflows/build-release-info.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,6 @@ jobs:
2525
pattern: xiond-*
2626
merge-multiple: true
2727

28-
- name: Create binaries.json
29-
working-directory: release
30-
id: binaries-json
31-
run: |
32-
set -Eeuo pipefail
33-
ls xiond-* | grep -v 'xiond-darwin-all' | while read -r file; do
34-
platform=$(echo $file | cut -d- -f2- | sed -E 's/^rc[0-9]*-//g; s/-/\//g')
35-
checksum=$(sha256sum "$file" | awk '{ print $1 }')
36-
echo "$platform: https://github.com/burnt-labs/xion/releases/download/${{ github.ref_name }}/$file?checksum=sha256:$checksum"
37-
done | yq '{"binaries": .}' -o json | tee binaries.json
38-
39-
- name: Upload binaries.json file
40-
uses: actions/upload-artifact@v4
41-
with:
42-
name: binaries.json
43-
path: release/binaries.json
44-
retention-days: 3
45-
if-no-files-found: error
46-
4728
- name: Create version.json
4829
working-directory: release
4930
run: |

.github/workflows/build-release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Build Release
22
# Run for new release tags only
3+
# superceded by goreleaser.yaml
34

45
on:
56
workflow_call:

.github/workflows/build-test.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,33 @@ concurrency:
1414
jobs:
1515
lint:
1616
name: Golang CI Lint
17-
uses: burnt-labs/xion/.github/workflows/golangci-lint.yaml@main
17+
uses: burnt-labs/xion/.github/workflows/golangci-lint.yaml@workflows/main
1818
secrets: inherit
1919

2020
update-swagger:
2121
name: Update Swagger
22-
uses: burnt-labs/xion/.github/workflows/update-swagger.yaml@main
22+
uses: burnt-labs/xion/.github/workflows/update-swagger.yaml@workflows/main
2323
secrets: inherit
2424

2525
unit-tests:
2626
name: Go Unit Tests
27-
uses: burnt-labs/xion/.github/workflows/tests.yaml@main
27+
uses: burnt-labs/xion/.github/workflows/tests.yaml@workflows/main
2828
secrets: inherit
2929

30-
build-docker:
31-
name: Build Docker Images
32-
uses: burnt-labs/xion/.github/workflows/docker-build.yaml@main
30+
build-integration:
31+
name: Build Binaries
32+
uses: burnt-labs/xion/.github/workflows/binaries-test.yaml@workflows/main
3333
secrets: inherit
3434

35-
docker-scout:
36-
needs: build-docker
37-
name: Docker Scout
38-
uses: burnt-labs/xion/.github/workflows/docker-scout.yaml@main
35+
build-docker:
36+
name: Build Docker Images
37+
uses: burnt-labs/xion/.github/workflows/docker-build.yaml@workflows/main
3938
secrets: inherit
4039

4140
interchain-tests:
42-
needs: build-docker
4341
name: Interchain tests
44-
uses: burnt-labs/xion/.github/workflows/integration-tests.yaml@main
42+
needs:
43+
- build-docker
44+
- build-integration
45+
uses: burnt-labs/xion/.github/workflows/integration-tests.yaml@workflows/main
4546
secrets: inherit

.github/workflows/create-release.yaml

Lines changed: 56 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,78 +15,106 @@ concurrency:
1515
jobs:
1616
lint:
1717
name: Golang CI Lint
18-
uses: burnt-labs/xion/.github/workflows/golangci-lint.yaml@main
18+
uses: burnt-labs/xion/.github/workflows/golangci-lint.yaml@workflows/main
1919
secrets: inherit
2020

2121
update-swagger:
2222
name: Update Swagger
23-
uses: burnt-labs/xion/.github/workflows/update-swagger.yaml@main
23+
uses: burnt-labs/xion/.github/workflows/update-swagger.yaml@workflows/main
2424
secrets: inherit
2525

2626
unit-tests:
2727
name: Go Unit Tests
28-
uses: burnt-labs/xion/.github/workflows/tests.yaml@main
28+
uses: burnt-labs/xion/.github/workflows/tests.yaml@workflows/main
2929
secrets: inherit
3030

31-
build-darwin-binaries:
32-
name: Build Darwin Binaries
33-
uses: burnt-labs/xion/.github/workflows/darwin-build.yaml@main
31+
build-darwin:
32+
name: Build Binaries
33+
uses: burnt-labs/xion/.github/workflows/binaries-darwin.yaml@workflows/main
34+
secrets: inherit
35+
36+
build-linux:
37+
name: Build Binaries
38+
uses: burnt-labs/xion/.github/workflows/binaries-linux.yaml@workflows/main
39+
secrets: inherit
40+
41+
build-integration:
42+
name: Build Binaries
43+
uses: burnt-labs/xion/.github/workflows/binaries-test.yaml@workflows/main
3444
secrets: inherit
3545

3646
build-docker:
3747
name: Build Docker Images
38-
uses: burnt-labs/xion/.github/workflows/docker-build.yaml@main
48+
needs: build-linux
49+
uses: burnt-labs/xion/.github/workflows/docker-build.yaml@workflows/main
3950
secrets: inherit
4051

4152
push-docker:
4253
name: Push Docker Images
4354
needs: build-docker
44-
uses: burnt-labs/xion/.github/workflows/docker-push.yaml@main
55+
uses: burnt-labs/xion/.github/workflows/docker-push.yaml@workflows/main
4556
secrets: inherit
4657

4758
push-heighliner:
4859
name: Push Heighliner Images
4960
needs: build-docker
50-
uses: burnt-labs/xion/.github/workflows/heighliner-push.yaml@main
61+
uses: burnt-labs/xion/.github/workflows/heighliner-push.yaml@workflows/main
5162
secrets: inherit
5263

5364
docker-scout:
5465
name: Docker Scout
5566
needs: build-docker
56-
uses: burnt-labs/xion/.github/workflows/docker-scout.yaml@main
67+
uses: burnt-labs/xion/.github/workflows/docker-scout.yaml@workflows/main
5768
secrets: inherit
5869

5970
interchain-tests:
6071
name: Interchain tests
61-
needs: build-docker
62-
uses: burnt-labs/xion/.github/workflows/integration-tests.yaml@main
63-
secrets: inherit
64-
65-
build-release-info:
66-
name: Build Release Info
67-
needs:
72+
needs:
6873
- build-docker
69-
- build-darwin-binaries
70-
uses: burnt-labs/xion/.github/workflows/build-release-info.yaml@main
74+
- build-integration
75+
uses: burnt-labs/xion/.github/workflows/integration-tests.yaml@workflows/main
7176
secrets: inherit
7277

7378
build-release:
7479
name: Build Release
7580
needs:
81+
- build-linux
7682
- lint
7783
- update-swagger
7884
- unit-tests
85+
- build-darwin
7986
- docker-scout
8087
- interchain-tests
81-
- build-release-info
82-
- build-darwin-binaries
83-
uses: burnt-labs/xion/.github/workflows/build-release.yaml@main
88+
uses: burnt-labs/xion/.github/workflows/goreleaser.yaml@workflows/main
8489
secrets: inherit
8590

86-
update-networks:
87-
name: Update Networks Repo
88-
needs:
89-
- build-release
90-
- build-release-info
91-
uses: burnt-labs/xion/.github/workflows/update-networks.yaml@main
91+
# # TODO: move to goreleaser
92+
# build-release-info:
93+
# name: Build Release Info
94+
# needs:
95+
# - build-darwin
96+
# - build-linux
97+
# uses: burnt-labs/xion/.github/workflows/build-release-info.yaml@workflows/main
98+
# secrets: inherit
99+
100+
# TODO: move to goreleaser
101+
publish-types:
102+
name: Publish Typescript Types
103+
needs: build-release
104+
uses: burnt-labs/xion/.github/workflows/publish-types.yaml@workflows/main
105+
secrets: inherit
106+
107+
# TODO: move to triggered action in burnt-networks repo
108+
# update-networks:
109+
# name: Update Networks Repo
110+
# needs:
111+
# - build-release
112+
# - build-release-info
113+
# uses: burnt-labs/xion/.github/workflows/update-networks.yaml@workflows/main
114+
# secrets: inherit
115+
116+
verify-installers:
117+
name: Verify Package Installers
118+
needs: build-release
119+
uses: burnt-labs/xion/.github/workflows/verify-installers.yaml@workflows/main
92120
secrets: inherit

0 commit comments

Comments
 (0)