Skip to content

Commit 8539773

Browse files
committed
Merge remote-tracking branch 'remote/master' into feat/integrate-otel-jaeger
2 parents 8d2f1da + 829bbbc commit 8539773

File tree

927 files changed

+20774
-12239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

927 files changed

+20774
-12239
lines changed

.dockerignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
.dockerignore
2-
build/
32
Dockerfile
3+
docker-compose.yml
4+
build/
45
misc/*
56
!misc/loop/
67
!misc/autocounterd/
7-
docker-compose.yml
88
tests/docker-integration/
9+
docs/
10+
.github/
11+
*.md
912

1013
# Copied from .gitignore
1114

.github/dependabot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ updates:
77
schedule:
88
interval: "daily"
99
labels:
10-
- "github_actions"
10+
- "dependencies"
1111
groups:
1212
actions:
1313
patterns:

.github/labels.json

-72
This file was deleted.

.github/workflows/autocounterd.yml

-44
This file was deleted.

.github/workflows/bot.yml

+36-3
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,33 @@ jobs:
5858
- name: Checkout code
5959
uses: actions/checkout@v4
6060

61+
- name: Get last commit hash for directory
62+
id: get-hash
63+
run: echo "dir_hash=$(git log -1 --format="%H" -- contribs/github-bot/)" >> $GITHUB_OUTPUT
64+
65+
- name: Cache github-bot binary
66+
id: cache-bot-bin
67+
uses: actions/cache@v4
68+
with:
69+
path: /usr/local/bin/github-bot
70+
key: ${{ runner.os }}-github-bot-${{ steps.get-hash.outputs.dir_hash }}
71+
6172
- name: Install Go
73+
if: steps.cache-bot-bin.outputs.cache-hit != 'true'
6274
uses: actions/setup-go@v5
6375
with:
6476
go-version-file: contribs/github-bot/go.mod
6577

78+
- name: Build github-bot binary
79+
if: steps.cache-bot-bin.outputs.cache-hit != 'true'
80+
working-directory: contribs/github-bot
81+
run: go build -o /usr/local/bin/github-bot .
82+
6683
- name: Generate matrix from event
6784
id: pr-numbers
68-
working-directory: contribs/github-bot
6985
env:
7086
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71-
run: go run . matrix -matrix-key 'pr-numbers' -verbose
87+
run: github-bot matrix -matrix-key 'pr-numbers' -verbose
7288

7389
# This job is executed if an event with read-only permission has triggered this
7490
# workflow (e.g 'pull_request_review' on a pull request opened from a fork).
@@ -113,13 +129,30 @@ jobs:
113129
- name: Checkout code
114130
uses: actions/checkout@v4
115131

132+
- name: Get last commit hash for directory
133+
id: get-hash
134+
run: echo "dir_hash=$(git log -1 --format="%H" -- contribs/github-bot/)" >> $GITHUB_OUTPUT
135+
136+
- name: Cache github-bot binary
137+
id: cache-bot-bin
138+
uses: actions/cache@v4
139+
with:
140+
path: /usr/local/bin/github-bot
141+
key: ${{ runner.os }}-github-bot-${{ steps.get-hash.outputs.dir_hash }}
142+
116143
- name: Install Go
144+
if: steps.cache-bot-bin.outputs.cache-hit != 'true'
117145
uses: actions/setup-go@v5
118146
with:
119147
go-version-file: contribs/github-bot/go.mod
120148

149+
- name: Build github-bot binary
150+
if: steps.cache-bot-bin.outputs.cache-hit != 'true'
151+
working-directory: contribs/github-bot
152+
run: go build -o /usr/local/bin/github-bot .
153+
121154
- name: Run GitHub Bot
122155
working-directory: contribs/github-bot
123156
env:
124157
GITHUB_TOKEN: ${{ secrets.GH_BOT_PAT }}
125-
run: go run . check -pr-numbers '${{ matrix.pr-number }}' -verbose
158+
run: github-bot check -pr-numbers '${{ matrix.pr-number }}' -verbose

.github/workflows/genesis-verify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
- name: Get changed files
2424
id: changed-files
25-
uses: tj-actions/changed-files@v45
25+
uses: tj-actions/changed-files@v46
2626
with:
2727
files: "misc/deployments/${{ matrix.testnet }}/genesis.json"
2828

.github/workflows/testnets_build.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Build and Push Docker Images using Docker Bake
2+
name: Build and Push Images for Testntes
3+
4+
on:
5+
push:
6+
branches:
7+
- chain/test*
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
actions: write # useful for gha caching
13+
packages: write
14+
15+
jobs:
16+
bake:
17+
strategy:
18+
matrix:
19+
image: [gnoland,gnokey,gnoweb,gno,gnofaucet,gnodev,gnocontribs]
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Login to GitHub Container Registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.repository_owner }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Extract metadata
33+
uses: docker/metadata-action@v5
34+
id: meta
35+
with:
36+
images: ghcr.io/${{ github.repository }}/${{ matrix.image }}
37+
tags: |
38+
type=ref,event=branch
39+
type=ref,event=tag
40+
type=sha,prefix=sha-
41+
# Timestamp (optional, good for nightly builds)
42+
#type=raw,value={{date 'YYYYMMDD-HHmmss'}},prefix=ts- # e.g. "ts-20250410-153001"
43+
# Latest tag (only on main branch, optional)
44+
#type=raw,value=latest,enable={{ is_default_branch }}
45+
labels: |
46+
org.opencontainers.image.authors=Gno Core Team
47+
48+
# Using Github Context. Overriding context with an explicit `set` is required
49+
- name: Bake build and push
50+
uses: docker/bake-action@v6
51+
with:
52+
files: |
53+
misc/deployments/bake/docker-bake.hcl
54+
cwd://${{ steps.meta.outputs.bake-file-tags }}
55+
cwd://${{ steps.meta.outputs.bake-file-labels }}
56+
push: true
57+
targets: ${{ matrix.image }}
58+
set: |
59+
*.cache-from=type=gha
60+
*.cache-to=type=gha,mode=max
61+
*.context=.

CONTRIBUTING.md

+17-24
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ cexpr system('go run -modfile </path/to/gno>/misc/devdeps/go.mod mvdan.cc/gofump
109109
To integrate GNO linting in Vim, you can use Vim's `:make` command with a custom `makeprg` and `errorformat` to run the GNO linter and parse its output. Add the following configuration to your `.vimrc` file:
110110

111111
```vim
112-
autocmd FileType gno setlocal makeprg=gno\ lint\ %
112+
autocmd FileType gno setlocal makeprg=gno\ tool\ lint\ %
113113
autocmd FileType gno setlocal errorformat=%f:%l:\ %m
114114
115115
" Optional: Key binding to run :make on the current file
@@ -118,7 +118,7 @@ autocmd FileType gno nnoremap <buffer> <F5> :make<CR>
118118

119119
### ViM Support (with LSP)
120120

121-
There is an experimental and unofficial [Gno Language Server](https://github.com/jdkato/gnols)
121+
There is an experimental and unofficial [Gno Language Server](https://github.com/gnoverse/gnopls)
122122
developed by the community, with an installation guide for Neovim.
123123

124124
For ViM purists, you have to install the [`vim-lsp`](https://github.com/prabirshrestha/vim-lsp)
@@ -132,34 +132,29 @@ augroup gno_autocmd
132132
\ set syntax=go
133133
augroup END
134134
135-
if (executable('gnols'))
135+
if (executable('gnopls'))
136136
au User lsp_setup call lsp#register_server({
137-
\ 'name': 'gnols',
138-
\ 'cmd': ['gnols'],
137+
\ 'name': 'gnopls',
138+
\ 'cmd': ['gnopls'],
139139
\ 'allowlist': ['gno'],
140140
\ 'config': {},
141-
\ 'workspace_config': {
142-
\ 'root' : '/path/to/gno_repo',
143-
\ 'gno' : '/path/to/gno_bin',
144-
\ 'precompileOnSave' : v:true,
145-
\ 'buildOnSave' : v:false,
146-
\ },
147141
\ 'languageId': {server_info->'gno'},
148142
\ })
149143
else
150-
echomsg 'gnols binary not found: LSP disabled for Gno files'
144+
echomsg 'gnopls binary not found: LSP disabled for Gno files'
151145
endif
152146
153147
function! s:on_lsp_buffer_enabled() abort
154148
" Autocompletion
155149
setlocal omnifunc=lsp#complete
156150
" Format on save
157-
autocmd BufWritePre <buffer> LspDocumentFormatSync
158-
" Some optional mappings
151+
autocmd BufWritePre <buffer> LspDocumentFormat
152+
" Some other mappings
153+
nmap <buffer> gd <plug>(lsp-definition)
154+
nmap <buffer> <leader>rr <Plug>(lsp-rename)
155+
nmap <buffer> <leader>ri <Plug>(lsp-implementation)
156+
nmap <buffer> <leader>rf <Plug>(lsp-references)
159157
nmap <buffer> <leader>i <Plug>(lsp-hover)
160-
" Following mappings are not supported yet by gnols
161-
" nmap <buffer> gd <plug>(lsp-definition)
162-
" nmap <buffer> <leader>rr <plug>(lsp-rename)
163158
endfunction
164159
augroup lsp_install
165160
au!
@@ -171,12 +166,10 @@ Note that unlike the previous ViM setup without LSP, here it is required by
171166
`vim-lsp` to have a specific `filetype=gno`. Syntax highlighting is preserved
172167
thanks to `syntax=go`.
173168

174-
Inside `lsp#register_server()`, you also have to replace
175-
`workspace_config.root` and `workspace_config.gno` with the correct directories
176-
from your machine.
177-
178-
Additionally, it's not possible to use `gofumpt` for code formatting with
179-
`gnols` for now.
169+
Since `gnopls` invokes `gnoenv.GuessRootDir()` to determine the path of the gno
170+
root directory, the env var `GNOROOT=/path/to/gno` should be set so `gnopls`
171+
has access to the latest gno source files when commands like `lsp-definition`
172+
are requested.
180173

181174
#### Emacs Support
182175

@@ -198,7 +191,7 @@ Additionally, it's not possible to use `gofumpt` for code formatting with
198191
199192
(flycheck-define-checker gno-lint
200193
"A GNO syntax checker using the gno lint tool."
201-
:command ("gno" "tool" "lint" source-original)
194+
:command ("gno" "lint" source-original)
202195
:error-patterns (;; ./file.gno:32: error message (code=1)
203196
(error line-start (file-name) ":" line ": " (message) " (code=" (id (one-or-more digit)) ")." line-end))
204197
;; Ensure the file is saved, to work around

0 commit comments

Comments
 (0)