Hi Jens, Do you get that same error in both Ubuntu and MacOS actions? It would seem pretty surprising if both platforms were getting version-skewed installations.
Does your source code include any checked-in generated code (.capnp.h files)? If so then the problem is presumably that the code was generated with the capnp on your machine, which is a different version from what the action machines use. -Kenton On Sat, Feb 26, 2022 at 3:53 PM Jens Alfke <j...@mooseyard.com> wrote: > I’m trying to get my (C++) project to build in Github Actions, but getting > compile errors because apparently there’s a version mismatch between the > Cap’n Proto headers and tool. > > I don’t build Cap’n Proto as part of the project; instead I use a package > manager to install it. My CMakeLists.txt has a step to compile my interface: > find_package(CapnProto CONFIG REQUIRED) > capnp_generate_cpp(myCapnPSources myCapnPHeaders src/interface.capnp) > > This works fine in local builds, both macOS and Ubuntu. > > In my Github Actions yaml file, I added a build step that uses the > get-package action: > - name: Install Capn Proto > uses: mstksg/get-package@v1 > with: > brew: capnp > apt-get: capnproto libcapnp-dev > > Unfortunately the C++ compile then fails with the error: "Version mismatch > between generated code and library headers. You must use the same version > of the Cap'n Proto compiler and library.” > > I assume this means that on the Github runner the `capnp` tool is from a > different version than the headers. I don’t know why that would be, when I > had apt install both packages. (And why would there be a second > installation of Cap’n Proto at all?) > > Has anyone successfully gotten Github Actions to build C++ based Cap’n > Proto projects? > > —Jens > > -- > You received this message because you are subscribed to the Google Groups > "Cap'n Proto" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to capnproto+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/capnproto/A1E39982-9835-4E45-B9E1-397CC5B286FF%40mooseyard.com > . > -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/CAJouXQm-XT%2Bsa8Agtgh-32UboA0RSM7%2BfZ9QTB7q3X-U_OLDYA%40mail.gmail.com.