Commit Graph

40 Commits

Author SHA1 Message Date
David Dalcino
8251a0628f Add azure build job that installs by spec 2021-09-07 14:47:54 -07:00
David Dalcino
21bae4292a Update azure tests: remove addons. prefix 2021-08-18 10:28:14 -07:00
David Dalcino
3c08fa2d63 Handle special case for Qt 5.9.0
Qt 5.9.0 installs to `5.9/arch`, rather than the expected `5.9.0/arch`.
This change adds some helper functions to BuildJob that compose the
expected binary directory with the appropriate logic to handle the
edge case for Qt 5.9.0.
2021-08-11 13:05:17 -07:00
David Dalcino
6ff4e74394 Add build job for Qt 5.9/Win/Desktop/MSVC2017_64 2021-08-11 11:36:07 -07:00
David Dalcino
ece566ae84 Restore list-qt and list-tool tests in azure ci
Both the `list-qt` and `list-tool` subcommands are tested in a single
build job in `ci/steps.yml`, but only when the BuildJob is called
'list'.
2021-08-01 11:10:52 -07:00
Hiroshi Miura
67aa6365bc CI: update azure-pipelines to new syntax
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-08-01 20:56:26 +09:00
Hiroshi Miura
ef2d6d8dc7 CI Azure: test Qt6.2 with module
- Bump Pscx 4.0.0-beta2

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-07-27 09:13:21 +09:00
David Dalcino
c3d202730c Update tests to use list-qt/list-tool syntax 2021-07-22 09:47:39 -07:00
David Dalcino
705c6225e2 Add capability to list tools (#235)
* Add html scraping capability to helper.py

The function scrape_html_for_folders() reads an html file at
`https://download.qt.io/online/qtsdkrepository/<os>/<target>/` and
extracts a list of all the folders within that directory.
It separates the folders by category, so that 'tools' are not
mixed in with 'qt5' or 'qt6'.

This commit also adds a function that prints the available folders,
allowing the caller to filter the output by category.

* Add interface for accessing scrape_html_for_folders

I'm sure this isn't exactly what is needed, and that this functionality
should probably be folded into `aqt list`, but it does demonstrate that
aqt can list all the tools available at downloads.qt.io by scraping html.

This allows you to type `aqt list2 tools linux desktop`, and get a list
of all the tools on the server.
There are more options; type `aqt list2 -h` to see them all.

* Add failing tests for `aqt list`

* Add passing implementation of `aqt list`

* Remove old implementation of `aqt list`

This removes `Cli.run_list_old`, as well as any commented-out code in
installer.py that was related to the old implementation of `run_list`.

This also restores some code that was commented out erroneously.

* Fix misuse of semantic_version

In an earlier commit, I used the parameter `partial=True` for the
preview builds of Qt, since they do not include a patch number. I did
not recognize this as a misuse of semantic_version until I ran the tox
linter. `partial` is meant for 'partial specification', as in, 'this
program requires version 6.2, and the patch is unimportant`.

This change removes the `partial=True` parameter, adds a `0` for the
patch number, and uses a format string to print preview versions without
the patch.

* Use semantic version in interfaces instead of str

This updates all functions that accept a Qt version as a string, so that
they now accept a semantic version object instead. This forces the
caller to do some input validation, and moves the responsibility of
string-to-version conversions out of functions where it does not belong.

* Improve `aqt list` interface as discussed

This adds several new options to `aqt list`, and renames the ambiguous
`packages` to `modules`. New options include the ability to list
targets, extensions, and architectures for a particular (host, target,
Qt version) tuple. The goal is to provide sufficient information to the
user, such that the user can use all the other features of aqt without
having to look them up somewhere else.

* Cleanup `targets` dictionary

* Add `list architectures` feature

* Add tests for `list architectures` feature

* Add documentation for new list feature.

* Fix url bugs related to BASE_URL change

* Add stub for `list --extensions`

* Implement `list --extensions`

* Cleanup imports

* Add basic tests of `aqt list` to azure pipeline

* Fix failed merge with upstream

* Simplify string-to-version code

An earlier commit introduced `cli_2_semantic_version`, which calls
`get_semantic_version_with_dots`, which will never be called by any
other code. I think that this should really just be one function, and
splitting it in two is just needlessly complex.

* Revert dd41e653 - changes to azure-pipelines.yml

* CI: change test case for list command

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Update MANIFEST

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Fix errors reported by flake8

This commit fixes some unused imports, missing imports, and formatting
errors.

* Run isort

* Add three more build jobs to azure pipelines

This adds three more combinations of `qt version/host/target` to the
`aqt list` command tests on the azure pipelines. This is pretty far from
exhaustive, but I think it's worth it to add these: they execute
slightly different code paths than the standard `linux/desktop`
variants. I don't want to add a whole lot more than this; `aqt list` is
slower than I'd like it to be, and I don't want to waste CI time.

* Fix bug where empty extensions returns success

Prior to this commit, if you ran `aqt list` to list possible extensions,
it could print a blank line and return 0. This is because the
get_extensions_for_version function was accepting empty strings as a
valid extension, and returning a list consisting of one empty string.
This commit filters out those empty strings.

* Attempt to fix ci bug when listing android exts

Android extensions for Qt6 follow different rules than Qt5; this
attempts to account for that.

* remove invalid ArchiveId objects from tests

* Add author

* Use Python for test logic instead of bash

* Remove 'build accelbubble' step from 'list' test

This commit attempts to separate the 'build accelbubble example' test
from the 'aqt list' test.

In this case, the test for `aqt list qt5 linux android` was running the
"build accelbubble example" test in addition to the intended test. If
the "build accelbubble example" test fails, then it looks like the `aqt
list` test failed, until you look to see why it failed.

* Remove dead code

* Accept `latest` keyword instead of qt version

This commit modifies the interface of `aqt list`, so that the flags
`--modules`, `--extensions`, and `--arch` will accept either a Qt
version or the word `latest`. If the user specifies a version of Qt,
the command works as before. If the user specifies `--modules latest`,
`aqt list` will determine the latest version of Qt, given the filters
specified, and return the modules for that version.

This commit removes the flag `--latest-modules`, because that flag is no
longer necessary. The `latest` keyword serves the same function, and it
works for the `--extensions`, and `--arch` flags as well. This prevents
the need for flags such as `--latest-extensions` and `--latest-arch`,
which otherwise would have been necessary to provide this functionality
to the other list features.

* remove unused import

* Update azure pipeline to reflect `latest` feature

* WIP refactor helper methods into ListCommand

* Refactor helper methods into ListCommand

This PR adds many helper methods to helper.py that are closely related
to each other, and which are only useful to the ListCommand object. This
commit moves the majority of these into the ListCommand object, so that
they don't confuse future readers who are looking for something else.

* Fix imports after merge

* Fix unused import

* Add test and impl for list tool modules

This adds code that parses an 'Updates.xml' file for the names of tool
modules, which a user can use to install tools. This does not have any
cli-facing code yet, since the current interface does not make sense for
this purpose.

* Add CLI command to list tool variant names

This exposes `ListCommand.fetch_tool_modules` to the CLI.
Accordingly, it adds a test to the Azure Pipelines for every `aqt list`
job, and it adds documentation to docs/cli.rst.

Since this feature is meant to print values you can feed into the `aqt
tool` command, the documentation for the `aqt tool` command was changed
as well.

* Use monkeypatch for http_fetcher

This removes the http_fetcher parameter for ListCommand in favor of
monkeypatching.

* Remove dataclasses

Dataclasses were new in Python 3.7, and don't exist in the minimum
supported Python 3.6.

* black

* Fix ci test for `aqt list tools --tool`

* Add default timeout to request_http_with_failover

* fix monkeypatched http fetcher

* Fix 'aqt list tools' command on Azure Pipeline

Currently, the `tools_qt3dstudio_runtime_240` appears to be the only
tool available on all host/target combinations, so we will check that
one in Azure Pipelines.

* Move helper classes specific to ListCommand into ListCommand

* Fix use of new global Settings object

* Fix sphinx docstring syntax

* Swap `request_http_with_failover` for `getUrl`

* Add additional follow-up suggestion on error

* Fix exceptions import

* Prevent repeated 'suggested follow up' actions

This change uses exclusive branches to prevent `aqt list` from repeating
the same/similar recommended actions.

* Fix bugs related to updated getUrl error messages

* run black

* docs: add auto section link label extension

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* docs: add more list command examples

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Fix typo in docs

* remove duplicate `semantic_version`

* Add expected outputs and arch example to docs

This change adds some expected output to the documentation. For any
user who is confused about what the documentation means when it
mentions `tools` and `modules`, and is unsure which is which, this
change should help that user figure that out.

This also adds an example for listing architectures.

* Remove `logger` from `getUrl` parameter list

* helper: getLogger("aqt.helper") in helper functions

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Use `pretty_print` instead of `str()` for output

* test_list.py use pretty_print instead of str

* fix Versions constructor

* black

Co-authored-by: Hiroshi Miura <miurahr@linux.com>
2021-07-06 07:58:18 +09:00
Hiroshi Miura
79eb2ba0cb Update CI test for Qt 6.2.0 for mac
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-07-01 13:59:49 +09:00
Hiroshi Miura
0e75996da6 Add CI test for Qt 6.2.0 for mac
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-07-01 13:50:26 +09:00
Hiroshi Miura
b94d310552 CI: remove berkley.edu from mirrors test site
and source format by black

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-06-16 12:56:33 +09:00
Hiroshi Miura
33b97a5e54 CI: fix import
and source format by black

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-06-12 23:39:01 +09:00
Hiroshi Miura
054357f272 CI: select mirror from several sites randomly
and source format by black

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-06-12 11:20:49 +09:00
David Dalcino
09a1a28d32 Add control and test for patched qmake
This adds two new jobs to the azure pipeline: one that tests a really
short output directory, and one for a really long output directory.

This also adds a QT_BINDIR variable, which is dependent on the output
directory. Within `steps.yml`, QT_BINDIR always points to the directory
that contains qmake.
2021-06-08 18:11:30 -07:00
Hiroshi Miura
337eb98ff0 CI: refactor azure pipelines scripts (#250)
* CI: refactoring Azure pipeline scripts

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: azure (wip)

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Add list command

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: skip installation of package when install command(linux)

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* fix typo

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-05-24 23:23:50 +09:00
Hiroshi Miura
4aad9c8e12 CI: azure: set mirror url when windows
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-05-23 15:47:16 +09:00
Hiroshi Miura
9f1c83ce77 CI: Chnage test versions combination (#213)
* CI: Change test versions combination

- test with python 3.9 on Github actions
- test with python 3.8 on Azure pipelines
- test against 5.9.9, 5.12.8, 5.13.2, 5.14.2, 5.15.2, and 6.1.0
- run on ubuntu-20.04 for Qt6
- CI: Test mac/ios/Qt6 combination
- CI: Azure: install desktop qtbase when android and ios install
- CI: update example project for Qt6

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-02-12 00:01:42 +09:00
Hiroshi Miura
060a1125f3 Handle Qt6/non-desktop installation patching (#210)
* Do not check qmake for android

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Refactoring patching

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: test android_armv7 in 6.0.1

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Patching qt6 android qmake script

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Patching qt6 android qmake script(wip)

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: test android/qt6 on github actions

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Add combination for Qt6 and update README

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Azure: Fix test cases

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Azure: Fix Qt6 test case

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Fix windows case

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Fix windows case

Add debug print

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Fix prefix path for patching

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Improvve log messages for patching

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Check android installation

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Check android installation

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Check android installation

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Updater: update logging message

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* Updater: Fix qmake detection on windows

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: run qmake.bat on windows

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: run Qt6 qmake.bat on windows

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: run Qt6 qmake.bat on windows

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Azure: fix mirror test

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Azure: test Qt6 with Ubuntu 20.04

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2021-02-11 10:05:13 +09:00
Hiroshi Miura
72c4589e7d Patch qmake as finalize process (#130)
* Patch qmake hard coded path with installed prefix(#100)
* AP: Update tests
 - Test android target with 5.14.x
 - Test ios target on mac
* Does not patch mac framework when android, ios and wasm
* Update changelog
* GHA: Update to run qmake to check patch
  - Check qmake works well if patched.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-05-21 21:56:04 +09:00
Hiroshi Miura
32ffc723af AP: drop mingw 32bit case
Here is known issue with mingw 32bit with pre-installed mingw environment.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-05-04 14:49:46 +09:00
Hiroshi Miura
5dad9c9718 AP: mingw81 test which is in Azure hosted image
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-05-04 11:35:26 +09:00
Hiroshi Miura
1aba681db7 AP: drop 5.14.2 msvc2019 which is not supported
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-05-03 15:37:13 +09:00
Hiroshi Miura
477a28503a Azure: reduce test caes: now too much
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-05-02 13:29:13 +09:00
Hiroshi Miura
7938032a42 fix syntax error on #118
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-05-02 12:18:24 +09:00
Hiroshi Miura
ff5418c752 Fix typo on mizux PR
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-05-02 12:06:06 +09:00
Mizux Seiha
8a927e4b09 Add msvc2019 2020-05-01 17:47:17 +02:00
Hiroshi Miura
990a4bcd9d test mingw with py7zr
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-02-21 10:56:01 +09:00
Hiroshi Miura
2b5ef5b154 Test external command for mingw
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-02-11 10:37:20 +09:00
Hiroshi Miura
fb28712de8 Add option to add all extra modules (#79)
* Add all extra modules installation feature

implement #75

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-01-07 12:26:45 +09:00
Hiroshi Miura
25ec1c6058 CI: update wasm emsdk version (#78)
* CI: update wasm emsdk version

Fix broken link and ask to install latest with fastcomp backend

* CI: Test wasm on Qt 5.14.0

Signed-off-by: Hiroshi Miura <miurahr@linux.com>

* CI: Update openssl version

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2020-01-07 07:16:10 +09:00
Hiroshi Miura
a11350c257 CI: Module option(-m) accept multiple argument
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2019-11-24 09:05:36 +09:00
Hiroshi Miura
891305cd82 Update test for modules list
- Update related document too

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2019-11-24 09:00:38 +09:00
Skycoder42
150423fd83 add extended android support
Add x64 for <5.14 and multiarch for >=5.14
2019-11-18 09:02:17 +01:00
Hiroshi Miura
73ba2b67de Support wasm components installation (#55)
* Support for WebAssembler

- Qt 5.12 provide tech preview for wasm, and 5.13 and later it supports.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2019-11-16 23:44:50 +09:00
Felix Barz
3c96207217 Merge branch 'master' into topic-extra-component 2019-11-16 13:52:19 +01:00
Hiroshi Miura
c85c9d0112 Support explicit spec for extra modules
Original commit by: Hiroshi Miura <miurahr@linux.com>
2019-11-16 13:40:13 +01:00
Hiroshi Miura
9ded39846d Improve key name on Azure
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2019-11-16 19:02:37 +09:00
Hiroshi Miura
e937dff283 Add CI test for tool installation (#47)
* Test: Update target Qt versions
* Add tools test
* tools: fix errors

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2019-10-08 09:26:24 +09:00
Hiroshi Miura
fd8ec2d55a Move ci script in ci folder
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
2019-06-02 10:14:56 +09:00