Skip to content

Commit

Permalink
Merge branch 'master' into addprofile
Browse files Browse the repository at this point in the history
  • Loading branch information
kazai777 committed May 9, 2024
2 parents 4770d4b + 1c6a4e2 commit e6a1dee
Show file tree
Hide file tree
Showing 251 changed files with 11,839 additions and 13,826 deletions.
104 changes: 64 additions & 40 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,87 @@
# Primary repo maintainers.
* @gnolang/tech-staff

# Tendermint2 (Gno version).
/tm2/* @gnolang/tech-staff
/tm2/pkg @jaekwon @piux2 @moul @zivkovicmilos
/tm2/pkg/crypto @jaekwon @moul @gnolang/security
# Tendermint2.
/tm2/ @jaekwon @moul @piux2 @zivkovicmilos
/tm2/pkg/crypto/ @jaekwon @moul @gnolang/security
/tm2/pkg/crypto/keys/client/ @jaekwon @gnolang/security
/tm2/pkg/db/ @ajnavarro
# TODO: add per package exceptions
# ...

# Docs & Content.
/docs/ @gnolang/devrels
/misc/docusaurus/ @gnolang/devrels
/README.md @gnolang/devrels
/docs/ @moul
/docs/**.md @gnolang/devrels
/docs/**.gif @gnolang/devrels
/docs/Makefile @gnolang/devrels
/README.md @moul @gnolang/devrels
/**/README.md @gnolang/devrels
/.gitpod.yml @gnolang/devrels

# Gno examples and default contracts.
/examples/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/p/demo/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/r/demo/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/r/gnoland/ @moul
/examples/gno.land/p/gov/ @moul
/examples/gno.land/p/sys/ @moul
/examples/gno.land/r/gov/ @moul
/examples/gno.land/r/sys/ @moul
/examples/gno.land/r/worx/ @moul
/examples/gno.land/r/x @gnolang/devrels
# TODO: add people from the community here.
/examples/gno.land/r/jaekwon/ @jaekwon
/examples/gno.land/r/manfred/ @moul
/examples/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/p/demo/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/p/demo/avl/ @jaekwon
/examples/gno.land/p/demo/bf/ @moul
/examples/gno.land/p/demo/blog/ @gnolang/devrels
/examples/gno.land/p/demo/cford32/ @thehowl
/examples/gno.land/p/demo/memeland/ @leohhhn
/examples/gno.land/p/demo/seqid/ @thehowl
/examples/gno.land/p/demo/ownable/ @leohhhn
/examples/gno.land/p/demo/pausable/ @leohhhn
/examples/gno.land/p/demo/stack/ @harry-hov
/examples/gno.land/p/demo/svg/ @moul
/examples/gno.land/p/demo/tamagotchi/ @moul
/examples/gno.land/p/demo/ui/ @moul
/examples/gno.land/r/demo/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/r/demo/art/ @moul
/examples/gno.land/r/demo/memeland/ @leohhhn
/examples/gno.land/r/demo/tamagotchi/ @moul
/examples/gno.land/r/demo/userbook/ @leohhhn
/examples/gno.land/r/gnoland/ @moul
/examples/gno.land/r/sys/ @moul
/examples/gno.land/r/jaekwon/ @jaekwon
/examples/gno.land/r/manfred/ @moul

# Gno.land.
/gno.land/ @moul
/gno.land/pkg/integration @gfanton
/gno.land/ @moul @zivkovicmilos
/gno.land/cmd/genesis/ @zivkovicmilos
/gno.land/cmd/gnokey/ @jaekwon @moul @gfanton
/gno.land/cmd/gnoland/ @zivkovicmilos @gnolang/devops
/gno.land/cmd/gnoweb/ @gfanton @thehowl
/gno.land/pkg/gnoclient/ @zivkovicmilos @leohhhn @gfanton
/gno.land/pkg/gnoland/ @zivkovicmilos @gfanton
/gno.land/pkg/keyscli/ @jaekwon @moul @gfanton
/gno.land/pkg/log/ @zivkovicmilos @gfanton
/gno.land/pkg/sdk/vm/ @moul @gfanton @thehowl
/gno.land/pkg/integration/ @gfanton
/gno.land/genesis/ @moul
#...

