Skip to content

Commit

Permalink
Merge branch 'master' into fix-1099
Browse files Browse the repository at this point in the history
  • Loading branch information
notJoon authored Jan 9, 2025
2 parents 5ce9433 + 750c07a commit 5f27f51
Show file tree
Hide file tree
Showing 1,006 changed files with 51,448 additions and 16,354 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
go.sum linguist-generated text
gnovm/stdlibs/generated.go linguist-generated
gnovm/tests/stdlibs/generated.go linguist-generated
*.gen.gno linguist-generated
*.gen_test.gno linguist-generated
*.gen.go linguist-generated
*.gen_test.go linguist-generated
8 changes: 8 additions & 0 deletions .github/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Make sure this is the top-level editorconfig
# https://editorconfig.org/
root = true

# GitHub Actions Workflows
[workflows/**.yml]
indent_style = space
indent_size = 2
8 changes: 4 additions & 4 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ codecov:
wait_for_ci: true

comment:
require_changes: false
require_changes: true

coverage:
round: down
Expand All @@ -13,7 +13,7 @@ coverage:
project:
default:
target: auto
threshold: 10 # Let's decrease this later.
threshold: 5 # Let's decrease this later.
base: parent
if_no_uploads: error
if_not_found: success
Expand All @@ -22,12 +22,12 @@ coverage:
patch:
default:
target: auto
threshold: 10 # Let's decrease this later.
threshold: 5 # Let's decrease this later.
base: auto
if_no_uploads: error
if_not_found: success
if_ci_failed: error
only_pulls: false
only_pulls: true # Only check patch coverage on PRs

flag_management:
default_rules:
Expand Down
7 changes: 7 additions & 0 deletions .github/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,29 @@ linters:
linters-settings:
gofmt:
simplify: true

goconst:
min-len: 3
min-occurrences: 3

gosec:
excludes:
- G204 # Subprocess launched with a potential tainted input or cmd arguments
- G306 # Expect WriteFile permissions to be 0600 or less
- G115 # Integer overflow conversion, no solution to check the overflow in time of convert, so linter shouldn't check the overflow.
stylecheck:
checks: [ "all", "-ST1022", "-ST1003" ]
errorlint:
asserts: false

gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style

forbidigo:
forbid:
- p: '^regexp\.(Match|MatchString)$'
Expand All @@ -73,12 +78,14 @@ issues:
max-same-issues: 0
new: false
fix: false

exclude-rules:
- path: _test\.go
linters:
- gosec # Disabled linting of weak number generators
- makezero # Disabled linting of intentional slice appends
- goconst # Disabled linting of common mnemonics and test case strings
- unused # Disabled linting of unused mock methods
- path: _\.gno
linters:
- errorlint # Disabled linting of error comparisons, because of lacking std lib support
103 changes: 73 additions & 30 deletions .github/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
project_name: gno
version: 2

Expand Down Expand Up @@ -86,6 +87,8 @@ builds:
goarm:
- "6"
- "7"
# Gno Contribs
# NOTE: Contribs binary will be added in a single docker image below: gnocontribs
- id: gnobro
dir: ./contribs/gnodev/cmd/gnobro
binary: gnobro
Expand All @@ -101,6 +104,21 @@ builds:
goarm:
- "6"
- "7"
- id: gnogenesis
dir: ./contribs/gnogenesis
binary: gnogenesis
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
- arm
goarm:
- "6"
- "7"

gomod:
proxy: true
Expand Down Expand Up @@ -300,6 +318,7 @@ dockers:
- gno.land/genesis/genesis_txs.jsonl
- examples
- gnovm/stdlibs

# gnokey
- use: buildx
dockerfile: Dockerfile.release
Expand Down Expand Up @@ -504,73 +523,97 @@ dockers:
ids:
- gnofaucet

# gnobro
# gnocontribs
- 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"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}-amd64"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}-amd64"
build_flag_templates:
- "--target=gnobro"
- "--target=gnocontribs"
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnocontribs"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- gnogenesis
extra_files:
- gno.land/genesis/genesis_balances.txt
- gno.land/genesis/genesis_txs.jsonl
- examples
- gnovm/stdlibs
- 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"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}-arm64v8"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}-arm64v8"
build_flag_templates:
- "--target=gnobro"
- "--target=gnocontribs"
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnocontribs"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- gnogenesis
extra_files:
- gno.land/genesis/genesis_balances.txt
- gno.land/genesis/genesis_txs.jsonl
- examples
- gnovm/stdlibs
- 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"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}-armv6"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}-armv6"
build_flag_templates:
- "--target=gnobro"
- "--target=gnocontribs"
- "--platform=linux/arm/v6"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnocontribs"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- gnogenesis
extra_files:
- gno.land/genesis/genesis_balances.txt
- gno.land/genesis/genesis_txs.jsonl
- examples
- gnovm/stdlibs
- 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"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}-armv7"
- "ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}-armv7"
build_flag_templates:
- "--target=gnobro"
- "--target=gnocontribs"
- "--platform=linux/arm/v7"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnobro"
- "--label=org.opencontainers.image.title={{.ProjectName}}/gnocontribs"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
ids:
- gnobro
- gnogenesis
extra_files:
- gno.land/genesis/genesis_balances.txt
- gno.land/genesis/genesis_txs.jsonl
- examples
- gnovm/stdlibs

docker_manifests:
# https://goreleaser.com/customization/docker_manifest/
Expand Down Expand Up @@ -645,19 +688,19 @@ 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
# gnocontribs
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}
image_templates:
- ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}-arm64v8
- ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}-armv6
- ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Version }}-armv7
- name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}
image_templates:
- ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}-amd64
- ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}-arm64v8
- ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}-armv6
- ghcr.io/gnolang/{{ .ProjectName }}/gnocontribs:{{ .Env.TAG_VERSION }}-armv7

docker_signs:
- cmd: cosign
Expand Down
11 changes: 0 additions & 11 deletions .github/pull_request_template.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: auto-author-assign
name: Auto Assign PR Author

on:
pull_request_target:
Expand Down
12 changes: 3 additions & 9 deletions .github/workflows/autocounterd.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
name: autocounterd
name: Portal Loop - autocounterd

on:
pull_request:
branches:
- master
push:
branches:
- "master"
paths:
- misc/autocounterd
- misc/loop
- .github/workflows/autocounterd.yml
branches:
- "master"
- "misc/autocounterd"
tags:
- "v*"

permissions:
contents: read
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/benchmark-master-push.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: run benchmarks when pushing on main branch
name: Run and Save Benchmarks

on:
push:
branches:
- master
paths:
- contribs/**
- gno.land/**
- gnovm/**
- tm2/**
- contribs/**/*.go
- gno.land/**/*.go
- gnovm/**/*.go
- tm2/**/*.go

permissions:
# deployments permission to deploy GitHub pages website
Expand All @@ -22,7 +22,7 @@ env:
jobs:
benchmarks:
if: ${{ github.repository == 'gnolang/gno' }}
runs-on: [self-hosted, Linux, X64, benchmarks]
runs-on: [ self-hosted, Linux, X64, benchmarks ]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -31,7 +31,7 @@ jobs:

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

- name: Run benchmark
# add more benchmarks by adding additional lines for different packages;
Expand Down
Loading

0 comments on commit 5f27f51

Please sign in to comment.