diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml deleted file mode 100644 index 06dfb4ab903..00000000000 --- a/.github/workflows/auto-author-assign.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: auto-author-assign - -on: - pull_request_target: - types: [ opened, reopened ] - -permissions: - pull-requests: write - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - assign-author: - runs-on: ubuntu-latest - steps: - - uses: toshimaru/auto-author-assign@v2.1.1 diff --git a/.github/workflows/autocounterd.yml b/.github/workflows/autocounterd.yml deleted file mode 100644 index 9217fe2eef2..00000000000 --- a/.github/workflows/autocounterd.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: autocounterd - -on: - pull_request: - branches: - - master - push: - paths: - - misc/autocounterd - - misc/loop - - .github/workflows/autocounterd.yml - branches: - - "master" - - "misc/autocounterd" - tags: - - "v*" - -permissions: - contents: read - packages: write - -jobs: - autocounterd: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Docker metadata autocounterd - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }}/autocounterd - tags: | - type=raw,value=latest - type=semver,pattern=v{{version}} - - - name: Build and push - uses: docker/build-push-action@v6 - with: - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/benchmark-master-push.yml b/.github/workflows/benchmark-master-push.yml deleted file mode 100644 index 622baefc0de..00000000000 --- a/.github/workflows/benchmark-master-push.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: run benchmarks when pushing on main branch - -on: - push: - branches: - - master - paths: - - contribs/** - - gno.land/** - - gnovm/** - - tm2/** - -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-file: go.mod - - - name: Run benchmark - # add more benchmarks by adding additional lines for different packages; - # or modify the -bench regexp. - run: | - set -xeuo pipefail && ( - go test ./gnovm/pkg/gnolang -bench='BenchmarkBenchdata' -benchmem -run='^$' -v -cpu=1,2 - ) | 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: false - 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 diff --git a/.github/workflows/bot-proxy.yml b/.github/workflows/bot-proxy.yml deleted file mode 100644 index 9bef0630d32..00000000000 --- a/.github/workflows/bot-proxy.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This workflow must be kept in sync to some extent with bot.yml -name: GitHub Bot Proxy - -on: - # Watch for any completed run on bot.yml workflow - workflow_run: - workflows: [GitHub Bot] - types: [completed] - -jobs: - # This workflow monitors any run completed on the GitHub Bot workflow and - # checks if the event that triggered it is limited to read-only permissions - # (e.g 'pull_request_review' on a pull request opened from a fork). - # In this case, it reruns the GitHub Bot workflow using a 'workflow_dispatch' - # event, thereby allowing it to run with write permissions. - # - # Complete flow: - # 'pull_request_review' from fork on bot.yml (read-only) -> 'workflow_run' on bot-proxy.yml (write) -> 'workflow_dispatch' on bot.yml (write) - rerun-with-write-perm: - name: Rerun Bot with write permission - # Skip this workflow if the original event is not 'pull_request_review' - if: github.event.workflow_run.event == 'pull_request_review' - runs-on: ubuntu-latest - permissions: - actions: write - - steps: - - name: Download artifact from previous run - uses: actions/download-artifact@v4 - with: - name: pr-number - run-id: ${{ github.event.workflow_run.id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - # Even if the artifact doesn't exist, do not mark the workflow as failed - # Useful if the 'pull_request_review' event was emitted by a PR opened - # from a branch on the main repo, so it has already been processed by - # the bot workflow, and no artifact has been uploaded. - continue-on-error: true - id: download - - - name: Send workflow_dispatch event to Github Bot - # Run only if an artifact was downloaded - if: steps.download.outcome == 'success' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: ${{ github.event.workflow_run.repository.full_name }} - run: | - gh workflow run bot.yml -R "$REPO" -f "pull-request-list=$(cat pr-number)" diff --git a/.github/workflows/bot.yml b/.github/workflows/bot.yml deleted file mode 100644 index add800fe2bf..00000000000 --- a/.github/workflows/bot.yml +++ /dev/null @@ -1,123 +0,0 @@ -# This workflow must be kept in sync to some extent with bot-proxy.yml -name: GitHub Bot - -on: - # Watch for changes on PR state, assignees, labels, head branch and draft/ready status - pull_request_target: - types: - - assigned - - unassigned - - labeled - - unlabeled - - opened - - reopened - - synchronize # PR head updated - - converted_to_draft - - ready_for_review - - # Watch for changes on PR reviews - pull_request_review: - types: [submitted, edited, dismissed] - - # Watch for changes on PR comment - issue_comment: - types: [created, edited, deleted] - - # Manual run from GitHub Actions interface - workflow_dispatch: - inputs: - pull-request-list: - description: "PR(s) to process: specify 'all' or a comma separated list of PR numbers, e.g. '42,1337,7890'" - required: true - default: all - type: string - -jobs: - # This job creates a matrix of PR numbers based on the inputs from the various - # events that can trigger this workflow so that the process-pr job below can - # handle the parallel processing of the pull-requests - define-prs-matrix: - name: Define PRs matrix - # Skip this workflow if: - # - the bot is retriggering itself - # - the event is emitted by codecov - # - the event is a review on a pull request from a fork (see save-pr-number job below) - if: | - github.actor != vars.GH_BOT_LOGIN && - github.actor != 'codecov[bot]' && - (github.event_name != 'pull_request_review' || github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name) - runs-on: ubuntu-latest - permissions: - pull-requests: read - outputs: - pr-numbers: ${{ steps.pr-numbers.outputs.pr-numbers }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version-file: contribs/github-bot/go.mod - - - name: Generate matrix from event - id: pr-numbers - working-directory: contribs/github-bot - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: go run . matrix -matrix-key 'pr-numbers' -verbose - - # This job is executed if an event with read-only permission has triggered this - # workflow (e.g 'pull_request_review' on a pull request opened from a fork). - # In this case, this job persists the PR number in an artifact so that the - # proxy workflow can use it to rerun the current workflow with write permission. - # See bot-proxy.yml for more info. - save-pr-number: - name: Persist PR number for proxy - # Run this job if the event is a review on a pull request opened from a fork - if: github.event_name == 'pull_request_review' && github.event.pull_request.base.repo.full_name != github.event.pull_request.head.repo.full_name - runs-on: ubuntu-latest - - steps: - - name: Write PR number to a file - env: - PR_NUMBER: ${{ github.event.pull_request.number }} - run: echo $PR_NUMBER > pr-number - - - name: Upload it as an artifact - uses: actions/upload-artifact@v4 - with: - name: pr-number - path: pr-number - - # This job processes each pull request in the matrix individually while ensuring - # that a same PR cannot be processed concurrently by mutliple runners - process-pr: - name: Process PR - needs: define-prs-matrix - # Just skip this job if PR numbers matrix is empty (prevent failed state) - if: needs.define-prs-matrix.outputs.pr-numbers != '[]' && needs.define-prs-matrix.outputs.pr-numbers != '' - runs-on: ubuntu-latest - strategy: - matrix: - # Run one job for each PR to process - pr-number: ${{ fromJSON(needs.define-prs-matrix.outputs.pr-numbers) }} - concurrency: - # Prevent running concurrent jobs for a given PR number - group: ${{ matrix.pr-number }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version-file: contribs/github-bot/go.mod - - - name: Run GitHub Bot - working-directory: contribs/github-bot - env: - GITHUB_TOKEN: ${{ secrets.GH_BOT_PAT }} - run: go run . check -pr-numbers '${{ matrix.pr-number }}' -verbose diff --git a/.github/workflows/build_template.yml b/.github/workflows/build_template.yml deleted file mode 100644 index a2c96f2d37e..00000000000 --- a/.github/workflows/build_template.yml +++ /dev/null @@ -1,31 +0,0 @@ -on: - workflow_call: - inputs: - modulepath: - required: true - type: string - go-version: - required: true - type: string - -jobs: - generated: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ inputs.go-version }} - - - name: Check generated files are up to date - working-directory: ${{ inputs.modulepath }} - 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 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index d2eef9d7445..00000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,89 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "master", "chain/*" ] - pull_request: - branches: [ "master", "chain/*" ] - schedule: - - cron: '22 17 * * 3' - -jobs: - analyze: - name: Analyze (${{ matrix.language }}) - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners (GitHub.com only) - # Consider using larger runners or machines with greater resources for possible analysis time improvements. - runs-on: ubuntu-latest - timeout-minutes: 360 - permissions: - # required for all workflows - security-events: write - - # only required for workflows in private repositories - actions: read - contents: read - - strategy: - fail-fast: false - matrix: - include: - - language: go - build-mode: autobuild - # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' - # Use `c-cpp` to analyze code written in C, C++ or both - # Use 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both - # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, - # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. - # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how - # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - # If the analyze step fails for one of the languages you are analyzing with - # "We were unable to automatically build your code", modify the matrix above - # to set the build mode to "manual" for that language. Then modify this step - # to build your code. - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - if: matrix.build-mode == 'manual' - run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/contribs.yml b/.github/workflows/contribs.yml deleted file mode 100644 index 3739339f7be..00000000000 --- a/.github/workflows/contribs.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: contribs - -on: - push: - branches: - - master - workflow_dispatch: - pull_request: - -jobs: - setup: - runs-on: ubuntu-latest - outputs: - programs: ${{ steps.set-matrix.outputs.programs }} - steps: - - uses: actions/checkout@v4 - - id: set-matrix - run: echo "::set-output name=programs::$(ls -d contribs/*/ | cut -d/ -f2 | jq -R -s -c 'split("\n")[:-1]')" - main: - needs: setup - strategy: - fail-fast: false - matrix: - program: ${{ fromJson(needs.setup.outputs.programs) }} - name: Run Main - uses: ./.github/workflows/main_template.yml - with: - modulepath: contribs/${{ matrix.program }} - secrets: - codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/dependabot-tidy.yml b/.github/workflows/dependabot-tidy.yml deleted file mode 100644 index 39fed8b0172..00000000000 --- a/.github/workflows/dependabot-tidy.yml +++ /dev/null @@ -1,41 +0,0 @@ -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]' }} - permissions: - contents: write - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - - name: Tidy all Go mods - env: - VERIFY_MOD_SUMS: false - run: | - # Ensure Make is installed - make --version - - # Run the tidy target - make tidy - - - name: Commit changes, if any - uses: stefanzweifel/git-auto-commit-action@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - skip_dirty_check: false # Enable dirty check, and skip unnecessary committing - commit_message: "Run 'go mod tidy' via GitHub Actions" diff --git a/.github/workflows/dependabot-validate.yml b/.github/workflows/dependabot-validate.yml deleted file mode 100644 index b1387dc0bb2..00000000000 --- a/.github/workflows/dependabot-validate.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: dependabot validate - -on: - pull_request: - paths: - - '.github/dependabot.yml' - - '.github/workflows/dependabot-validate.yml' -jobs: - validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: marocchino/validate-dependabot@v3 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml deleted file mode 100644 index d800147a498..00000000000 --- a/.github/workflows/deploy-docs.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: deploy docs on gnolang/docs.gno.land repository -on: - push: - branches: - - master - paths: - - "docs/**" - -jobs: - trigger-netlify-docs-deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.DOCS_DEPLOY_PAT }} - script: | - await github.rest.actions.createWorkflowDispatch({ - owner: 'gnolang', - repo: 'docs.gno.land', - workflow_id: 'netlify.yml', - ref: 'main' - }) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index c9d9af0fb6f..00000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "docs / lint" - -on: - push: - paths: - - master - pull_request: - paths: - - "docs/**" - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - - name: Install dependencies - run: go mod download - - - name: Build docs - run: make -C docs/ build - - - name: Check diff - run: git diff --exit-code || (echo "Some docs files are not formatted, please run 'make build'." && exit 1) - - - name: Run linter - run: make -C docs/ lint diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 41d579c4567..00000000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: examples - -on: - pull_request: - push: - branches: ["master"] - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - gno2go: - strategy: - fail-fast: false - matrix: - goversion: - - "1.22.x" - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.goversion }} - - run: go install -v ./gnovm/cmd/gno - - run: go run ./gnovm/cmd/gno transpile -v --gobuild ./examples - test: - strategy: - fail-fast: false - matrix: - goversion: - - "1.22.x" - # unittests: TODO: matrix with contracts - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.goversion }} - - name: Set environment variables for debug mode - if: env.ACTIONS_STEP_DEBUG == 'true' - run: | - export LOG_PATH_DIR=${{ runner.temp }}/logs - mkdir -p $LOG_PATH_DIR - echo "LOG_LEVEL=debug" >> $GITHUB_ENV - echo "LOG_PATH_DIR=$LOG_PATH_DIR" >> $GITHUB_ENV - - run: go install -v ./gnovm/cmd/gno - - run: go run ./gnovm/cmd/gno test -v -print-runtime-metrics -print-events ./examples/... - lint: - strategy: - fail-fast: false - matrix: - goversion: - - "1.22.x" - # unittests: TODO: matrix with contracts - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.goversion }} - # testing official directories, basically examples/ minus examples/.../x/. - - run: make lint -C ./examples - # TODO: consider running lint on every other directories, maybe in "warning" mode? - # TODO: track coverage - fmt: - strategy: - fail-fast: false - matrix: - goversion: ["1.22.x"] - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.goversion }} - - run: | - make fmt -C ./examples - # Check if there are changes after running make fmt - git diff --exit-code || (echo "Some gno files are not formatted, please run 'make fmt'." && exit 1) - mod-tidy: - strategy: - fail-fast: false - matrix: - go-version: ["1.22.x"] - # unittests: TODO: matrix with contracts - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - uses: actions/checkout@v4 - - run: | - GNO_CMD="$(pwd)/gnovm/cmd/gno" - # Find all directories containing gno.mod file - find ./examples -name "gno.mod" -execdir go run "$GNO_CMD" mod tidy \; - # Check if there are changes after running gno mod tidy - git diff --exit-code || (echo "Some gno.mod files are not tidy, please run 'make tidy'." && exit 1) diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml deleted file mode 100644 index 41d9a2cba94..00000000000 --- a/.github/workflows/fossa.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Dependency License Scanning - -on: - workflow_dispatch: - -permissions: - contents: read - -jobs: - fossa: - name: Fossa - runs-on: ubuntu-latest - if: github.repository == 'gnolang/gno' - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves - fetch-depth: 0 - - - name: Move .fossa.yml to root dir - run: mv .github/.fossa.yml . - - - name: Cache Coursier cache - uses: coursier/cache-action@v6.4.6 - - - name: Set up JDK 17 - uses: coursier/setup-action@v1.3.9 - with: - jvm: temurin:1.17 - - - name: Set up fossa CLI - run: "curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash" - - - name: FOSSA analyze - run: fossa analyze - env: - FOSSA_API_KEY: "${{secrets.FOSSA_API_KEY}}" - - - name: FOSSA test - run: fossa test - env: - FOSSA_API_KEY: "${{secrets.FOSSA_API_KEY}}" diff --git a/.github/workflows/genesis-verify.yml b/.github/workflows/genesis-verify.yml deleted file mode 100644 index 1288d588100..00000000000 --- a/.github/workflows/genesis-verify.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: genesis-verify - -on: - pull_request: - branches: - - master - paths: - - "misc/deployments/**/genesis.json" - - ".github/workflows/genesis-verify.yml" - -jobs: - verify: - strategy: - fail-fast: false - matrix: - testnet: ["test5.gno.land"] - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v45 - with: - files: "misc/deployments/${{ matrix.testnet }}/genesis.json" - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: contribs/gnogenesis/go.mod - - - name: Build gnogenesis - run: make -C contribs/gnogenesis - - - name: Verify each genesis file - run: | - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - echo "Verifying $file" - gnogenesis verify -genesis-path $file - done - - - name: Build gnoland - run: make -C gno.land install.gnoland - - - name: Running latest gnoland with each genesis file - run: | - for file in ${{ steps.changed-files.outputs.all_changed_files }}; do - echo "Running gnoland with $file" - timeout 60s gnoland start -lazy --genesis $file || exit_code=$? - if [ $exit_code -eq 124 ]; then - echo "Gnoland genesis state generated successfully" - else - echo "Gnoland failed to start with $file" - exit 1 - fi - done diff --git a/.github/workflows/gnofmt_template.yml b/.github/workflows/gnofmt_template.yml deleted file mode 100644 index 1ba66d0fbe3..00000000000 --- a/.github/workflows/gnofmt_template.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: - workflow_call: - inputs: - path: - required: true - type: string - go-version: - required: true - type: string - -jobs: - fmt: - runs-on: ubuntu-latest - steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ inputs.go-version }} - - name: Checkout code - uses: actions/checkout@v4 - - name: Fmt - env: - GNOFMT_PATH: ${{ inputs.path }} - run: go run ./gnovm/cmd/gno fmt -v -diff $GNOFMT_PATH diff --git a/.github/workflows/gnoland.yml b/.github/workflows/gnoland.yml deleted file mode 100644 index 59050f1baa4..00000000000 --- a/.github/workflows/gnoland.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: gno.land - -on: - push: - branches: - - master - workflow_dispatch: - pull_request: - -jobs: - main: - name: Run Main - uses: ./.github/workflows/main_template.yml - with: - modulepath: "gno.land" - tests-extra-args: "-coverpkg=github.com/gnolang/gno/gno.land/..." - secrets: - codecov-token: ${{ secrets.CODECOV_TOKEN }} - - gnoweb_generate: - strategy: - fail-fast: false - matrix: - go-version: ["1.22.x"] - # unittests: TODO: matrix with contracts - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - uses: actions/setup-node@v4 - with: - node-version: lts/Jod # (22.x) https://github.com/nodejs/Release - - uses: actions/checkout@v4 - - run: | - make -C gno.land/pkg/gnoweb fclean generate - # Check if there are changes after running generate.gnoweb - git diff --exit-code || \ - (echo "\`gnoweb generate\` out of date, please run \`make gnoweb.generate\` within './gno.land'" && exit 1) diff --git a/.github/workflows/gnovm.yml b/.github/workflows/gnovm.yml deleted file mode 100644 index 7e7586b23d9..00000000000 --- a/.github/workflows/gnovm.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: gnovm - -on: - push: - branches: - - master - workflow_dispatch: - pull_request: - -jobs: - main: - name: Run Main - uses: ./.github/workflows/main_template.yml - with: - modulepath: "gnovm" - secrets: - codecov-token: ${{ secrets.CODECOV_TOKEN }} - fmt: - name: Run Gno Fmt - uses: ./.github/workflows/gnofmt_template.yml - with: - path: "gnovm/stdlibs/..." - go-version: "1.22.x" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index 06b2daa1d3d..00000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: "Pull Request Labeler" -on: -- pull_request_target - -jobs: - triage: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/labeler@v5 diff --git a/.github/workflows/lint-pr-title.yml b/.github/workflows/lint-pr-title.yml deleted file mode 100644 index 631f764c37f..00000000000 --- a/.github/workflows/lint-pr-title.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: "lint-pr-title" - -on: - pull_request_target: - types: - - opened - - edited - - synchronize - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - pr-title: - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint_template.yml b/.github/workflows/lint_template.yml deleted file mode 100644 index b7568d19c41..00000000000 --- a/.github/workflows/lint_template.yml +++ /dev/null @@ -1,28 +0,0 @@ -on: - workflow_call: - inputs: - modulepath: - required: true - type: string - go-version: - required: true - type: string - - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ inputs.go-version }} - - name: Lint - uses: golangci/golangci-lint-action@v6 - with: - working-directory: ${{ inputs.modulepath }} - args: - --config=${{ github.workspace }}/.github/golangci.yml - version: v1.62 # sync with misc/devdeps diff --git a/.github/workflows/main_template.yml b/.github/workflows/main_template.yml deleted file mode 100644 index 5b3437b54a1..00000000000 --- a/.github/workflows/main_template.yml +++ /dev/null @@ -1,41 +0,0 @@ -on: - workflow_call: - inputs: - modulepath: - required: true - type: string - tests-extra-args: - required: false - type: string - secrets: - codecov-token: - required: true - -# TODO: environment variables cannot be sent to reusable workflows: https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations -# env: -# GO_VERSION: "1.22.x" - -jobs: - lint: - name: Go Linter - uses: ./.github/workflows/lint_template.yml - with: - modulepath: ${{ inputs.modulepath }} - go-version: "1.22.x" - build: - name: Go Build - uses: ./.github/workflows/build_template.yml - with: - modulepath: ${{ inputs.modulepath }} - go-version: "1.22.x" - test: - name: Go Test - uses: ./.github/workflows/test_template.yml - with: - modulepath: ${{ inputs.modulepath }} - tests-timeout: "30m" - go-version: "1.22.x" - tests-extra-args: ${{ inputs.tests-extra-args }} - secrets: - codecov-token: ${{ secrets.codecov-token }} - diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml deleted file mode 100644 index ad2c886e2ac..00000000000 --- a/.github/workflows/misc.yml +++ /dev/null @@ -1,29 +0,0 @@ -# tests the "misc" directory & tools -# (not meant for miscellaneous workflows) -name: misc - -on: - push: - branches: - - master - workflow_dispatch: - pull_request: - -jobs: - main: - strategy: - fail-fast: false - matrix: - # fixed list because we have some non go programs on that misc folder - program: - - autocounterd - - genproto - - genstd - - goscan - - loop - name: Run Main - uses: ./.github/workflows/main_template.yml - with: - modulepath: misc/${{ matrix.program }} - secrets: - codecov-token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/mod-tidy.yml b/.github/workflows/mod-tidy.yml deleted file mode 100644 index 24eab553d19..00000000000 --- a/.github/workflows/mod-tidy.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Ensure go.mods are tidied - -on: - push: - branches: - - master - workflow_dispatch: - pull_request: - -jobs: - main: - name: Ensure go.mods are tidied - runs-on: ubuntu-latest - steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ inputs.go-version }} - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Check go.mod files are up to date - working-directory: ${{ inputs.modulepath }} - run: | - make tidy VERIFY_MOD_SUMS=true diff --git a/.github/workflows/portal-loop.yml b/.github/workflows/portal-loop.yml deleted file mode 100644 index b898a149e9d..00000000000 --- a/.github/workflows/portal-loop.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: portal-loop - -on: - pull_request: - branches: - - master - push: - paths: - - "misc/loop/**" - - ".github/workflows/portal-loop.yml" - branches: - - "master" - # NOTE(albttx): branch name to simplify tests for this workflow - - "ci/portal-loop" - tags: - - "v*" - -permissions: - contents: read - packages: write - -jobs: - portal-loop: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Docker metadata portalloopd - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }}/portalloopd - tags: | - type=raw,value=latest - type=semver,pattern=v{{version}} - - - name: Build and push - uses: docker/build-push-action@v6 - with: - target: portalloopd - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - test-portal-loop-docker-compose: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: "Checkout" - uses: actions/checkout@v4 - - - name: "Setup The portal loop docker compose" - run: | - cd misc/loop - echo "Making docker compose happy" - touch .env - make docker.ci - - - name: "Test1 - Portal loop start gnoland" - run: | - while - block_height=$(curl -s localhost:26657/status | jq -r '.result.sync_info.latest_block_height') - echo "Current block height: $block_height" - [[ "$block_height" -lt 10 ]] - do - sleep 1 - done - - curl -s localhost:26657/status | jq - - - name: "Buid new gnolang/gno image" - run: | - docker build -t ghcr.io/gnolang/gno/gnoland:master -f Dockerfile --target gnoland . - - - name: "Wait for new docker image" - run: | - ip_addr=$(cat misc/loop/traefik/gno.yml | grep -o "http://.*:26657") - while - new_ip_addr=$(cat misc/loop/traefik/gno.yml | grep -o "http://.*:26657") - echo "${ip_addr} -> ${new_ip_addr}" - [[ "${ip_addr}" == ${new_ip_addr} ]] - do - sleep 5 - done - - - name: "Test2 - Wait portal-loop start new image" - run: | - while - block_height=$(curl -s localhost:26657/status | jq -r '.result.sync_info.latest_block_height') - echo "Current block height: $block_height" - [[ "$block_height" -lt 10 ]] - do - sleep 5 - done - docker ps -a - curl -s localhost:26657/status | jq diff --git a/.github/workflows/releaser-master.yml b/.github/workflows/releaser-master.yml deleted file mode 100644 index 3d194e2cb4c..00000000000 --- a/.github/workflows/releaser-master.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Trigger master build - -on: - push: - branches: - - "master" - workflow_dispatch: - -permissions: - contents: write # needed to write releases - id-token: write # needed for keyless signing - packages: write # needed for ghcr access - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Create a dummy tag to avoid goreleaser failure - run: git tag v0.0.0 master - - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true - - - uses: sigstore/cosign-installer@v3.7.0 - - uses: anchore/sbom-action/download-syft@v0.17.8 - - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - uses: goreleaser/goreleaser-action@v6 - with: - distribution: goreleaser-pro - version: ~> v2 - args: release --clean --nightly --config ./.github/goreleaser.yaml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - TAG_VERSION: master diff --git a/.github/workflows/releaser-nightly.yml b/.github/workflows/releaser-nightly.yml deleted file mode 100644 index 4308f1c4a7d..00000000000 --- a/.github/workflows/releaser-nightly.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Trigger nightly build - -on: - schedule: - - cron: "0 0 * * 2-6" - workflow_dispatch: - -permissions: - contents: write # needed to write releases - id-token: write # needed for keyless signing - packages: write # needed for ghcr access - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true - - - uses: sigstore/cosign-installer@v3.7.0 - - uses: anchore/sbom-action/download-syft@v0.17.8 - - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - uses: goreleaser/goreleaser-action@v6 - with: - distribution: goreleaser-pro - version: ~> v2 - args: release --clean --nightly --snapshot --config ./.github/goreleaser.yaml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - TAG_VERSION: nightly diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml deleted file mode 100644 index 309664bdcce..00000000000 --- a/.github/workflows/releaser.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Go Releaser - -on: - push: - tags: - - "v*" - -permissions: - contents: write # needed to write releases - id-token: write # needed for keyless signing - packages: write # needed for ghcr access - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: true - - - uses: sigstore/cosign-installer@v3.7.0 - - uses: anchore/sbom-action/download-syft@v0.17.8 - - - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - uses: goreleaser/goreleaser-action@v6 - with: - distribution: goreleaser-pro - version: ~> v2 - args: release --clean --config ./.github/goreleaser.yaml - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml deleted file mode 100644 index 55a17ac60a8..00000000000 --- a/.github/workflows/stale-bot.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: "Close stale PRs" -on: - schedule: - - cron: "30 1 * * *" -permissions: - pull-requests: write - issues: write - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - exempt-all-milestones: true - stale-pr-message: "This PR is stale because it has been open 3 months with no activity. Remove stale label or comment or this will be closed in 3 months." - close-pr-message: "This PR was closed because it has been stalled for 3 months with no activity." - days-before-pr-stale: 90 - days-before-pr-close: 90 - stale-issue-message: "This issue is stale because it has been open 6 months with no activity. Remove stale label or comment or this will be closed in 3 months." - close-issue-message: "This issue was closed because it has been stalled for 3 months with no activity." - days-before-issue-stale: 180 - days-before-issue-close: 90 diff --git a/.github/workflows/test_template.yml b/.github/workflows/test_template.yml deleted file mode 100644 index c7956b4caf4..00000000000 --- a/.github/workflows/test_template.yml +++ /dev/null @@ -1,84 +0,0 @@ -on: - workflow_call: - inputs: - modulepath: - required: true - type: string - tests-timeout: - required: true - type: string - go-version: - required: true - type: string - tests-extra-args: - required: false - type: string - secrets: - codecov-token: - required: true - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ inputs.go-version }} - - name: Go test - working-directory: ${{ inputs.modulepath }} - env: - TXTARCOVERDIR: /tmp/txtarcoverdir # txtar cover output - GOCOVERDIR: /tmp/gocoverdir # go cover output - COVERDIR: /tmp/coverdir # final output - run: | - set -x # print commands - - mkdir -p "$GOCOVERDIR" "$TXTARCOVERDIR" "$COVERDIR" - - # Craft a filter flag based on the module path to avoid expanding coverage on unrelated tags. - export filter="-pkg=github.com/gnolang/gno/${{ inputs.modulepath }}/..." - - # codecov only supports "boolean" coverage (whether a line is - # covered or not); so using -covermode=count or atomic would be - # pointless here. - # XXX: Simplify coverage of txtar - the current setup is a bit - # confusing and meticulous. There will be some improvements in Go - # 1.23 regarding coverage, so we can use this as a workaround until - # then. - go test -covermode=set -timeout ${{ inputs.tests-timeout }} ${{ inputs.tests-extra-args }} ./... -test.gocoverdir=$GOCOVERDIR - - # Print results - (set +x; echo 'go coverage results:') - go tool covdata percent $filter -i=$GOCOVERDIR - (set +x; echo 'txtar coverage results:') - go tool covdata percent $filter -i=$TXTARCOVERDIR - - # Generate final coverage output - go tool covdata textfmt -v 1 $filter -i=$GOCOVERDIR,$TXTARCOVERDIR -o gocoverage.out - - - name: Upload go coverage to Codecov - uses: codecov/codecov-action@v5 - with: - disable_search: true - fail_ci_if_error: true - files: ${{ inputs.modulepath }}/gocoverage.out - flags: ${{ inputs.modulepath }} - token: ${{ secrets.codecov-token }} - verbose: true # keep this enable as it help debugging when coverage fail randomly on the CI - - # TODO: We have to fix race conditions before running this job - # test-with-race: - # runs-on: ubuntu-latest - # steps: - # - name: Install Go - # uses: actions/setup-go@v5 - # with: - # go-version: ${{ inputs.go-version }} - # - name: Checkout code - # uses: actions/checkout@v4 - # - name: Go race test - # run: go test -race -timeout ${{ inputs.tests-timeout }} ./... - # working-directory: ${{ inputs.modulepath }} diff --git a/.github/workflows/tm2.yml b/.github/workflows/tm2.yml deleted file mode 100644 index 57e84793c94..00000000000 --- a/.github/workflows/tm2.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: tm2 - -on: - push: - branches: - - master - workflow_dispatch: - pull_request: - -jobs: - main: - name: Run Main - uses: ./.github/workflows/main_template.yml - with: - modulepath: "tm2" - secrets: - codecov-token: ${{ secrets.CODECOV_TOKEN }}