Skip to content

Commit df3f05e

Browse files
committed
feat: cosmwasm
Signed-off-by: Artur Troian <troian@users.noreply.github.com>
1 parent aa9693f commit df3f05e

205 files changed

Lines changed: 8300 additions & 2089 deletions

File tree

Some content is hidden

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

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ROOT_DIR=${AKASH_ROOT}
66
AKASH_DEVCACHE_BASE=${AKASH_ROOT}/.cache
77
AKASH_DEVCACHE=${AKASH_DEVCACHE_BASE}
88
AKASH_DEVCACHE_BIN=${AKASH_DEVCACHE}/bin
9+
AKASH_DEVCACHE_LIB=${AKASH_DEVCACHE}/lib
910
AKASH_DEVCACHE_INCLUDE=${AKASH_DEVCACHE}/include
1011
AKASH_DEVCACHE_VERSIONS=${AKASH_DEVCACHE}/versions
1112
AKASH_DEVCACHE_NODE_MODULES=${AKASH_DEVCACHE}

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ export GOTOOLCHAIN
9999
export GOTOOLCHAIN_SEMVER
100100
export GOWORK
101101

102-
PATH_add "$AKASH_DEVCACHE_NODE_BIN"
103102
PATH_add "$AKASH_DEVCACHE_BIN"
103+
PATH_add "$AKASH_DEVCACHE_NODE_BIN"
104104

105105
AKASH_DIRENV_SET=1
106106
AKASH=$AKASH_DEVCACHE_BIN/akash

.github/actions/setup-ubuntu/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616
shell: bash
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get install -y make direnv unzip lz4 wget curl npm jq pv coreutils libudev-dev
19+
sudo apt install -y make direnv unzip lz4 wget curl npm jq pv coreutils musl-tools libudev-dev
2020
- name: Setup npm
2121
uses: actions/setup-node@v4
2222
with:

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
large-packages: true # large packages (llvm, php, mysql, etc). Saves ~5.3GB. Total CI impact: +60s (not used in build)
5858
- name: Setup environment
5959
uses: ./.github/actions/setup-ubuntu
60-
- run: make bins
60+
- run: BUILD_OPTIONS=static-link make bins
6161
- run: make docker-image
6262

6363
tests:

.goreleaser-docker.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ builds:
2424
- "-tags={{ .Env.BUILD_TAGS }}"
2525
- -trimpath
2626
ldflags:
27-
- "{{ .Env.BUILD_VARS }}"
28-
- "{{ .Env.STRIP_FLAGS }}"
29-
- "-linkmode={{ .Env.LINKMODE }}"
30-
- -extldflags "-lc -lrt -lpthread"
27+
- "{{ .Env.BUILD_LDFLAGS }}"
28+
- -s -w
29+
- -linkmode=external
30+
- -extldflags "-L./.cache/lib -lwasmvm_muslc.x86_64 -Wl,-z,muldefs -lm -lrt -lc"
3131
- id: akash-linux-arm64
3232
binary: akash
3333
main: ./cmd/akash
@@ -43,12 +43,12 @@ builds:
4343
- "-tags={{ .Env.BUILD_TAGS }}"
4444
- -trimpath
4545
ldflags:
46-
- "{{ .Env.BUILD_VARS }}"
47-
- "{{ .Env.STRIP_FLAGS }}"
48-
- "-linkmode={{ .Env.LINKMODE }}"
49-
- -extldflags "-lc -lrt -lpthread"
46+
- "{{ .Env.BUILD_LDFLAGS }}"
47+
- -s -w
48+
- -linkmode=external
49+
- -extldflags "-L./.cache/lib -lwasmvm_muslc.aarch64 -Wl,-z,muldefs -lm -lrt -lc"
5050
dockers:
51-
- dockerfile: _build/Dockerfile.akash
51+
- dockerfile: _build/akash.Dockerfile
5252
use: buildx
5353
goarch: amd64
5454
goos: linux
@@ -63,7 +63,7 @@ dockers:
6363
- --label=org.opencontainers.image.revision={{ .FullCommit }}
6464
image_templates:
6565
- '{{ .Env.DOCKER_IMAGE }}:latest-amd64'
66-
- dockerfile: _build/Dockerfile.akash
66+
- dockerfile: _build/akash.Dockerfile
6767
use: buildx
6868
goarch: arm64
6969
goos: linux

