Skip to content

Commit b10cf66

Browse files
authored
feat!: cosmos-sdk v0.53.x (#2008)
Signed-off-by: Artur Troian <[email protected]> Co-authored-by: Artur Troian <[email protected]>
1 parent 11b52e5 commit b10cf66

File tree

434 files changed

+20067
-28187
lines changed

Some content is hidden

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

434 files changed

+20067
-28187
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ AKASH_DEVCACHE_VERSIONS=${AKASH_DEVCACHE}/versions
1111
AKASH_DEVCACHE_NODE_MODULES=${AKASH_DEVCACHE}
1212
AKASH_DEVCACHE_NODE_BIN=${AKASH_DEVCACHE_NODE_MODULES}/node_modules/.bin
1313
AKASH_RUN=${AKASH_DEVCACHE}/run
14+
AKASH_RUN_BIN=${AKASH_RUN}/bin

.envrc

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,72 +2,102 @@ direnv_version_major=$(direnv version | cut -d "." -f1 | tr -d '\n')
22
direnv_version_minor=$(direnv version | cut -d "." -f2 | tr -d '\n')
33

44
if [[ $direnv_version_major -lt 2 ]] || [[ $direnv_version_major -eq 2 ]] && [[ $direnv_version_minor -lt 32 ]]; then
5-
echo -e "\033[31munsupported direnv version $(direnv version) < 2.32.x"
6-
exit 1
5+
echo -e "\033[31munsupported direnv version $(direnv version) < 2.32.x"
6+
exit 1
77
fi
88

9-
if [[ "$SHELL" == "bash" ]]; then
10-
if [ "${BASH_VERSINFO:-0}" -lt 4 ]; then
11-
echo -e "\033[31mthe environment needs BASH 4 or above" >&2
12-
exit 1
13-
fi
9+
if [[ "$(ps -p "$$" -o 'comm=')" =~ "bash" ]]; then
10+
if [ "${BASH_VERSINFO:-0}" -lt 4 ]; then
11+
echo -e "\033[31mthe environment needs BASH 4 or above" >&2
12+
exit 1
13+
fi
1414
fi
1515

16-
if ! has make ; then
17-
echo "make is not installed"; exit 1
16+
if ! has make; then
17+
echo "make is not installed"
18+
exit 1
1819
fi
1920

20-
if ! has unzip ; then
21-
echo "unzip is not installed"; exit 1
21+
if ! has unzip; then
22+
echo "unzip is not installed"
23+
exit 1
2224
fi
2325

24-
if ! has wget ; then
25-
echo "wget is not installed"; exit 1
26+
if ! has wget; then
27+
echo "wget is not installed"
28+
exit 1
2629
fi
2730

28-
if ! has curl ; then
29-
echo "curl is not installed"; exit 1
31+
if ! has curl; then
32+
echo "curl is not installed"
33+
exit 1
3034
fi
3135

32-
if ! has npm ; then
33-
echo "npm is not installed"; exit 1
36+
if ! has npm; then
37+
echo "npm is not installed"
38+
exit 1
3439
fi
3540

36-
if ! has jq ; then
37-
echo "jq is not installed"; exit 1
41+
if ! has jq; then
42+
echo "jq is not installed"
43+
exit 1
3844
fi
3945

40-
if ! has readlink ; then
41-
echo "readlink is not installed"; exit 1
46+
if ! has readlink; then
47+
echo "readlink is not installed"
48+
exit 1
49+
fi
50+
51+
if ! has pv; then
52+
echo "pv is not installed"
53+
exit 1
54+
fi
55+
56+
if ! has lz4; then
57+
echo "lz4 is not installed"
58+
exit 1
4259
fi
4360

4461
if [ -z "$GOPATH" ]; then
45-
GOPATH=$(go env GOPATH)
46-
export GOPATH
62+
GOPATH=$(go env GOPATH)
63+
export GOPATH
4764
fi
4865

4966
AKASH_ROOT=$(pwd)
5067
export AKASH_ROOT
5168

5269
dotenv
53-
dotenv_if_exists dev.env
5470

5571
TOOLS=${AKASH_ROOT}/script/tools.sh
5672
SEMVER=${AKASH_ROOT}/script/semver.sh
5773

5874
GOTOOLCHAIN=$(${TOOLS} gotoolchain)
5975
GOTOOLCHAIN_SEMVER=$(echo "${GOTOOLCHAIN}" | sed 's/go*/v/' | tr -d '\n')
6076

77+
dotenv_if_exists dev.env
78+
79+
if [[ ${GOWORK} != "off" ]] && [[ -f go.work ]]; then
80+
GOWORK=${AKASH_ROOT}/go.work
81+
else
82+
GOWORK=off
83+
fi
84+
6185
if [[ "$OSTYPE" == "darwin"* ]]; then
62-
# on MacOS disable deprecation warnings security framework
63-
CGO_CFLAGS=-Wno-deprecated-declarations
86+
# on MacOS disable deprecation warnings security framework
87+
CGO_CFLAGS=-Wno-deprecated-declarations
88+
89+
export CGO_CFLAGS
90+
fi
6491

65-
export CGO_CFLAGS
92+
if [ -z "${GOARCH}" ]; then
93+
GOARCH=$(go env GOARCH)
94+
export GOARCH
6695
fi
6796

6897
export SEMVER
6998
export GOTOOLCHAIN
7099
export GOTOOLCHAIN_SEMVER
100+
export GOWORK
71101

72102
PATH_add "$AKASH_DEVCACHE_NODE_BIN"
73103
PATH_add "$AKASH_DEVCACHE_BIN"

.github/.repo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github.com/akash-network/node
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: setup-ubuntu
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Fetch all tags
7+
shell: bash
8+
run: |
9+
if git rev-parse --is-shallow-repository | grep -qxF true; then
10+
git fetch --prune --unshallow
11+
else
12+
git fetch --prune --tags
13+
fi
14+
- name: Install dependencies
15+
# Shell must explicitly specify the shell for each step. https://github.com/orgs/community/discussions/18597
16+
shell: bash
17+
run: sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils
18+
- name: Setup npm
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 18
22+
- name: Detect required Go version
23+
shell: bash
24+
run: |
25+
toolchain=$(./script/tools.sh gotoolchain | sed 's/^go//')
26+
if [ -z "$toolchain" ]; then
27+
echo "Error: Failed to detect Go version from script/tools.sh" >&2
28+
exit 1
29+
fi
30+
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
31+
- uses: actions/setup-go@v5
32+
with:
33+
go-version: "${{ env.GOVERSION }}"
34+
check-latest: true
35+
- name: set environment
36+
uses: HatsuneMiku3939/direnv-action@v1
37+
with:
38+
masks: ''

.github/workflows/concommits.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: webiny/action-conventional-commits@v1.1.0
17+
- uses: webiny/action-conventional-commits@v1.3.0

.github/workflows/release.yaml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,16 @@ on:
1010

1111
jobs:
1212
publish:
13-
runs-on: ubuntu-latest
13+
runs-on: core-e2e
1414
steps:
15-
- uses: actions/checkout@v4
16-
- run: git fetch --prune --unshallow
17-
- name: Detect required Go version
15+
- name: Cleanup build folder
1816
run: |
19-
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
20-
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
21-
- uses: actions/setup-go@v5
22-
with:
23-
go-version: "${{ env.GOVERSION }}"
24-
- name: set environment
25-
uses: HatsuneMiku3939/direnv-action@v1
17+
sudo rm -rf ./* || true
18+
sudo rm -rf ./.??* || true
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
- name: Setup environment
22+
uses: ./.github/actions/setup-ubuntu
2623
- name: Set up QEMU
2724
uses: docker/setup-qemu-action@v3
2825
- name: Set up Docker Buildx
@@ -37,40 +34,39 @@ jobs:
3734
password: ${{ secrets.GITHUB_TOKEN }}
3835
- name: Make and publish
3936
run: |
40-
sudo rm -rf dist
37+
sudo rm -rf .cache/goreleaser
4138
make release
4239
env:
4340
GORELEASER_RELEASE: true
4441
GORELEASER_MOUNT_CONFIG: true
4542
# using PAT as homebrew is located in different repo
4643
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4744
test-network-upgrade-on-release:
48-
runs-on: upgrade-tester
45+
runs-on: gh-runner-test
4946
needs:
5047
- publish
5148
steps:
52-
- uses: actions/checkout@v4
53-
- run: git fetch --prune --unshallow
54-
- name: Detect required Go version
49+
- name: Cleanup build folder
5550
run: |
56-
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
57-
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
58-
- uses: actions/setup-go@v5
59-
with:
60-
go-version: "${{ env.GOVERSION }}"
61-
- name: set environment
62-
uses: HatsuneMiku3939/direnv-action@v1
51+
sudo rm -rf ./* || true
52+
sudo rm -rf ./.??* || true
53+
- name: Checkout code
54+
uses: actions/checkout@v4
55+
- name: Setup environment
56+
uses: ./.github/actions/setup-ubuntu
6357
- name: detect release tag
6458
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
6559
- name: configure variables
6660
run: |
6761
test_required=$(./script/upgrades.sh test-required ${{ env.RELEASE_TAG }})
6862
echo "TEST_REQUIRED=$test_required" >> $GITHUB_ENV
6963
- name: run test
64+
id: test
7065
if: env.TEST_REQUIRED != ''
7166
env:
7267
UPGRADE_BINARY_VERSION: ${{ env.RELEASE_TAG }}
7368
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
TEST_CONFIG: test-config-gha.json
7470
run: |
7571
cd tests/upgrade
7672
make test
@@ -80,7 +76,7 @@ jobs:
8076
with:
8177
name: logs
8278
path: |
83-
.cache/run/upgrade/validators/logs/*.log
79+
.cache/run/upgrade/validators/logs/.akash*.log
8480
8581
notify-homebrew:
8682
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)