Skip to content

cargo-zigbuild fails to collect zig cc options when using setup-zig #47

@jlizen

Description

@jlizen

Context: awslabs/aws-lambda-rust-runtime#1006

cargo-lambda is a popular build tool that compiles AWS Rust lambdas with a mode that involves cargo-zigbuild. The typical way of using it in CI is via a workflow that starts with this action (example).

However, this recently started failing due to the error:

Failed to collect 'zig cc' options

We have root caused this error to result from missing the zig stdlib, various header files, etc, on $PATH: ref. The tarball includes those in ./lib/**, whereas the zig binary is at ./zig.

So, it seems that the $PATH additions from this action either are restricted only to the binary, or are not including these directories.

This is confusing to me, since my reading of the action code makes it look like we are in fact caching/exposing the full tarball contents, which should include /lib.

I poked around the action locally and couldn't figure out how to get it working. Opening this issue in case brighter minds know the path forward :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions