Skip to content

Commit

Permalink
CI: build staticcheck release from source
Browse files Browse the repository at this point in the history
Upstream's latest version works fine when built with Go 1.22,
but their release archives are built with 1.21,
and that seems to trigger a panic due to issue
dominikh/go-tools#1496.

Thankfully, building from source is easy enough.
It shouldn't cause any noticeable slowdown, since we reuse both
the modules and build Go caches via actions/setup-go.
  • Loading branch information
mvdan committed Feb 19, 2024
1 parent 06eb26f commit 56f480c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ jobs:
curl -L https://github.com/dominikh/go-tools/releases/download/2023.1.6/staticcheck_linux_amd64.tar.gz | tar -xzf -
- name: Run staticcheck
run: |
./staticcheck/staticcheck ./... 2> staticcheck/stderr
go install honnef.co/go/tools/cmd/[email protected]
staticcheck -debug.version
staticcheck ./... 2> staticcheck-stderr
- name: Check staticcheck stderr (this step isn't needed because we are using actions/setup-go@v5 on GitHub hosted runner)
run: |
if cat staticcheck/stderr | grep "matched no packages" ; then
if cat staticcheck-stderr | grep "matched no packages" ; then
echo "staticcheck step did nothing, due to https://github.com/vocdoni/vocdoni-node/issues/444"
echo "Please re-run job."
# seize the opportunity to fix the underlying problem: a permissions error in ~/.cache
Expand Down

0 comments on commit 56f480c

Please sign in to comment.