Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/repo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/akash-network/node
33 changes: 33 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,31 @@ jobs:
network-upgrade-names:
runs-on: upgrade-tester
steps:
- name: Cleanup build folder
run: |
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- name: Detect required Go version
run: |
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v3
- name: Setup npm
uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GOVERSION }}"
- name: Setup docker user
run: |
DOCKER_USER=$(id -u)
DOCKER_GROUP=$(id -g)
echo "DOCKER_USER=$DOCKER_USER" >> $GITHUB_ENV
echo "DOCKER_GROUP=$DOCKER_GROUP" >> $GITHUB_ENV
- name: set environment
uses: HatsuneMiku3939/direnv-action@v1
- name: Ensure only directories exists in upgrades dir
Expand All @@ -209,15 +225,31 @@ jobs:
network-upgrade:
runs-on: upgrade-tester
steps:
- name: Cleanup build folder
run: |
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow
- name: Detect required Go version
run: |
toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//')
echo "GOVERSION=${toolchain}" >> $GITHUB_ENV
- name: 'Setup jq'
uses: dcarbone/install-jq-action@v3
- name: Setup npm
uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GOVERSION }}"
- name: Setup docker user
run: |
DOCKER_USER=$(id -u)
DOCKER_GROUP=$(id -g)
echo "DOCKER_USER=$DOCKER_USER" >> $GITHUB_ENV
echo "DOCKER_GROUP=$DOCKER_GROUP" >> $GITHUB_ENV
- name: set environment
uses: HatsuneMiku3939/direnv-action@v1
- name: configure variables
Expand All @@ -237,6 +269,7 @@ jobs:
name: validators-logs
path: |
.cache/run/upgrade/validators/logs/*.log
include-hidden-files: true

dispatch-release:
runs-on: ubuntu-latest
Expand Down
19 changes: 13 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ issues:
exclude:
- comment on exported (method|function|type|const|var)
exclude-use-default: true

# Skip generated k8s code
run:
skip-dirs:
- pkg/client
exclude-dirs:
- ".*/mocks"

# Skip vendor/ etc
skip-dirs-use-default: true
linters:
disable-all: true
enable:
- misspell
- unused
- gofmt
- gocritic
- goconst
- ineffassign
- unparam
- staticcheck
- prealloc
4 changes: 3 additions & 1 deletion .goreleaser-docker.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
version: 2
project_name: node
dist: ./.cache/goreleaser/docker
env:
- GO111MODULE=on
- CGO_ENABLED=1
Expand Down Expand Up @@ -75,4 +78,3 @@ dockers:

archives:
- format: binary
rlcp: true
102 changes: 102 additions & 0 deletions .goreleaser-test-bins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
project_name: node
version: 2
dist: ./.cache/goreleaser/test-bins
env:
- GO111MODULE=on
- CGO_ENABLED=1
builds:
- id: akash-darwin-amd64
binary: akash
main: ./cmd/akash
goarch:
- amd64
goos:
- darwin
env:
- CC=o64-clang
- CXX=o64-clang++
flags:
- "-mod={{ .Env.MOD }}"
- "-tags={{ .Env.BUILD_TAGS }}"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- id: akash-darwin-arm64
binary: akash
main: ./cmd/akash
goarch:
- arm64
goos:
- darwin
env:
- CC=oa64-clang
- CXX=oa64-clang++
flags:
- "-mod={{ .Env.MOD }}"
- "-tags={{ .Env.BUILD_TAGS }}"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- id: akash-linux-amd64
binary: akash
main: ./cmd/akash
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
goarch:
- amd64
goos:
- linux
flags:
- "-mod={{ .Env.MOD }}"
- "-tags={{ .Env.BUILD_TAGS }}"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread --static"
- id: akash-linux-arm64
binary: akash
main: ./cmd/akash
goarch:
- arm64
goos:
- linux
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- "-mod={{ .Env.MOD }}"
- "-tags={{ .Env.BUILD_TAGS }}"
- -trimpath
ldflags:
- "{{ .Env.BUILD_VARS }}"
- "{{ .Env.STRIP_FLAGS }}"
- "-linkmode={{ .Env.LINKMODE }}"
- -extldflags "-lc -lrt -lpthread --static"
universal_binaries:
- id: akash-darwin-universal
ids:
- akash-darwin-amd64
- akash-darwin-arm64
replace: true
name_template: "akash"

archives:
- id: wo/version
builds:
- akash-darwin-universal
- akash-linux-amd64
- akash-linux-arm64
name_template: "akash_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: false
formats:
- zip
files:
- none*
8 changes: 6 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
version: 2
project_name: node
dist: ./.cache/goreleaser
env:
Expand Down Expand Up @@ -113,7 +115,8 @@ archives:
- akash-windows-amd64
name_template: "akash_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: false
format: zip
formats:
- zip
files:
- none*
- id: wo/version
Expand All @@ -124,7 +127,8 @@ archives:
- akash-windows-amd64
name_template: "akash_{{ .Os }}_{{ .Arch }}"
wrap_in_directory: false
format: zip
formats:
- zip
files:
- none*

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include make/init.mk

DOCKER_RUN := docker run --rm -v $(shell pwd):/workspace -w /workspace
GOLANGCI_LINT_RUN := $(GOLANGCI_LINT) run
LINT = $(GOLANGCI_LINT_RUN) ./... --disable-all --deadline=5m --enable
LINT = $(GOLANGCI_LINT_RUN) ./... --disable-all --timeout=5m --enable

GORELEASER_CONFIG ?= .goreleaser.yaml

Expand Down
Loading
Loading