Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions CI fails when the cache is hit #1562

Closed
stapelberg opened this issue Sep 8, 2023 · 0 comments
Closed

GitHub Actions CI fails when the cache is hit #1562

stapelberg opened this issue Sep 8, 2023 · 0 comments
Assignees
Labels

Comments

@stapelberg
Copy link

See e.g. run https://github.com/protocolbuffers/protobuf-go/actions/runs/6120891451/job/16613621767, which fails with the following error:

=== RUN   Test
=== RUN   Test/GeneratedGoFiles
    integration_test.go:91: executing (go run -tags protolegacy ./internal/cmd/generate-protos): exit status 1
        executing: protoc --plugin=protoc-gen-go=/tmp/go-build3962162[…]
        
        panic: exec: "protoc": executable file not found in $PATH

I looked into this a bit, and I think the reason is that protoc is built via bazel, and bazel stores the build output in $HOME/.cache/bazel, which is outside the $PWD/.cache that we save/restore in GitHub Actions.

The fix might be as simple as adding ~/.cache/bazel to the list of cached paths, but I want to take this opportunity to also update to actions/setup-go@v4 and actions/cache@v3 while at it, which will give us zstd compression for the cache.

I’ll send a change once I have a successful GitHub Actions run in my personal repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant