jurplel / install-qt-action

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

QT_ROOT_DIR or Qt6_DIR is not set #224

Closed mmertama closed 1 month ago

mmertama commented 4 months ago
  - name: Install Qt
    uses: jurplel/install-qt-action@v3.3.0
    with:
      aqtversion: '>=3.1.*'
      version: '6.6.1'
      host: ${{ matrix.config.host }}
      target: 'desktop'
      arch:  ${{ matrix.config.arch }}
      dir: '${{ github.workspace }}'
      modules: 'qt5compat ${{  matrix.config.extra_libs }}'

and then following

rusubov commented 4 months ago

This happened for me too. Not sure how to use this.

rusubov commented 4 months ago

also, looks like the dir option is not respected. it only installs qt in the default location Correction: cmake can not locate libraries via CMAKE_PREFIX_PATH when qt is installed under github.workspace using ${{github.workspace}}/../Qt/ fixes the issue

pzhlkj6612 commented 3 months ago

Hi there!

I tested your config, and Qt6_DIR is present:

jobs:
  build:
    runs-on: windows-latest
    steps:
        - name: Install Qt
          uses: jurplel/install-qt-action@v3.3.0
          with:
            aqtversion: '>=3.1.*'
            version: '6.6.1'
            host: 'windows'
            target: 'desktop'
            arch:  'win64_msvc2019_64'
            dir: '${{ github.workspace }}'

        - name: Configure
          shell: cmake -P {0}
          run: |
            message("Currently: $ENV{Qt6_DIR}, $ENV{QT_ROOT_DIR}")
Currently: D:\a\test-iqta-1\test-iqta-1\Qt\6.6.1\msvc2019_64, 

.

pzhlkj6612 commented 3 months ago

For QT_ROOT_DIR , it's a bit complex.

QT_ROOT_DIR is a replacement for QT6_DIR . However, it has not taken effect, yet.

For v3.3.0 tag (rev. b3ea527), the QT_ROOT_DIR env has not been added.

For v3 branch (rev. b7840a6), the QT_ROOT_DIR env has been there, but the built js file does not match its source, so we cannot directly use this action:

https://github.com/jurplel/install-qt-action/blob/b7840a6733f49e2a39c4355260d2375063d39b61/action/src/main.ts#L447-L450

https://github.com/jurplel/install-qt-action/blob/b7840a6733f49e2a39c4355260d2375063d39b61/action/lib/main.js#L370-L372

Manually building this action is a workaround for now, see #223.

@jurplel , maybe we can use a script to build the js file in CI?

rusubov commented 3 months ago

@pzhlkj6612 Thank you for the analysis of this issue.

but the built js file does not match its source

I don't understand, how could this be?

pzhlkj6612 commented 3 months ago

but the built js file does not match its source

I don't understand, how could this be?

The source code of an action should be a JavaScript file. This action is using TypeScript, so we have to compile it to .js by "tsc" before uploading things to the repository. If the compilation step is forgotten, the old .js file will not be updated. This is why I recommend CI.

pzhlkj6612 commented 3 months ago

[ !!! ]

Then, this action has been almost in limbo for some time. Do we have a real-time chat room for "install-qt-action"? A few quick discussions may push this action to the launchpad quickly. I can help.

The current tasks are:

mmertama commented 3 months ago

Im not sure if this helps, but I last week hacked some workarounds to get it working for me: https://github.com/mmertama/FigmaQML/blob/main/.github/workflows/figmaqml.yml

jurplel commented 1 month ago

For QT_ROOT_DIR , it's a bit complex.

QT_ROOT_DIR is a replacement for QT6_DIR . However, it has not taken effect, yet.

For v3.3.0 tag (rev. b3ea527), the QT_ROOT_DIR env has not been added.

For v3 branch (rev. b7840a6), the QT_ROOT_DIR env has been there, but the built js file does not match its source, so we cannot directly use this action:

https://github.com/jurplel/install-qt-action/blob/b7840a6733f49e2a39c4355260d2375063d39b61/action/src/main.ts#L447-L450

https://github.com/jurplel/install-qt-action/blob/b7840a6733f49e2a39c4355260d2375063d39b61/action/lib/main.js#L370-L372

Manually building this action is a workaround for now, see #223.

@jurplel , maybe we can use a script to build the js file in CI?

That would probably be a good idea. I meant to build it after I fixed CI but I just ran out of time for a while.

[ !!! ]

Then, this action has been almost in limbo for some time. Do we have a real-time chat room for "install-qt-action"? A few quick discussions may push this action to the launchpad quickly. I can help.

The current tasks are:

* Make "v3" as the default branch since GitHub shows the README in the default branch. Some users were confused by it.

* Arrange branches, release a new "v3" version with CI-built js ASAP.

* Solve opening issues.

Sorry for the limbo. I just released a v4 that hopefully should be solid. I have a discord server setup for my personal projects that you are welcome to join so that you can ping me often (I can make a separate channel for install-qt-action): interversehq.com/discord