chore(deps): bump github/codeql-action from 3 to 4.37.3 #64
Workflow file for this run
This file contains hidden or 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
| name: CI checks | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| jobs: | |
| setup-dependencies: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Restore Go modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /go/pkg/mod | |
| key: go-mod-${{ hashFiles('**/go.sum') }} | |
| - name: Cache go modules | |
| run: make go-mod-cache | |
| - name: Build | |
| run: make build | |
| - name: Git garbage collection | |
| run: git gc | |
| - name: Save source code cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: .git | |
| key: go-src-${{ github.sha }} | |
| tidy-go: | |
| runs-on: ubuntu-latest | |
| needs: setup-dependencies | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Check go mod tidy | |
| run: | | |
| go mod tidy | |
| git diff --exit-code | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: setup-dependencies | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.1.6 | |
| args: --tests=false --timeout=5m0s | |
| test-cover: | |
| runs-on: ubuntu-latest | |
| needs: setup-dependencies | |
| strategy: | |
| matrix: | |
| shard: [1, 2, 3, 4] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Restore Go modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /go/pkg/mod | |
| key: go-mod-${{ hashFiles('**/go.sum') }} | |
| - name: Run tests with coverage | |
| # -ldflags=-checklinkname=0: disables the Go 1.24+ linker enforcement of | |
| # go:linkname references to private runtime symbols. Required because the | |
| # transitive dependency github.com/bytedance/sonic/loader (pulled in via | |
| # cosmos-sdk v0.53.6) uses go:linkname to reference runtime.lastmoduledatap, | |
| # which is rejected by the Go 1.24 linker. Remove once sonic stops using | |
| # this linkname or cosmos-sdk is bumped to a version that no longer depends on it. | |
| run: | | |
| set -euo pipefail | |
| mkdir -p profiles logs | |
| export GORACE=halt_on_error=1 | |
| export GO111MODULE=on | |
| FAILED=0 | |
| SHARD_INDEX=$(( ${{ matrix.shard }} - 1 )) | |
| for pkg in $(go list ./... | grep -v '/simulation' | awk "NR % 4 == $SHARD_INDEX"); do | |
| id=$(echo "$pkg" | sed 's|[/.]|_|g') | |
| if ! go test -mod=readonly -timeout 8m -race -coverprofile=profiles/$id.out -covermode=atomic -ldflags=-checklinkname=0 -tags='ledger test_ledger_mock' "$pkg" 2>&1 | tee logs/$id.log; then | |
| FAILED=1 | |
| fi | |
| done | |
| if [ "$FAILED" -ne 0 ]; then | |
| echo "::error::One or more test packages failed" | |
| exit 1 | |
| fi | |
| - name: Upload coverage and logs | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: coverage-${{ matrix.shard }} | |
| path: | | |
| profiles/ | |
| logs/ | |
| upload-coverage: | |
| runs-on: ubuntu-latest | |
| needs: test-cover | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download coverage artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| path: artifacts | |
| - name: Concatenate coverage files | |
| run: | | |
| echo "mode: atomic" > coverage.txt | |
| find artifacts -name '*.out' | xargs -I{} tail -n +2 {} >> coverage.txt | |
| - name: Upload to Codecov | |
| run: bash <(curl -s https://codecov.io/bash) -f coverage.txt | |
| test-system: | |
| runs-on: ubuntu-latest | |
| needs: test-cover | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Restore Go modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /go/pkg/mod | |
| key: go-mod-${{ hashFiles('**/go.sum') }} | |
| - name: Add GOBIN to PATH | |
| run: echo "$HOME/go/bin" >> $GITHUB_PATH | |
| - name: Run system tests | |
| run: make test-system | |
| - name: Save artifacts on failure | |
| if: failure() | |
| run: | | |
| mkdir -p /tmp/test-system-artifacts | |
| mv tests/system/testnet /tmp/test-system-artifacts || true | |
| - name: Upload test system artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: test-system-artifacts | |
| path: /tmp/test-system-artifacts | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| needs: test-cover | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Restore Go modules cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: /go/pkg/mod | |
| key: go-mod-${{ hashFiles('**/go.sum') }} | |
| # -ldflags=-checklinkname=0: see explanation in the test-cover job above. | |
| - name: Benchmarks for gas calculations | |
| run: | | |
| cd ./x/wasm/keeper | |
| go test -ldflags=-checklinkname=0 -bench . | |
| - name: Benchmarks to compare with native modules | |
| run: | | |
| cd ./benchmarks | |
| go test -ldflags=-checklinkname=0 -bench . | |
| simulations: | |
| runs-on: ubuntu-latest | |
| needs: setup-dependencies | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Run simulations | |
| run: make test-sim-deterministic test-sim-multi-seed-short test-sim-import-export | |
| docker-image: | |
| runs-on: ubuntu-latest | |
| needs: setup-dependencies | |
| env: | |
| IMAGE_NAME: cosmwasm/wasmd | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Set up Docker | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| run: | | |
| SHA=${{ github.sha }} | |
| docker build --pull -t $IMAGE_NAME:$SHA . | |
| - name: Check wasmvm version | |
| run: | | |
| SHA=${{ github.sha }} | |
| IN_DOCKER=$(docker run --rm $IMAGE_NAME:$SHA /usr/bin/wasmd query wasm libwasmvm-version) | |
| echo "Runtime libwasmvm-version in docker: $IN_DOCKER" | |
| IN_GOMOD=$(go list -m github.com/CosmWasm/wasmvm/v3 | cut -d" " -f2 | cut -d"v" -f2) | |
| echo "wasmvm version in go.mod: $IN_GOMOD" | |
| if [[ "$IN_DOCKER" != "$IN_GOMOD" ]]; then | |
| echo "Mismatch of wasmvm versions detected" | |
| exit 1 | |
| fi | |
| - name: Login to DockerHub | |
| if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | |
| env: | |
| DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }} | |
| run: | | |
| echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin | |
| - name: Push Docker image | |
| if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| SHA=${{ github.sha }} | |
| docker push $IMAGE_NAME:$SHA | |
| if [ "${{ github.ref_name }}" = "main" ]; then | |
| docker tag $IMAGE_NAME:$SHA $IMAGE_NAME:latest | |
| docker push $IMAGE_NAME:latest | |
| fi | |
| docker logout |