PyO3 / maturin-action

GitHub Action to install and run a custom maturin command with built-in support for cross compilation
MIT License
127 stars 35 forks source link

`working-directory` option accepts a full path for hostBuild, but joins with workspace on dockerBuild #216

Closed tiptenbrink closed 12 months ago

tiptenbrink commented 12 months ago

Great action, massively simplified my previous hacky maturin actions!

If you use the working-directory option, for the dockerBuild function (and also getManifestDir) the directory is as follows:

if (workdir.length > 0) {
    workdir = path.join(workspace, workdir)
  } else {
    workdir = workspace
  }

but for the hostbuild it is like this:

const workdir = core.getInput('working-directory') || process.cwd()

Always expecting it to be relative to the workspace is probably okay, but that should be documented and then probably the hostBuild should work similarly (or both should accept full paths).

I ran into this issue using ${{ github.workspace }}/ as the input for the working-directory. This was probably unnecessary, but it led to the Windows/macOS builds succeeding while the Linux build failed. Here is an example of a failed run.

I can make a PR to update the README (that it should be relative to the workspace) or to make sure both have the same behavior.

messense commented 12 months ago

I can make a PR to update the README (that it should be relative to the workspace) or to make sure both have the same behavior.

Pull requests are welcome!