Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use run-vcpkg properly #23

Closed
Milerius opened this issue Jun 21, 2020 · 2 comments
Closed

Unable to use run-vcpkg properly #23

Milerius opened this issue Jun 21, 2020 · 2 comments

Comments

@Milerius
Copy link

Hello i got the following error:

##[error]run-vcpkg action execution failed: Error: Unable to locate executable file: git. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable

For the following actions snippet:

- name: vcpkg deps (Linux)
        env: # Or as an environment variable
          QT_INSTALL_CMAKE_PATH: ${{ github.workspace }}/Qt/5.15.0/gcc_64/lib/cmake
          QT_ROOT: ${{ github.workspace }}/Qt/5.15.0
          PATH: $HOME/.nimble/bin:${{ github.workspace }}/Qt/5.15.0/gcc_64/bin:$PATH
          CXXFLAGS: -stdlib=libc++
          LDFLAGS: -stdlib=libc++
          CXX: clang++-9
          CC: clang-9
        uses: lukka/run-vcpkg@v3
        with:
          vcpkgArguments: '@${{ github.workspace }}/.github/workflows/linux_response_file.txt'
          vcpkgDirectory: '${{ github.workspace }}/ci_tools_atomic_dex/vcpkg-repo'
          vcpkgGitURL: 'https://github.com/KomodoPlatform/vcpkg'
          appendedCacheKey: ${{ hashFiles('.github/workflows/linux_response_file.txt') }}

My gitmodules:

➜  atomicDEX-Pro git:(transition_unit_tests_and_modernize) cat .gitmodules 
[submodule "ci_tools_atomic_dex/vcpkg-repo"]
        path = ci_tools_atomic_dex/vcpkg-repo
        url = https://github.com/KomodoPlatform/vcpkg

Full log:

2020-06-21T22:53:15.2255377Z ##[group]Run lukka/run-vcpkg@v3
2020-06-21T22:53:15.2255512Z with:
2020-06-21T22:53:15.2255650Z   vcpkgArguments: @/home/runner/work/atomicDEX-Pro/atomicDEX-Pro/.github/workflows/linux_response_file.txt
2020-06-21T22:53:15.2255802Z   vcpkgDirectory: /home/runner/work/atomicDEX-Pro/atomicDEX-Pro/ci_tools_atomic_dex/vcpkg-repo
2020-06-21T22:53:15.2256059Z   vcpkgGitURL: https://github.com/KomodoPlatform/vcpkg
2020-06-21T22:53:15.2256213Z   appendedCacheKey: 1c4bebac6930fd2f5d16721fc2617b5ffc4c6ecd9c786eeaf8de41c2ea68061a
2020-06-21T22:53:15.2256348Z   setupOnly: false
2020-06-21T22:53:15.2256485Z   vcpkgArtifactIgnoreEntries: !.git
**/*
!installed
!/vcpkg
!vcpkg.exe
!vcpkgArtifactIgnoreEntries

2020-06-21T22:53:15.2256619Z   cleanAfterBuild: true
2020-06-21T22:53:15.2256735Z   doNotUpdateVcpkg: false
2020-06-21T22:53:15.2256848Z   useShell: true
2020-06-21T22:53:15.2256938Z env:
2020-06-21T22:53:15.2257060Z   Qt5_Dir: /home/runner/work/atomicDEX-Pro/atomicDEX-Pro/Qt/5.15.0/gcc_64
2020-06-21T22:53:15.2257226Z   Qt5_DIR: /home/runner/work/atomicDEX-Pro/atomicDEX-Pro/Qt/5.15.0/gcc_64
2020-06-21T22:53:15.2257372Z   PATH: $HOME/.nimble/bin:/home/runner/work/atomicDEX-Pro/atomicDEX-Pro/Qt/5.15.0/gcc_64/bin:$PATH
2020-06-21T22:53:15.2257522Z   QT_INSTALL_CMAKE_PATH: /home/runner/work/atomicDEX-Pro/atomicDEX-Pro/Qt/5.15.0/gcc_64/lib/cmake
2020-06-21T22:53:15.2257666Z   QT_ROOT: /home/runner/work/atomicDEX-Pro/atomicDEX-Pro/Qt/5.15.0
2020-06-21T22:53:15.2257789Z   CXXFLAGS: -stdlib=libc++
2020-06-21T22:53:15.2257902Z   LDFLAGS: -stdlib=libc++
2020-06-21T22:53:15.2258015Z   CXX: clang++-9
2020-06-21T22:53:15.2258126Z   CC: clang-9
2020-06-21T22:53:15.2258237Z ##[endgroup]
2020-06-21T22:53:15.2691239Z ##[group]Restore vcpkg and its artifacts from cache
2020-06-21T22:53:15.2716438Z vcpkg identified at commitId=a92b724ca802ed27cfe2b7078e8484589fbae23a, adding it to the cache's key.
2020-06-21T22:53:15.2720047Z Cache's key = 'submodGitId=a92b724ca802ed27cfe2b7078e8484589fbae23a-args=-1372165590-os=1524360844-appendedKey=-535328906'.
2020-06-21T22:53:15.2722244Z Running restore-cache
2020-06-21T22:53:15.3733723Z Cache miss.
2020-06-21T22:53:15.3734512Z ##[endgroup]
2020-06-21T22:53:15.3744896Z ##[group]Set output env vars
2020-06-21T22:53:15.3752520Z Set task output variable 'RUNVCPKG_VCPKG_ROOT_OUT' to value: /home/runner/work/atomicDEX-Pro/atomicDEX-Pro/ci_tools_atomic_dex/vcpkg-repo
2020-06-21T22:53:15.3755741Z ##[endgroup]
2020-06-21T22:53:15.3804722Z ##[error]run-vcpkg action execution failed: Error: Unable to locate executable file: git. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable
@Milerius
Copy link
Author

sorry was a mistake of syntax using env github variable

@lukka
Copy link
Owner

lukka commented Jun 22, 2020

@Milerius thanks for the report! It looks like the problem was referencing environment variables in the env property of an action, e.g. PATH: $PATH:${{ github.workspace }}/new/path would not expand $PATH, while PATH: ${{ env.PATH }}:${{ github.workspace }}/new/path would expand PATH as well.

In my experience I have seen other source of problems:

  • using the colon as path separator, which depends on the shell used in the step;
  • using ${{ github.workspace }} in an action on Windows that uses the bash shell, since the paths in the github context are in Windows form, i.e. c:\path\;

To be platform agnostic, it usually it works best to use the bash shell on any OS, and using add-path to augment the path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants