-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump version * update shasum * bump wasmvm * test inintial file * add test step * add to pipeline * add build step * add build step * split pipelinne * convert to yml to support imports * bump to go 1.23 * bump go alpine * fix build script * add docker dind service * build docker * update docker version * debug docker * test * test direct path * sleep * test * Test * mount volumes * fix go version * build docker and update go and alpine versions * enable preferred settings * run on start only * update golang version * fix libwasm hash * fix lint issues * bump ibc-hooks
- Loading branch information
1 parent
cd1d96d
commit 669f780
Showing
12 changed files
with
302 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
load("scripts/drone/pipelines/test_and_build.star", "pipeline_test_and_build") | ||
|
||
def main(ctx): | ||
return [ | ||
pipeline_test_and_build(ctx) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
kind: pipeline | ||
name: test_and_build | ||
services: | ||
- image: docker:dind | ||
name: dind | ||
privileged: true | ||
volumes: | ||
- name: dockersock | ||
path: /var/run | ||
steps: | ||
- commands: | ||
- git fetch --tags | ||
image: alpine/git | ||
name: fetch | ||
- commands: | ||
- sleep 10 | ||
- ls -l /var/run/docker.sock | ||
- test -S /var/run/docker.sock && echo 'Docker socket found' || echo 'Docker socket | ||
missing' | ||
image: alpine | ||
name: debug_dind | ||
volumes: | ||
- name: dockersock | ||
path: /var/run | ||
- commands: | ||
- ./scripts/go-test.sh | ||
environment: | ||
GOPROXY: http://goproxy | ||
image: publicawesome/golang:1.23.5-devtooling | ||
name: test | ||
- commands: | ||
- apk add --no-cache ca-certificates build-base git | ||
- wget https://github.com/CosmWasm/wasmvm/releases/download/v2.1.4/libwasmvm_muslc.x86_64.a | ||
-O /lib/libwasmvm_muslc.x86_64.a | ||
- echo 'a4a3d09b36fabb65b119d5ba23442c23694401fcbee4451fe6b7e22e325a4bac /lib/libwasmvm_muslc.x86_64.a' | ||
| sha256sum -c | ||
- LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build | ||
- echo 'Ensuring binary is statically linked ...' && (file $PWD/bin/starsd | grep | ||
'statically linked') | ||
environment: | ||
GOPROXY: http://goproxy | ||
image: golang:1.23.5-alpine3.20 | ||
name: build | ||
- commands: | ||
- docker build -t publicawesome/stargaze:latest . | ||
image: docker:24 | ||
name: build_docker | ||
volumes: | ||
- name: dockersock | ||
path: /var/run | ||
type: docker | ||
volumes: | ||
- name: dockersock | ||
temp: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package cmd | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/cosmos/cosmos-sdk/server" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
const flagSkipPreferredSettings = "skip-preferred-settings" | ||
|
||
type PreferredSetting struct { | ||
ViperKey string | ||
Value string | ||
Set func(serverCtx *server.Context, key, value string) error | ||
} | ||
|
||
var preferredSettings = []PreferredSetting{ | ||
{ | ||
ViperKey: "consensus.timeout_commit", | ||
Value: "3s", | ||
Set: func(serverCtx *server.Context, key, value string) error { | ||
serverCtx.Viper.Set(key, value) | ||
serverCtx.Config.Consensus.TimeoutCommit = 3 * time.Second | ||
return nil | ||
}, | ||
}, | ||
{ | ||
ViperKey: "consensus.timeout_propose", | ||
Value: "2s", | ||
Set: func(serverCtx *server.Context, key, value string) error { | ||
serverCtx.Viper.Set(key, value) | ||
serverCtx.Config.Consensus.TimeoutPropose = 2 * time.Second | ||
return nil | ||
}, | ||
}, | ||
{ | ||
ViperKey: "wasm.memory_cache_size", | ||
Value: "1024", | ||
Set: func(serverCtx *server.Context, key, value string) error { | ||
serverCtx.Viper.Set(key, value) | ||
return nil | ||
}, | ||
}, | ||
} | ||
|
||
func SetPreferredSettings(cmd *cobra.Command, _ []string) error { | ||
if cmd.Name() != "start" { | ||
return nil | ||
} | ||
|
||
skip, err := cmd.Flags().GetBool(flagSkipPreferredSettings) | ||
if err != nil { | ||
return err | ||
} | ||
if skip { | ||
return nil | ||
} | ||
|
||
serverCtx := server.GetServerContextFromCmd(cmd) | ||
|
||
for _, setting := range preferredSettings { | ||
err := setting.Set(serverCtx, setting.ViperKey, setting.Value) | ||
if err != nil { | ||
return err | ||
} | ||
} | ||
|
||
return server.SetCmdServerContext(cmd, serverCtx) | ||
} | ||
|
||
func LogPreferredSettings(cmd *cobra.Command, _ []string) error { | ||
if cmd.Name() != "start" { | ||
return nil | ||
} | ||
serverCtx := server.GetServerContextFromCmd(cmd) | ||
|
||
skip, err := cmd.Flags().GetBool(flagSkipPreferredSettings) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
if !skip { | ||
serverCtx.Logger.Info("using preferred settings use --skip-preferred-settings to disable") | ||
} | ||
|
||
serverCtx.Logger.Info("using timeout_commit", "value", serverCtx.Config.Consensus.TimeoutCommit.String()) | ||
serverCtx.Logger.Info("using timeout_propose", "value", serverCtx.Config.Consensus.TimeoutPropose.String()) | ||
serverCtx.Logger.Info("using wasm.memory_cache_size", "value", serverCtx.Viper.Get("wasm.memory_cache_size")) | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.