.goreleaser-test-bins.yaml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ builds:
2020
env:
2121
- CC=o64-clang
2222
- CXX=o64-clang++
23+
- CGO_CFLAGS=-mmacosx-version-min=10.12
24+
- CGO_LDFLAGS=-L./.cache/lib -mmacosx-version-min=10.12
2325
flags:
2426
- "-mod={{ .Env.MOD }}"
25-
- "-tags={{ .Env.BUILD_TAGS }}"
27+
- "-tags={{ .Env.BUILD_TAGS }} static_wasm"
2628
- -trimpath
2729
ldflags:
28-
- "{{ .Env.BUILD_VARS }}"
29-
- "{{ .Env.STRIP_FLAGS }}"
30-
- "-linkmode={{ .Env.LINKMODE }}"
30+
- "{{ .Env.BUILD_LDFLAGS }}"
31+
- -s -w
32+
- -linkmode=external
3133
- id: akash-darwin-arm64
3234
binary: akash
3335
main: ./cmd/akash
@@ -38,14 +40,16 @@ builds:
3840
env:
3941
- CC=oa64-clang
4042
- CXX=oa64-clang++
43+
- CGO_CFLAGS=-mmacosx-version-min=10.12
44+
- CGO_LDFLAGS=-L./.cache/lib -mmacosx-version-min=10.12
4145
flags:
4246
- "-mod={{ .Env.MOD }}"
43-
- "-tags={{ .Env.BUILD_TAGS }}"
47+
- "-tags={{ .Env.BUILD_TAGS }} static_wasm"
4448
- -trimpath
4549
ldflags:
46-
- "{{ .Env.BUILD_VARS }}"
47-
- "{{ .Env.STRIP_FLAGS }}"
48-
- "-linkmode={{ .Env.LINKMODE }}"
50+
- "{{ .Env.BUILD_LDFLAGS }}"
51+
- -s -w
52+
- -linkmode=external
4953
- id: akash-linux-amd64
5054
binary: akash
5155
main: ./cmd/akash
@@ -61,10 +65,10 @@ builds:
6165
- "-tags={{ .Env.BUILD_TAGS }}"
6266
- -trimpath
6367
ldflags:
64-
- "{{ .Env.BUILD_VARS }}"
65-
- "{{ .Env.STRIP_FLAGS }}"
66-
- "-linkmode={{ .Env.LINKMODE }}"
67-
- -extldflags "-lc -lrt -lpthread"
68+
- "{{ .Env.BUILD_LDFLAGS }}"
69+
- -s -w
70+
- -linkmode=external
71+
- -extldflags "-L./.cache/lib -lwasmvm_muslc.x86_64 -Wl,-z,muldefs -lm -lrt -lc"
6872
- id: akash-linux-arm64
6973
binary: akash
7074
main: ./cmd/akash
@@ -80,10 +84,10 @@ builds:
8084
- "-tags={{ .Env.BUILD_TAGS }}"
8185
- -trimpath
8286
ldflags:
83-
- "{{ .Env.BUILD_VARS }}"
84-
- "{{ .Env.STRIP_FLAGS }}"
85-
- "-linkmode={{ .Env.LINKMODE }}"
86-
- -extldflags "-lc -lrt -lpthread"
87+
- "{{ .Env.BUILD_LDFLAGS }}"
88+
- -s -w
89+
- -linkmode=external
90+
- -extldflags "-L./.cache/lib -lwasmvm_muslc.aarch64 -Wl,-z,muldefs -lm -lrt -lc"
8791
universal_binaries:
8892
- id: akash-darwin-universal
8993
ids:

