-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat/extract-tm2-depencies
- Loading branch information
Showing
145 changed files
with
4,913 additions
and
1,351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
*.gno linguist-language=Go | ||
*.pb.go linguist-generated merge=ours -diff | ||
go.sum linguist-generated text | ||
gnovm/stdlibs/native.go linguist-generated | ||
gnovm/tests/stdlibs/native.go linguist-generated |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,6 @@ flag_management: | |
- name: gno.land | ||
paths: | ||
- gno.land | ||
- name: misc | ||
paths: | ||
- misc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: code generation | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
paths: | ||
- 'gnovm/stdlibs/**' | ||
- 'gnovm/tests/stdlibs/**' | ||
- 'misc/genstd' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
generated: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check generated files are up to date | ||
run: | | ||
go generate -x ./... | ||
if [ "$(git status -s)" != "" ]; then | ||
echo "command 'go generate' creates file that differ from git tree, please run 'go generate' and commit:" | ||
git status -s | ||
exit 1 | ||
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Dependabot Tidy Go Mods | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/**' | ||
- '**/go.mod' | ||
- '**/go.sum' | ||
|
||
jobs: | ||
tidy_go_mods: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Tidy all Go mods | ||
run: | | ||
set -e | ||
# Find all go.mod files | ||
gomods=$(find . -type f -name go.mod) | ||
# Tidy each go.mod file | ||
for modfile in $gomods; do | ||
dir=$(dirname "$modfile") | ||
# Run go mod tidy in the directory | ||
(cd "$dir" && go mod tidy -v) || exit 1 | ||
done | ||
- name: Commit changes, if any | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
skip_dirty_check: false # Enable dirty check, and skip unnecessary committing | ||
commit_message: "Run 'go mod tidy' via GitHub Actions" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# sync with misc/devdeps/go.mod | ||
version: v1.54 | ||
args: | ||
--config=./.github/golangci.yml | ||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Install make | ||
run: sudo apt-get install -y make | ||
|
||
# prefill dependencies so that mod messages don't show up in make output | ||
- name: Fetch dependencies | ||
run: go mod download -modfile ./misc/devdeps/go.mod -x | ||
|
||
# inspired by: | ||
# https://github.com/Jerome1337/gofmt-action/blob/d5eabd189843f1d568286a54578159978b7c0fb1/entrypoint.sh | ||
- name: Check gofumpt | ||
run: | | ||
output="$(GOFMT_FLAGS=-l make -s fmt)" | ||
if [ ! -z "$output" ]; then | ||
echo "The following files are not properly formatted; run 'make fmt' to format them." | ||
echo "$output" | ||
exit 1 | ||
else | ||
echo 'Succeeded.' | ||
fi | ||
mod_tidy_check: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Check go.mods | ||
run: | | ||
set -xe | ||
# Find all go.mod files | ||
gomods=$(find . -type f -name go.mod) | ||
# Calculate sums for all go.mod files | ||
sums=$(sha256sum $gomods) | ||
# Iterate over each go.mod file | ||
for modfile in $gomods; do | ||
dir=$(dirname "$modfile") | ||
# Run go mod tidy in the directory | ||
(cd "$dir" && go mod tidy -v) || exit 1 | ||
done | ||
# Verify the sums | ||
echo "$sums" | sha256sum -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,80 @@ | ||
# tests the "misc" directory & tools | ||
# (not meant for miscellaneous workflows) | ||
name: misc | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "misc/genstd/**.go" | ||
- "misc/Makefile" | ||
- ".github/workflows/misc.yml" | ||
# Until the codecov issue is resolved, it's essential to run the tests for gnovm, tm2, misc, and gno.land concurrently. | ||
- "gnovm/**" | ||
- "tm2/**" | ||
- "gno.land/**" | ||
- "examples/**" | ||
- ".github/workflows/**" | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
goversion: | ||
- "1.21.x" | ||
program: | ||
- "genstd" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# sync with misc/devdeps/go.mod | ||
version: v1.54 | ||
args: | ||
--config=./.github/golangci.yml | ||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
go-version: ${{ matrix.goversion }} | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
|
||
- name: Install make | ||
run: sudo apt-get install -y make | ||
- name: go install | ||
working-directory: misc | ||
run: go install ./${{ matrix.program }} | ||
|
||
# prefill dependencies so that mod messages don't show up in make output | ||
- name: Fetch dependencies | ||
run: go mod download -modfile ./misc/devdeps/go.mod -x | ||
|
||
# inspired by: | ||
# https://github.com/Jerome1337/gofmt-action/blob/d5eabd189843f1d568286a54578159978b7c0fb1/entrypoint.sh | ||
- name: Check gofumpt | ||
run: | | ||
output="$(GOFMT_FLAGS=-l make -s fmt)" | ||
if [ ! -z "$output" ]; then | ||
echo "The following files are not properly formatted; run 'make fmt' to format them." | ||
echo "$output" | ||
exit 1 | ||
else | ||
echo 'Succeeded.' | ||
fi | ||
modtidy: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
goversion: | ||
- "1.21.x" | ||
args: | ||
- _test.genstd | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21.x | ||
go-version: ${{ matrix.goversion }} | ||
|
||
- name: Check go.mods | ||
- name: Test | ||
working-directory: misc | ||
run: | | ||
set -xe | ||
# Find all go.mod files | ||
gomods=$(find . -type f -name go.mod) | ||
# Calculate sums for all go.mod files | ||
sums=$(sha256sum $gomods) | ||
# Iterate over each go.mod file | ||
for modfile in $gomods; do | ||
dir=$(dirname "$modfile") | ||
# Run go mod tidy in the directory | ||
(cd "$dir" && go mod tidy -v) || exit 1 | ||
done | ||
# Verify the sums | ||
echo "$sums" | sha256sum -c | ||
export GOPATH=$HOME/go | ||
export GOTEST_FLAGS="-v -p 1 -timeout=30m -coverprofile=coverage.out -covermode=atomic" | ||
make ${{ matrix.args }} | ||
- if: runner.os == 'Linux' | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
name: misc | ||
flags: misc,misc-${{matrix.args}},go-${{ matrix.goversion }} | ||
files: ./misc/coverage.out | ||
fail_ci_if_error: ${{ github.repository == 'gnolang/gno' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.