jurplel / install-qt-action

Install Qt on your Github Actions workflows with just one simple action
MIT License
455 stars 78 forks source link

$IQTA_TOOLS No such file or directory #158

Closed Ahmedelsa3eed closed 1 year ago

Ahmedelsa3eed commented 1 year ago

After installing Qt

      - name: Install Qt
        uses: jurplel/install-qt-action@v2
        with:
          version: '5.15.2'
          host: 'linux'
          dir: '${{ github.workspace }}/qt/'
          tools: 'tools_qtcreator,qt.tools.qtcreator'

Then try to list files in the Tools directory

      - name: qt tools
         run: |
            cd $IQTA_TOOLS
            ls -a

getting that Error

image

What I'm doing wrong here?

asztalosdani commented 1 year ago

Check if your Install Qt step finished successfully or failed silently like mine in #154

Ahmedelsa3eed commented 1 year ago

It failed silently also

python3 -m aqt tool linux tools_qtcreator qt.tools.qtcreator undefined -O /home/runner/work/test_github_workflow/test_github_workflow/qt//Qt
Specified target combination is not valid: linux tools_qtcreator undefined
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/runpy.py", line 86, in _run_code
(node:1582) UnhandledPromiseRejectionWarning: Error: The process 'python3' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/jurplel/install-qt-action/v2/node_modules/@actions/exec/lib/toolrunner.js:548:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/jurplel/install-qt-action/v2/node_modules/@actions/exec/lib/toolrunner.js:531:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/jurplel/install-qt-action/v2/node_modules/@actions/exec/lib/toolrunner.js:431:27)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Socket.<anonymous> (internal/child_process.js:444:11)
    at Socket.emit (events.js:314:20)
    at Pipe.<anonymous> (net.js:675:12)
    exec(code, run_globals)
(node:1582) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1582) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aqt/__main__.py", line 27, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aqt/__init__.py", line 31, in main
    return cli.run()
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aqt/installer.py", line 675, in run
    result = args.func(args)
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aqt/installer.py", line 431, in run_tool
    tool_archives = ToolArchives(
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aqt/archives.py", line 363, in __init__
    super(ToolArchives, self).__init__(
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aqt/archives.py", line 141, in __init__
    self.version = Version(version)
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/semantic_version/base.py", line 105, in __init__
    major, minor, patch, prerelease, build = self.parse(version_string, partial)
  File "/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/semantic_version/base.py", line 318, in parse
    raise ValueError('Invalid version string: %r' % version_string)
ValueError: Invalid version string: 'qt.tools.qtcreator'
asztalosdani commented 1 year ago

Try specifying the version using the tool,version,variant syntax, as I did in #154. You can find the version running aqt locally. https://aqtinstall.readthedocs.io/en/latest/getting_started.html#installing-tools

Ahmedelsa3eed commented 1 year ago

It worked with these parameters

      - name: Install Qt
        uses: jurplel/install-qt-action@v2
        with:
          version: '5.15.2'
          host: 'linux'
          target: 'desktop'
          dir: '${{ github.workspace }}/qt_env'
          tools: 'tools_qtcreator,8.0.0,qt.tools.qtcreator tools_cmake,3.23.2,qt.tools.cmake tools_ninja,1.10.2,qt.tools.ninja'
          modules: 'qtcharts qtdatavis3d debug_info'
          set-env: 'true'
          tools-only: 'false'
          aqtversion: '==1.2.5'