Skip to content

Commit

Permalink
Merge branch 'master' into dev/moul/pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
moul authored Oct 3, 2024
2 parents 1da8805 + 8a62a28 commit 943df0c
Show file tree
Hide file tree
Showing 79 changed files with 5,206 additions and 274 deletions.
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
/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/boardsv2/ @ilgooz @jeronimoalbi @moul
/examples/gno.land/p/demo/cford32/ @thehowl
/examples/gno.land/p/demo/memeland/ @leohhhn
/examples/gno.land/p/demo/seqid/ @thehowl
Expand All @@ -34,16 +35,16 @@
/examples/gno.land/p/demo/svg/ @moul
/examples/gno.land/p/demo/tamagotchi/ @moul
/examples/gno.land/p/demo/ui/ @moul
/examples/gno.land/p/moul/ @moul
/examples/gno.land/r/demo/ @gnolang/tech-staff @gnolang/devrels
/examples/gno.land/r/demo/art/ @moul
/examples/gno.land/r/demo/boardsv2/ @ilgooz @jeronimoalbi @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/moul/ @moul
/examples/gno.land/r/manfred/ @moul

# Gno.land.
/gno.land/ @moul @zivkovicmilos
Expand Down
97 changes: 97 additions & 0 deletions .github/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,21 @@ builds:
goarm:
- 6
- 7
- id: gnobro
dir: ./contribs/gnodev/cmd/gnobro
binary: gnobro
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- arm
goarm:
- 6
- 7

gomod:
proxy: true
Expand Down Expand Up @@ -489,6 +504,74 @@ dockers:
ids:
- gnofaucet

# gnobro
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: amd64
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-amd64"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-amd64"
build_flag_templates:
- "--target=gnobro"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: arm64
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-arm64v8"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-arm64v8"
build_flag_templates:
- "--target=gnobro"
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: arm
goarm: 6
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-armv6"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-armv6"
build_flag_templates:
- "--target=gnobro"
- "--platform=linux/arm/v6"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- use: buildx
dockerfile: Dockerfile.release
goos: linux
goarch: arm
goarm: 7
image_templates:
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-armv7"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-armv7"
build_flag_templates:
- "--target=gnobro"
- "--platform=linux/arm/v7"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro

docker_manifests:
# https://goreleaser.com/customization/docker_manifest/

Expand Down Expand Up @@ -562,6 +645,20 @@ docker_manifests:
- ghcr.io/gnolang/{{ .ProjectName }}/gnofaucet:{{ .Env.TAG_VERSION }}-armv6
- ghcr.io/gnolang/{{ .ProjectName }}/gnofaucet:{{ .Env.TAG_VERSION }}-armv7

# gnobro
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}
image_templates:
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-arm64v8
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-armv6
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Version }}-armv7
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}
image_templates:
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-arm64v8
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-armv6
- ghcr.io/gnolang/{{ .ProjectName }}/gnobro:{{ .Env.TAG_VERSION }}-armv7

docker_signs:
- cmd: cosign
env:
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/benchmark-check.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/benchmark-master-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: run benchmarks when pushing on main branch

on:
push:
branches:
- master

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write

env:
CGO_ENABLED: 0

jobs:
benchmarks:
if: ${{ github.repository == 'gnolang/gno' }}
runs-on: [self-hosted, Linux, X64, benchmarks]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-go@v5
with:
go-version: "1.22.x"

- name: Run benchmark
run: |
go test -benchmem -bench=. ./... -run=^$ \
-cpu 1,2 -timeout 50m | tee benchmarks.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark

- name: Store benchmark results into `gh-benchmarks` branch
uses: benchmark-action/github-action-benchmark@v1
# see https://github.com/benchmark-action/github-action-benchmark?tab=readme-ov-file#action-inputs
with:
name: Go Benchmarks
tool: "go"
output-file-path: benchmarks.txt
max-items-in-chart: 100
# Show alert with commit comment on detecting possible performance regression
alert-threshold: "120%"
fail-on-alert: true
comment-on-alert: true
alert-comment-cc-users: "@ajnavarro,@thehowl,@zivkovicmilos"
# Enable Job Summary for PRs
summary-always: true
github-token: ${{ secrets.GITHUB_TOKEN }}
# NOTE you need to use a separate GITHUB PAT token that has a write access to the specified repository.
# gh-repository: 'github.com/gnolang/benchmarks' # on gh-pages branch
gh-pages-branch: gh-benchmarks
benchmark-data-dir-path: .
auto-push: true
15 changes: 0 additions & 15 deletions .github/workflows/benchmark-publish.yml

This file was deleted.

72 changes: 0 additions & 72 deletions .github/workflows/benchmark_template.yml

This file was deleted.

10 changes: 8 additions & 2 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ EXPOSE 26656 26657

ENTRYPOINT [ "/usr/bin/gnoland" ]


#
## ghcr.io/gnolang/gno/gnokey
FROM base as gnokey

COPY ./gnokey /usr/bin/gnokey
ENTRYPOINT [ "/usr/bin/gnokey" ]


#
## ghcr.io/gnolang/gno/gnoweb
FROM base as gnoweb
Expand All @@ -43,6 +41,14 @@ COPY ./gnofaucet /usr/bin/gnofaucet
EXPOSE 5050
ENTRYPOINT [ "/usr/bin/gnofaucet" ]

#
## ghcr.io/gnolang/gno/gnobro
FROM base as gnobro

COPY ./gnobro /usr/bin/gnobro
EXPOSE 22
ENTRYPOINT [ "/usr/bin/gnobro" ]

#
## ghcr.io/gnolang/gno
FROM base as gno
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/go-gno-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Legend:
| hash/crc64 | `todo` |
| hash/fnv | `todo` |
| hash/maphash | `todo` |
| html | `todo` |
| html | `full` |
| html/template | `todo` |
| image | `tbd` |
| image/color | `tbd` |
Expand Down
8 changes: 3 additions & 5 deletions examples/gno.land/p/demo/grc/grc20/banker.gno
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (b *Banker) Mint(address std.Address, amount uint64) error {
b.balances.Set(string(address), newBalance)

std.Emit(
TransferEvent,
MintEvent,
"from", "",
"to", string(address),
"value", strconv.Itoa(int(amount)),
Expand All @@ -90,7 +90,7 @@ func (b *Banker) Burn(address std.Address, amount uint64) error {
b.balances.Set(string(address), newBalance)

std.Emit(
TransferEvent,
BurnEvent,
"from", string(address),
"to", "",
"value", strconv.Itoa(int(amount)),
Expand Down Expand Up @@ -146,9 +146,6 @@ func (b *Banker) Transfer(from, to std.Address, amount uint64) error {
toBalance := b.BalanceOf(to)
fromBalance := b.BalanceOf(from)

// debug.
// println("from", from, "to", to, "amount", amount, "fromBalance", fromBalance, "toBalance", toBalance)

if fromBalance < amount {
return ErrInsufficientBalance
}
Expand All @@ -165,6 +162,7 @@ func (b *Banker) Transfer(from, to std.Address, amount uint64) error {
"to", to.String(),
"value", strconv.Itoa(int(amount)),
)

return nil
}

Expand Down
2 changes: 2 additions & 0 deletions examples/gno.land/p/demo/grc/grc20/types.gno
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ type Token interface {
}

const (
MintEvent = "Mint"
BurnEvent = "Burn"
TransferEvent = "Transfer"
ApprovalEvent = "Approval"
)
Loading

0 comments on commit 943df0c

Please sign in to comment.