-
I want to run a CMake project in WSL, but have trouble programmatically finding the top-level project source directory. I didn't quite get how to do this from the existing setup-wsl Discussions. Here is a failed run: https://github.com/scivision/detect-windows-subsystem-for-linux/actions/runs/7023130945/job/19108936615 The log:
The yaml: wsl:
runs-on: windows-latest
env:
WSLENV: GITHUB_WORKSPACE
defaults:
run:
shell: wsl-bash {0}
steps:
- uses: Vampire/setup-wsl@v2
with:
additional-packages:
cmake make gcc g++
- run: cmake -S $(wslpath -u ${GITHUB_WORKSPACE}) -Bbuild
- run: cmake --build build
- run: ctest --test-dir build -V |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You simply forgot to make the checkout in the |
Beta Was this translation helpful? Give feedback.
You simply forgot to make the checkout in the
wsl
job. :-)The
wslpath
magic should also not really be necessary, I think your working directory should stay the same.But I assume it was just a try to overcome the problem.