jurplel / install-qt-action

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

Use aqtinstall v2.0.0 #119

Closed ddalcino closed 2 years ago

ddalcino commented 2 years ago

This is my attempt at updating the action to use the 2.0.0 release of aqtinstall.

Fix #114. aqt v2.0.0 allows you to install tools without specifying a tool version number, so the syntax of the tool field is changed. I made an effort to maintain backwards compatibility though, so this PR will simply ignore the version number if you put it in:

    tools: 'tools_ifw tools_qtcreator,qt.tools.qtcreator'                                # new syntax
    tools: 'tools_ifw,4.1.1,qt.tools.ifw.41 tools_qtcreator,5.0.1-0,qt.tools.qtcreator'  # still works

This is also a step towards fixing #98. aqt 2.0.0 allows you to use a SimpleSpec to specify a Qt version; to install the latest 5.12 you would use aqt install-qt windows desktop 5.12 <arch>.

Please note: aqtinstall 2.0.0 introduces breaking changes to the interface of aqt, and with this PR applied, it will no longer be possible to use earlier versions of aqt. If you think it's worth it to continue to support older versions of aqt, I can modify this to make that possible.

jurplel commented 2 years ago

No, I don't think it's worth keeping backwards compatibility with older aqt versions. This should be v3 of the action though, even though it may not change the usage of the action I feel it should be opt-in.

Jnesselr commented 2 years ago

This would solve an issue I'm having. Do you have an ETA on when v3 will be released?

jurplel commented 2 years ago

This would solve an issue I'm having. Do you have an ETA on when v3 will be released?

I think it's pretty much good to be released. Really this action deserves a large refactor with caching v2 support, full utilization of aqtinstall v2.0.0's features (automating version checks, for example), and faster run times (my ad-hoc azure pipelines script runs in 30 seconds, install-qt-action for some reason takes like 2 minutes ¯_(ツ)_/¯).

I hope I do that one day soon, but until then, try out master and see if it works as expected. If all looks good on your side, I'll release it as v3

Jnesselr commented 2 years ago

I'm having a little trouble getting this to work. Not sure why, maybe you could take a look? It's a private repo so I'll have to paste code/output. Best guess is there's some compile step that normally happens for releases that didn't happen here.

Step code:

      - name: Install Qt
        uses: jurplel/install-qt-action@master
        with:
          version: 5.11.3
          arch: win64_msvc2017_64
          tools: 'tools_qtcreator,qt.tools.qtcreator'

Output:

Run jurplel/install-qt-action@master
  with:
    version: 5.11.3
    arch: win64_msvc2017_64
    tools: tools_qtcreator,qt.tools.qtcreator
    target: desktop
    install-deps: true
    cached: false
    setup-python: true
    set-env: true
    tools-only: false
    aqtversion: ==2.0.0
    py7zrversion: ==0.16.1
Error: File not found: 'D:\a\_actions\jurplel\install-qt-action\master\lib/main.js'
jurplel commented 2 years ago

Oh, right, silly me. I need to actually compile it.

jurplel commented 2 years ago

Try the v3 branch

Jnesselr commented 2 years ago

Perfect! The first time it failed with a timeout, but I think that's on pip's or aqt's side and I haven't been able to replicate it again. If I do start seeing it again, I'll submit a bug report. Thank you for merging this in!

jurplel commented 2 years ago

Great!