# GnoVM/Gnolang.
/gnovm/ @gnolang/tech-staff
/gnovm/stdlibs @jaekwon @thehowl
/gnovm/tests @jaekwon @piux2 @thehowl @moul
/gnovm/cmd/gno @jaekwon @thehowl @harry-hov @moul
/gnovm/pkg/gnolang @jaekwon @piux2 @thehowl @moul
/gnovm/pkg/doc @thehowl
/gnovm/pkg/gnomod @harry-hov
/gnovm/pkg/integration @gfanton
#/gnovm/pkg/gnoenv
#/gnovm/pkg/repl
/gnovm/ @jaekwon @moul @piux2 @thehowl
/gnovm/stdlibs/ @thehowl
/gnovm/tests/ @jaekwon @deelawn @thehowl @mvertes
/gnovm/cmd/gno/ @moul @thehowl @harry-hov
/gnovm/pkg/gnolang/ @jaekwon @moul @piux2 @deelawn
/gnovm/pkg/doc/ @thehowl
/gnovm/pkg/repl/ @mvertes @ajnavarro
/gnovm/pkg/gnomod/ @harry-hov
/gnovm/pkg/gnoenv/ @gfanton
/gnovm/pkg/transpiler/ @thehowl
/gnovm/pkg/integration/ @gfanton

# Contribs
/contribs/ @gnolang/tech-staff
/contribs/gnodev @gfanton
/contribs/gnokeykc @moul
/contribs/gnomd @moul
#...
/contribs/gnodev/ @gfanton
/contribs/gnokeykc/ @moul
/contribs/gnomd/ @moul

# Misc
/misc/ @gnolang/tech-staff
/misc/loop @moul @gnolang/devops
/misc/deployments @moul @gnolang/devops
/misc/genstd @thehowl
#...
/misc/loop/ @moul @gnolang/devops
/misc/deployments/ @moul @gnolang/devops
/misc/genstd/ @thehowl

# Special files.
/PLAN.md @jaekwon @moul
Expand All @@ -69,3 +92,4 @@
/LICENSE.md @jaekwon
/.github/ @moul @gnolang/tech-staff
/.github/CODEOWNERS @jaekwon @moul
/go.mod @gnolang/tech-staff # no unnecessary dependencies
40 changes: 39 additions & 1 deletion .github/workflows/contribs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,43 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goversion }}
- run: make install ${{ matrix.program }}
- run: make install.${{ matrix.program }}
working-directory: contribs

test:
strategy:
fail-fast: false
matrix:
goversion: # two latest versions
- "1.21.x"
- "1.22.x"
program:
- "gnodev"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- run: make test.${{ matrix.program }}
working-directory: contribs

lint:
strategy:
fail-fast: false
matrix:
goversion:
- "1.22.x"
program:
- "gnodev"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- run: make lint.${{ matrix.program }}
working-directory: contribs

22 changes: 22 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: deploy docs on gnolang/docs.gno.land repository
on:
push:
branches:
- master
paths:
- "docs/**"

jobs:
trigger-netlify-docs-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.DOCS_DEPLOY_PAT }}
script: |
await github.rest.actions.createworkflowDispatch({
owner: 'gnolang',
repo: 'docs.gno.land',
workflow_id: 'netlify.yml',
ref: 'main'
})
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
Expand All @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: [gnoland-slim, gnokey-slim, gno-slim, gnofaucet-slim, gnoweb-slim]
target: [ gnoland-slim, gnokey-slim, gno-slim, gnofaucet-slim, gnoweb-slim ]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -71,7 +71,7 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
with:
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/docusaurus.yml

This file was deleted.

