Skip to content

Commit

Permalink
Merge branch 'master' into devx/feature/boardsv2
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgooz authored Oct 4, 2024
2 parents 71c93a7 + 8a62a28 commit baf9821
Show file tree
Hide file tree
Showing 19 changed files with 4,282 additions and 118 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
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 @@ -36,6 +37,7 @@
/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/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
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.

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
24 changes: 24 additions & 0 deletions examples/gno.land/r/demo/tests/z2_filetest.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package main

import (
"std"

"gno.land/p/demo/testutils"
"gno.land/r/demo/tests"
)

// When a single realm in the frames, PrevRealm returns the user
// When 2 or more realms in the frames, PrevRealm returns the second to last
func main() {
var (
eoa = testutils.TestAddress("someone")
rTestsAddr = std.DerivePkgAddr("gno.land/r/demo/tests")
)
std.TestSetOrigCaller(eoa)
println("tests.GetPrevRealm().Addr(): ", tests.GetPrevRealm().Addr())
println("tests.GetRSubtestsPrevRealm().Addr(): ", tests.GetRSubtestsPrevRealm().Addr())
}

// Output:
// tests.GetPrevRealm().Addr(): g1wdhk6et0dej47h6lta047h6lta047h6lrnerlk
// tests.GetRSubtestsPrevRealm().Addr(): g1gz4ycmx0s6ln2wdrsh4e00l9fsel2wskqa3snq
28 changes: 28 additions & 0 deletions examples/gno.land/r/demo/tests/z3_filetest.gno
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// PKGPATH: gno.land/r/demo/test_test
package test_test

import (
"std"

"gno.land/p/demo/testutils"
"gno.land/r/demo/tests"
)

func main() {
var (
eoa = testutils.TestAddress("someone")
rTestsAddr = std.DerivePkgAddr("gno.land/r/demo/tests")
)
std.TestSetOrigCaller(eoa)
// Contrarily to z2_filetest.gno we EXPECT GetPrevRealms != eoa (#1704)
if addr := tests.GetPrevRealm().Addr(); addr != eoa {
println("want tests.GetPrevRealm().Addr ==", eoa, "got", addr)
}
// When 2 or more realms in the frames, it is also different
if addr := tests.GetRSubtestsPrevRealm().Addr(); addr != rTestsAddr {
println("want GetRSubtestsPrevRealm().Addr ==", rTestsAddr, "got", addr)
}
}

// Output:
// want tests.GetPrevRealm().Addr == g1wdhk6et0dej47h6lta047h6lta047h6lrnerlk got g1xufrdvnfk6zc9r0nqa23ld3tt2r5gkyvw76q63
Loading

0 comments on commit baf9821

Please sign in to comment.