Skip to content

Commit 6d2fcf7

Browse files
committed
feat!: sdk-50
Signed-off-by: Artur Troian <[email protected]>
1 parent 4ab1cd9 commit 6d2fcf7

File tree

433 files changed

+20505
-28132
lines changed

Some content is hidden

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

433 files changed

+20505
-28132
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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: setup-ubuntu
3+
runs:
4+
using: 'composite'
5+
steps:
6+
- name: Fetch all tags
7+
shell: bash
8+
run: git fetch --prune --unshallow
9+
- name: Install dependencies
10+
# Shell must explicitly specify the shell for each step. https://github.com/orgs/community/discussions/18597
11+
shell: bash
12+
run: sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils
13+
- name: Setup npm
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 18
17+
- name: Detect required Go version
18+
shell: bash
19+
run: |
20+
toolchain=$(./script/tools.sh gotoolchain | sed 's/^go//')
21+
if [ -z "$toolchain" ]; then
22+
echo "Error: Failed to detect Go version from script/tools.sh" >&2
23+
exit 1
24+
fi
25+
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
26+
- uses: actions/setup-go@v5
27+
with:
28+
go-version: "${{ env.GOVERSION }}"
29+
check-latest: true
30+
- name: set environment
31+
uses: HatsuneMiku3939/direnv-action@v1
32+
with:
33+
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: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,12 @@ 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
18-
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
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
- name: Setup environment
18+
uses: ./.github/actions/setup-ubuntu
2619
- name: Set up QEMU
2720
uses: docker/setup-qemu-action@v3
2821
- name: Set up Docker Buildx
@@ -45,32 +38,31 @@ jobs:
4538
# using PAT as homebrew is located in different repo
4639
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4740
test-network-upgrade-on-release:
48-
runs-on: upgrade-tester
41+
runs-on: gh-runner-test
4942
needs:
5043
- publish
5144
steps:
52-
- uses: actions/checkout@v4
53-
- run: git fetch --prune --unshallow
54-
- name: Detect required Go version
45+
- name: Cleanup build folder
5546
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
47+
sudo rm -rf ./* || true
48+
sudo rm -rf ./.??* || true
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
- name: Setup environment
52+
uses: ./.github/actions/setup-ubuntu
6353
- name: detect release tag
6454
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
6555
- name: configure variables
6656
run: |
6757
test_required=$(./script/upgrades.sh test-required ${{ env.RELEASE_TAG }})
6858
echo "TEST_REQUIRED=$test_required" >> $GITHUB_ENV
6959
- name: run test
60+
id: test
7061
if: env.TEST_REQUIRED != ''
7162
env:
7263
UPGRADE_BINARY_VERSION: ${{ env.RELEASE_TAG }}
7364
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
TEST_CONFIG: test-config-gha.json
7466
run: |
7567
cd tests/upgrade
7668
make test
@@ -80,7 +72,7 @@ jobs:
8072
with:
8173
name: logs
8274
path: |
83-
.cache/run/upgrade/validators/logs/*.log
75+
.cache/run/upgrade/validators/logs/.akash*.log
8476
8577
notify-homebrew:
8678
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)