Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jurplel/install-qt-action
Browse files Browse the repository at this point in the history
  • Loading branch information
jurplel committed May 19, 2024
2 parents 128681b + e87490b commit 72c56a4
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ jobs:
env:
QT_VERSION: ${{ matrix.qt.version }}
run: |
if ($env:QT_VERSION -ge [version]"6.5.3") {
if ([version]$env:QT_VERSION -ge [version]"6.5.3") {
# GitHub macOS 13/14 runners use Xcode 15.0.x by default which has a known linker issue causing crashes if the artifact is run on macOS <= 12
sudo xcode-select --switch /Applications/Xcode_15.3.app
sudo xcode-select --switch /Applications/Xcode_15.2.app
} else {
# Keep older Qt versions on Xcode 14 due to concern over QTBUG-117484
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,12 @@ If you set either `no-qt-binaries` or `tools-only` to `true`, you will skip inst

Default: `false`

### `aqtsource`

The full specifier for a version of [aqtinstall](https://github.com/miurahr/aqtinstall) as passed to pip. For example: `git+https://github.com/miurahr/aqtinstall.git`. This is intended to be used to troubleshoot any bugs that might be caused or fixed by certain versions of aqtinstall. Note that when this is used, the value of `aqtversion` is ignored.

By default this is unset and ignored.

### `aqtversion`

Version of [aqtinstall](https://github.com/miurahr/aqtinstall) to use, given in the format used by pip, for example: `==0.7.1`, `>=0.7.1`, `==0.7.*`. This is intended to be used to troubleshoot any bugs that might be caused or fixed by certain versions of aqtinstall.
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ inputs:
tools-only:
description: Synonym for `no-qt-binaries`, used for backwards compatibility.
default: false
aqtsource:
description: Location to source aqtinstall from in case of issues
aqtversion:
description: Version of aqtinstall to use in case of issues
default: ==3.1.*
Expand Down Expand Up @@ -105,6 +107,7 @@ runs:
set-env: ${{ inputs.set-env }}
no-qt-binaries: ${{ inputs.no-qt-binaries }}
tools-only: ${{ inputs.tools-only }}
aqtsource: ${{ inputs.aqtsource }}
aqtversion: ${{ inputs.aqtversion }}
py7zrversion: ${{ inputs.py7zrversion }}
source: ${{ inputs.source }}
Expand Down
2 changes: 1 addition & 1 deletion action/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = {
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-loop-func": "error",
"@typescript-eslint/no-magic-numbers": ["error", { ignoreArrayIndexes: true }],
"@typescript-eslint/no-magic-numbers": ["error", { ignoreArrayIndexes: true, ignore: [0, 1] }],
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-restricted-imports": "error",
Expand Down
2 changes: 2 additions & 0 deletions action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ inputs:
tools-only:
description: Synonym for `no-qt-binaries`, used for backwards compatibility.
default: false
aqtsource:
description: Location to source aqtinstall from in case of issues
aqtversion:
description: Version of aqtinstall to use in case of issues
default: ==3.1.*
Expand Down
9 changes: 8 additions & 1 deletion action/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class Inputs {
readonly isInstallQtBinaries: boolean;
readonly setEnv: boolean;

readonly aqtSource: string;
readonly aqtVersion: string;
readonly py7zrVersion: string;

Expand Down Expand Up @@ -210,6 +211,7 @@ class Inputs {

this.setEnv = Inputs.getBoolInput("set-env");

this.aqtSource = core.getInput("aqtsource");
this.aqtVersion = core.getInput("aqtversion");

this.py7zrVersion = core.getInput("py7zrversion");
Expand Down Expand Up @@ -237,6 +239,7 @@ class Inputs {
this.version,
this.dir,
this.py7zrVersion,
this.aqtSource,
this.aqtVersion,
],
this.modules,
Expand Down Expand Up @@ -351,7 +354,11 @@ const run = async (): Promise<void> => {
await execPython("pip install", ["setuptools", "wheel", `"py7zr${inputs.py7zrVersion}"`]);

// Install aqtinstall separately: allows aqtinstall to override py7zr if required
await execPython("pip install", [`"aqtinstall${inputs.aqtVersion}"`]);
if (inputs.aqtSource.length > 0) {
await execPython("pip install", [`"${inputs.aqtSource}"`]);
} else {
await execPython("pip install", [`"aqtinstall${inputs.aqtVersion}"`]);
}

// This flag will install a parallel desktop version of Qt, only where required.
// aqtinstall will automatically determine if this is necessary.
Expand Down

0 comments on commit 72c56a4

Please sign in to comment.