anakryiko / retsnoop

Investigate kernel error call stacks
BSD 2-Clause "Simplified" License
210 stars 34 forks source link

Release workflow: Use GH Action for packaging sources, cross-compile addr2line on host #44

Closed qmonnet closed 1 year ago

qmonnet commented 1 year ago

Follow-up to https://github.com/anakryiko/retsnoop/pull/42.

This PR updates the release workflow to use a dedicated GitHub Action for packaging the source files for retsnoop and its submodules. Contrarily to the previous commands, this Action should take into account the export-ignore directives from the .gitattributes files. Although it may not show immediately for the libbpf submodule, because we need https://github.com/libbpf/libbpf/commit/3f591a66103d49b311956618d440a84cf4d30715 to be synced before that.

When testing the change above, I observed that the job for building the arm64 binary would no longer pass. This is due to the Rust registry index update getting OOM-killed in the Docker container that we use to cross-compile. I'm not sure what caused this change, but I found a way to address it: by cross-compiling addr2line directly on the host, we solve the memory issue, and we cut down the duration of the job from ~20 to ~6 minutes.

anakryiko commented 1 year ago

This is awesome, @qmonnet! Thanks so much for doing this! I've updated libbpf and bpftool deps in https://github.com/anakryiko/retsnoop/pull/45, so everything should be in order for the next release. I'll let you know how it goes next time!