floooh / fips

High-level build system for distributed, multi-platform C/C++ projects.
MIT License
468 stars 82 forks source link

"fips run xxxxx" fails on github actions windows vm with "The system cannot find the path specified." #260

Closed mattiasljungstrom closed 4 years ago

mattiasljungstrom commented 4 years ago

I think this is because paths are created in the fips code with this style: return get_workspace_dir(fips_dir) + '/' + proj_name

The same command works on macos VM, but breaks on github Windows for some reason. It works on my build machine, so not sure what's happening exactly on the github VM.

The correct way in python would be to use: return os.path.join(get_workspace_dir(fips_dir), proj_name)

Do you want me to try to do a PR?

Example run from my project: ` Windows VS2019 debug tests1s shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" Run python fips run unit_tests python fips run unit_tests shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"

fips path: D:\a\projectx\fips === run 'unit_tests' (config: win64-vstudio-debug, project: projectx): The system cannot find the path specified.

[error]Process completed with exit code 1.

`

floooh commented 4 years ago

Hmm weird, I didn't have problems with fips run in my projects for running tests on Windows in GH Actions, for instance in the chips-test emulators project:

https://github.com/floooh/chips-test/blob/2209a60d8d485de48f091650de780f0c748e0278/.github/workflows/main.yml#L15

...and also in the sokol-samples:

https://github.com/floooh/sokol-samples/blob/dd205303b6f791a5a85366494964899084595583/.github/workflows/main.yml#L27

Any idea what could be different in your github actions setup? I've been using slashes as path separators since forever in python on Windows and haven't seen any problems with this yet (also outside python, AFAIK forward slashes are generally supported in addition to backslashes)

mattiasljungstrom commented 4 years ago

I'm not sure because it's annoying to test things on github actions. I have CWD setup in fips.yml (see below) and I'm trying to write/read files during my unit tests. But I think the error I'm seeing is before my code is even running.

run:
  unit_tests:
    cwd: ./
mattiasljungstrom commented 4 years ago

Going to try to figure out where it goes wrong exactly.

mattiasljungstrom commented 4 years ago

Ops, I didn't have run target specified, and the default wasn't the one I was building. But it was on macos, so that's why it worked there. Nothing to see here!

      run: python fips run unit_tests win64-vs2019-debug