7 changes: 1 addition & 6 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,8 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goversion }}
- run: go install -v ./gnovm/cmd/gno
# testing official directories, basically examples/ minus examples/.../x/.
- run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/p
- run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/demo
- run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/gnoland
- run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/sys
# - run: go run ./gnovm/cmd/gno lint -v ./examples/gno.land/r/gov
- run: make lint -C ./examples
# TODO: consider running lint on every other directories, maybe in "warning" mode?
# TODO: track coverage
mod-tidy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
working-directory: tm2
run: |
export GOPATH=$HOME/go
export GOTEST_FLAGS="-v -p 1 -timeout=20m -coverprofile=coverage.out -covermode=atomic"
export GOTEST_FLAGS="-v -p 1 -timeout=20m -coverprofile=coverage.out -covermode=atomic -tags='ledger_suite'"
make ${{ matrix.args }}
touch coverage.out
- uses: actions/upload-artifact@v4
Expand Down
12 changes: 10 additions & 2 deletions contribs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,13 @@ tidy:
########################################
# Test suite
.PHONY: test
test:
@echo "nothing to do."
test: test.gnodev
test.gnodev:
$(MAKE) -C ./gnodev test

########################################
# Lint
.PHONY: test
lint: lint.gnodev
lint.gnodev:
$(MAKE) -C ./gnodev test
5 changes: 5 additions & 0 deletions contribs/gnodev/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
GNOROOT_DIR ?= $(abspath $(lastword $(MAKEFILE_LIST))/../../../)
GOBUILD_FLAGS ?= -ldflags "-X github.com/gnolang/gno/gnovm/pkg/gnoenv._GNOROOT=$(GNOROOT_DIR)"
GOTEST_FLAGS ?= $(GOBUILD_FLAGS) -v -p 1 -timeout=5m

rundep := go run -modfile ../../misc/devdeps/go.mod
golangci_lint := $(rundep) github.com/golangci/golangci-lint/cmd/golangci-lint
Expand All @@ -12,3 +13,7 @@ build:

lint:
$(golangci_lint) --config ../../.github/golangci.yml run ./...

test:
go test $(GOTEST_FLAGS) -v ./...

4 changes: 2 additions & 2 deletions contribs/gnodev/cmd/gnodev/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (c *devCfg) RegisterFlags(fs *flag.FlagSet) {

fs.BoolVar(
&c.verbose,
"verbose",
"v",
defaultDevOptions.verbose,
"enable verbose output for development",
)
Expand Down Expand Up @@ -251,7 +251,7 @@ func execDev(cfg *devCfg, args []string, io commands.IO) (err error) {
server := http.Server{
Handler: mux,
Addr: cfg.webListenerAddr,
ReadHeaderTimeout: time.Minute,
ReadHeaderTimeout: time.Second * 60,
}
defer server.Close()

Expand Down
1 change: 1 addition & 0 deletions contribs/gnodev/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ require (
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rs/cors v1.10.1 // indirect
github.com/rs/xid v1.5.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
Expand Down
2 changes: 2 additions & 0 deletions contribs/gnodev/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions contribs/gnodev/internal/mock/server_emitter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package emitter

import (
"sync"

"github.com/gnolang/gno/contribs/gnodev/pkg/emitter"
"github.com/gnolang/gno/contribs/gnodev/pkg/events"
)

// ServerEmitter is an `emitter.Emitter`
var _ emitter.Emitter = (*ServerEmitter)(nil)

type ServerEmitter struct {
events []events.Event
muEvents sync.Mutex
}

func (m *ServerEmitter) Emit(evt events.Event) {
m.muEvents.Lock()
defer m.muEvents.Unlock()

m.events = append(m.events, evt)
}

func (m *ServerEmitter) NextEvent() (evt events.Event) {
m.muEvents.Lock()
defer m.muEvents.Unlock()

if len(m.events) > 0 {
// pull next event from the list
evt, m.events = m.events[0], m.events[1:]
}

return evt
}
Loading

0 comments on commit e6a1dee

Please sign in to comment.