.goreleaser.yaml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@ builds:
2020
env:
2121
- CC=o64-clang
2222
- CXX=o64-clang++
23+
- CGO_CFLAGS=-mmacosx-version-min=10.12
2324
flags:
2425
- "-mod={{ .Env.MOD }}"
25-
- "-tags={{ .Env.BUILD_TAGS }}"
26+
- "-tags={{ .Env.BUILD_TAGS }} static_wasm"
2627
- -trimpath
2728
ldflags:
28-
- "{{ .Env.BUILD_VARS }}"
29-
- "{{ .Env.STRIP_FLAGS }}"
30-
- "-linkmode={{ .Env.LINKMODE }}"
29+
- "{{ .Env.BUILD_LDFLAGS }}"
30+
- -s -w
31+
- -linkmode=external
32+
- -extldflags "-L./.cache/lib -mmacosx-version-min=10.12"
3133
- id: akash-darwin-arm64
3234
binary: akash
3335
main: ./cmd/akash
@@ -38,14 +40,16 @@ builds:
3840
env:
3941
- CC=oa64-clang
4042
- CXX=oa64-clang++
43+
- CGO_CFLAGS=-mmacosx-version-min=10.12
4144
flags:
4245
- "-mod={{ .Env.MOD }}"
43-
- "-tags={{ .Env.BUILD_TAGS }}"
46+
- "-tags={{ .Env.BUILD_TAGS }} static_wasm"
4447
- -trimpath
4548
ldflags:
46-
- "{{ .Env.BUILD_VARS }}"
47-
- "{{ .Env.STRIP_FLAGS }}"
48-
- "-linkmode={{ .Env.LINKMODE }}"
49+
- "{{ .Env.BUILD_LDFLAGS }}"
50+
- -s -w
51+
- -linkmode=external
52+
- -extldflags "-L./.cache/lib -mmacosx-version-min=10.12"
4953
- id: akash-linux-amd64
5054
binary: akash
5155
main: ./cmd/akash
@@ -61,10 +65,10 @@ builds:
6165
- "-tags={{ .Env.BUILD_TAGS }}"
6266
- -trimpath
6367
ldflags:
64-
- "{{ .Env.BUILD_VARS }}"
65-
- "{{ .Env.STRIP_FLAGS }}"
66-
- "-linkmode={{ .Env.LINKMODE }}"
67-
- -extldflags "-lc -lrt -lpthread"
68+
- "{{ .Env.BUILD_LDFLAGS }}"
69+
- -s -w
70+
- -linkmode=external
71+
- -extldflags "-L./.cache/lib -lwasmvm_muslc.x86_64 -Wl,-z,muldefs -lm -lrt -lc"
6872
- id: akash-linux-arm64
6973
binary: akash
7074
main: ./cmd/akash
@@ -80,10 +84,10 @@ builds:
8084
- "-tags={{ .Env.BUILD_TAGS }}"
8185
- -trimpath
8286
ldflags:
83-
- "{{ .Env.BUILD_VARS }}"
84-
- "{{ .Env.STRIP_FLAGS }}"
85-
- "-linkmode={{ .Env.LINKMODE }}"
86-
- -extldflags "-lc -lrt -lpthread"
87+
- "{{ .Env.BUILD_LDFLAGS }}"
88+
- -s -w
89+
- -linkmode=external
90+
- -extldflags "-L./.cache/lib -lwasmvm_muslc.aarch64 -Wl,-z,muldefs -lm -lrt -lc"
8791
universal_binaries:
8892
- id: akash-darwin-universal
8993
ids:
@@ -121,7 +125,7 @@ checksum:
121125
name_template: "akash_{{ .Version }}_checksums.txt"
122126

123127
dockers:
124-
- dockerfile: _build/Dockerfile.akash
128+
- dockerfile: _build/akash.Dockerfile
125129
use: buildx
126130
goarch: amd64
127131
goos: linux
@@ -138,7 +142,7 @@ dockers:
138142
- '{{ .Env.DOCKER_IMAGE }}:{{ .ShortCommit }}-amd64'
139143
- '{{ .Env.DOCKER_IMAGE }}:{{ replace .Version "+" "-" }}-amd64'
140144
- '{{ .Env.DOCKER_IMAGE }}:{{if eq .Env.STABLE "true"}}stable{{else}}latest{{end}}-amd64'
141-
- dockerfile: _build/Dockerfile.akash
145+
- dockerfile: _build/akash.Dockerfile
142146
use: buildx
143147
goarch: arm64
144148
goos: linux

0 commit comments

Comments
 (0)