Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/cicd #813

Merged
merged 2 commits into from
Oct 30, 2023
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
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-buf:
name: Publish buf.build proto
runs-on: self-hosted
needs: release
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: bufbuild/buf-setup-action@v1
with:
buf_token: ${{ secrets.BUF_TOKEN }}
input: "proto"
# publish-buf:
# name: Publish buf.build proto
# runs-on: self-hosted
# needs: release
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - uses: bufbuild/buf-setup-action@v1
# with:
# buf_token: ${{ secrets.BUF_TOKEN }}
# input: "proto"
50 changes: 5 additions & 45 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# Project information.
project_name: sonrd

env:
- CGO_ENABLED=1
- WASMVM_URL=https://github.com/CosmWasm/wasmvm/releases/download
- COSMWASM_VERSION=v1.2.4
builds:
# Build - Linux (amd64)
- id: sonrd-linux-amd64
env:
- CC=x86_64-linux-gnu-gcc
hooks:
pre:
- wget {{ .Env.WASMVM_URL }}/v1.3.0/libwasmvm_muslc.x86_64.a -O /usr/lib/x86_64-linux-gnu/libwasmvm_muslc.a
main: ./cmd/sonrd
binary: sonrd
goos:
Expand All @@ -27,22 +17,13 @@ builds:
- -X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,muslc,osusergo
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
tags:
- netgo
- muslc
- osusergo

# Build - Linux (arm64)
- id: sonrd-linux-arm64
env:
- CC=aarch64-linux-gnu-gcc
hooks:
pre:
- wget {{ .Env.WASMVM_URL }}/v1.3.0/libwasmvm_muslc.aarch64.a -O /opt/homebrew/lib/aarch64-linux-gnu/libwasmvm_muslc.a
main: ./cmd/sonrd
binary: sonrd
goos:
Expand All @@ -57,24 +38,15 @@ builds:
- -X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,muslc,osusergo
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo
- -w -s
- -linkmode=external
- -extldflags '-Wl,-z,muldefs -static -lm'
tags:
- netgo
- muslc
- ousergo

# Build - Darwin (amd64)
- id: sonrd-darwin-amd64
main: ./cmd/sonrd/main.go
binary: sonrd
hooks:
pre:
- wget {{ .Env.WASMVM_URL }}/v1.3.0/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a
env:
- CC=o64-clang
- CGO_LDFLAGS=-L/lib
goos:
- darwin
goarch:
Expand All @@ -87,24 +59,15 @@ builds:
- -X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo
- -w -s
- -linkmode=external
tags:
- netgo
- static_wasm
- ledger

# Build - Darwin (arm64)
- id: sonrd-darwin-arm64
main: ./cmd/sonrd/main.go
binary: sonrd
hooks:
pre:
- wget {{ .Env.WASMVM_URL }}/v1.3.0/libwasmvmstatic_darwin.a -O /lib/libwasmvmstatic_darwin.a
env:
- CC=oa64-clang
- CGO_LDFLAGS=-L/lib
goos:
- darwin
goarch:
Expand All @@ -117,13 +80,10 @@ builds:
- -X github.com/cosmos/cosmos-sdk/version.AppName=sonrd
- -X github.com/cosmos/cosmos-sdk/version.Version={{ .Version }}
- -X github.com/cosmos/cosmos-sdk/version.Commit={{ .Commit }}
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo,ledger,static_wasm
- -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo
- -w -s
- -linkmode=external
tags:
- netgo
- static_wasm
- ledger

# ! ||--------------------------------------------------------------------------------||
# ! || Tarball Archives ||
Expand Down
2 changes: 1 addition & 1 deletion cmd/sonrd/cmd/genaccounts.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sonrcmd

import (
"bufio"
Expand Down
2 changes: 1 addition & 1 deletion cmd/sonrd/cmd/geninit.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sonrcmd

import (
"bufio"
Expand Down
2 changes: 1 addition & 1 deletion cmd/sonrd/cmd/gentx.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sonrcmd

import (
"bufio"
Expand Down
89 changes: 0 additions & 89 deletions cmd/sonrd/cmd/launch.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/sonrd/cmd/plugin.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sonrcmd

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/sonrd/cmd/plugin_default.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sonrcmd

import (
"fmt"
Expand Down
8 changes: 1 addition & 7 deletions cmd/sonrd/cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sonrcmd

import (
"context"
Expand Down Expand Up @@ -145,12 +145,6 @@ func initRootCmd(
banktypes.GenesisBalancesIterator{},
app.DefaultNodeHome,
),
LaunchCmd(
app.ModuleBasics,
encodingConfig.TxConfig,
banktypes.GenesisBalancesIterator{},
app.DefaultNodeHome,
),
NewPlugin(),
genutilcli.ValidateGenesisCmd(app.ModuleBasics),
AddGenesisAccountCmd(app.DefaultNodeHome),
Expand Down
4 changes: 2 additions & 2 deletions cmd/sonrd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

"github.com/sonr-io/core/app"
"github.com/sonr-io/core/cmd/sonrd/cmd"
sonrcmd "github.com/sonr-io/core/cmd/sonrd/cmd"
)

func main() {

rootCmd, _ := cmd.NewRootCmd()
rootCmd, _ := sonrcmd.NewRootCmd()
if err := svrcmd.Execute(rootCmd, "SONR", app.DefaultNodeHome); err != nil {
switch e := err.(type) {
case server.ErrorCode:
Expand Down
Loading