Skip to content

Commit b0a26e3

Browse files
authored
Merge pull request #179 from ddalcino/topic/add-src-doc-examples
Add options to install source, docs, and examples
2 parents ecc7eab + 2a2a30b commit b0a26e3

File tree

5 files changed

+287
-63
lines changed

5 files changed

+287
-63
lines changed

.github/workflows/test.yml

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
- macos-12
3838
aqtversion:
3939
- null # use whatever the default is
40+
src-doc-examples:
41+
- false
4042
qt:
4143
- version: "5.9.0"
4244
requested: "5.9.0"
@@ -48,12 +50,31 @@ jobs:
4850
requested: "6.3.*"
4951
# In Qt 6.2.0+, qtwebengine requires qtpositioning and qtwebchannel
5052
modules: qtwebengine qtpositioning qtwebchannel
51-
- version: null # Tools-only build
52-
requested: null
53+
- tools-only-build: true
5354
cache:
5455
- cached
5556
- uncached
5657
include:
58+
- os: ubuntu-20.04
59+
src-doc-examples: true
60+
source: true
61+
src-archives: qtcharts
62+
check-dir: ../Qt/5.15.2/Src
63+
check: qtcharts/src/src.pro
64+
- os: ubuntu-20.04
65+
src-doc-examples: true
66+
documentation: true
67+
doc-archives: qmake
68+
doc-modules: qtcharts qtwebengine
69+
check-dir: ../Qt/Docs/Qt-5.15.2
70+
check: qmake/qmake-tutorial.html qtcharts/qtcharts-index.html qtwebengine/qtwebengine-index.html
71+
- os: ubuntu-20.04
72+
src-doc-examples: true
73+
examples: true
74+
example-archives: qtsensors
75+
example-modules: qtcharts qtwebengine
76+
check-dir: ../Qt/Examples/Qt-5.15.2
77+
check: charts/charts.pro sensors/sensors.pro webengine/webengine.pro
5778
- os: ubuntu-22.04
5879
aqtversion: "==3.1.*"
5980
qt:
@@ -124,16 +145,52 @@ jobs:
124145
qmake
125146
shell: bash
126147

148+
- name: Install source
149+
if: ${{ matrix.source }}
150+
uses: ./
151+
with:
152+
version: "5.15.2"
153+
source: true
154+
no-qt-binaries: true
155+
src-archives: ${{ matrix.src-archives }}
156+
157+
- name: Install docs
158+
if: ${{ matrix.documentation }}
159+
uses: ./
160+
with:
161+
version: "5.15.2"
162+
documentation: true
163+
no-qt-binaries: true
164+
doc-archives: ${{ matrix.doc-archives }}
165+
doc-modules: ${{ matrix.doc-modules }}
166+
167+
- name: Install examples
168+
if: ${{ matrix.examples }}
169+
uses: ./
170+
with:
171+
version: "5.15.2"
172+
examples: true
173+
no-qt-binaries: true
174+
example-archives: ${{ matrix.example-archives }}
175+
example-modules: ${{ matrix.example-modules }}
176+
177+
- name: Test source, docs, examples
178+
if: ${{ matrix.src-doc-examples }}
179+
shell: bash
180+
run: |
181+
cd ${{ matrix.check-dir }}
182+
ls ${{ matrix.check }}
183+
127184
- name: Install tools with options
128-
if: ${{ !matrix.qt.version }}
185+
if: ${{ matrix.qt.tools-only-build }}
129186
uses: ./
130187
with:
131188
tools-only: true
132189
tools: tools_ifw tools_qtcreator,qt.tools.qtcreator
133190
cache: ${{ matrix.cache == 'cached' }}
134191

135192
- name: Test installed tools
136-
if: ${{ !matrix.qt.version }}
193+
if: ${{ matrix.qt.tools-only-build }}
137194
env:
138195
# Conditionally set qtcreator path based on os:
139196
QTCREATOR_BIN_PATH: ${{ startsWith(matrix.os, 'macos') && '../Qt/Qt Creator.app/Contents/MacOS/' || '../Qt/Tools/QtCreator/bin/' }}

README.md

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,95 @@ For example, this value will install the most recent versions of QtIFW and QtCre
118118

119119
You can find a full list of tools easily by using [this awesome website](https://ddalcino.github.io/aqt-list-server/).
120120

121+
### `source`
122+
123+
Set this to `true` to install Qt source code. Incompatible with `aqtinstall < 2.0.4`.
124+
125+
Default: `false`
126+
127+
### `src-archives`
128+
129+
String with whitespace delimited list of source archives to install, with each entry separated by a space.
130+
Has no effect unless `source` is set to `true`.
131+
Useful to limit download size.
132+
133+
See the `--archives` flag for [aqt install-src](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-src-command) for more details.
134+
Use [aqt list-src](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-src-command) to see available options.
135+
136+
Default: none
137+
138+
### `documentation`
139+
140+
Set this to `true` to install Qt documentation files. Incompatible with `aqtinstall < 2.0.4`.
141+
142+
Default: `false`
143+
144+
### `doc-archives`
145+
146+
String with whitespace delimited list of documentation archives to install, with each entry separated by a space.
147+
Has no effect unless `documentation` is set to `true`.
148+
Useful to limit download size.
149+
150+
See the `--archives` flag for [aqt install-doc](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-doc-command) for more details.
151+
Use [aqt list-doc](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-doc-command) to see available options.
152+
153+
Default: none
154+
155+
### `doc-modules`
156+
157+
String with whitespace delimited list of documentation modules to install, with each entry separated by a space.
158+
Has no effect unless `documentation` is set to `true`.
159+
Each module contains extra documentation not included with the base installation.
160+
161+
See the `--modules` flag for [aqt install-doc](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-doc-command) for more details.
162+
Use [aqt list-doc](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-doc-command) to see available options.
163+
164+
Default: none
165+
166+
### `examples`
167+
168+
Set this to `true` to install Qt example code. Incompatible with `aqtinstall < 2.0.4`.
169+
170+
Default: `false`
171+
172+
### `example-archives`
173+
174+
String with whitespace delimited list of example archives to install, with each entry separated by a space.
175+
Has no effect unless `examples` is set to `true`.
176+
Useful to limit download size.
177+
178+
See the `--archives` flag for [aqt install-example](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-example-command) for more details.
179+
Use [aqt list-example](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-example-command) to see available options.
180+
181+
Default: none
182+
183+
### `example-modules`
184+
185+
String with whitespace delimited list of example modules to install, with each entry separated by a space.
186+
Has no effect unless `examples` is set to `true`.
187+
Each module contains extra examples not included with the base installation.
188+
189+
See the `--modules` flag for [aqt install-example](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-example-command) for more details.
190+
Use [aqt list-example](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-example-command) to see available options.
191+
192+
Default: none
193+
121194
### `set-env`
122195
Set this to false if you want to avoid setting environment variables for whatever reason.
123196

124197
Default: `true`
125198

199+
### `no-qt-binaries`
200+
201+
Set this to true if you want to skip installing Qt.
202+
This option is useful if you want to install tools, source, documentation, or examples.
203+
204+
Default: `false`
205+
126206
### `tools-only`
127207

128-
Set this to true if you only want to install tools, and not Qt.
208+
This is a synonym for `no-qt-binaries`. It only exists to preserve backwards compatibility.
209+
If you set either `no-qt-binaries` or `tools-only` to `true`, you will skip installation of Qt.
129210

130211
Default: `false`
131212

action.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ inputs:
4242
set-env:
4343
default: true
4444
description: Whether or not to set environment variables after running aqtinstall
45+
no-qt-binaries:
46+
description: Turns off installation of Qt. Useful for installing tools, source, documentation, or examples.
47+
default: false
4548
tools-only:
46-
description: Whether or not to actually install Qt or just the tools from the tools argument
49+
description: Synonym for `no-qt-binaries`, used for backwards compatibility.
4750
default: false
4851
aqtversion:
4952
description: Version of aqtinstall to use in case of issues
@@ -53,6 +56,25 @@ inputs:
5356
default: ==0.19.*
5457
extra:
5558
description: Any extra arguments to append to the back
59+
source:
60+
default: false
61+
description: Whether or not to install Qt source code.
62+
src-archives:
63+
description: Space-separated list of .7z source archives to install. Used to reduce download/image sizes.
64+
documentation:
65+
default: false
66+
description: Whether or not to install Qt documentation.
67+
doc-archives:
68+
description: Space-separated list of .7z docs archives to install. Used to reduce download/image sizes.
69+
doc-modules:
70+
description: Space-separated list of additional documentation modules to install.
71+
examples:
72+
default: false
73+
description: Whether or not to install Qt example code.
74+
example-archives:
75+
description: Space-separated list of .7z example archives to install. Used to reduce download/image sizes.
76+
example-modules:
77+
description: Space-separated list of additional example modules to install.
5678
runs:
5779
using: "composite"
5880
steps:
@@ -77,7 +99,16 @@ runs:
7799
cache-key-prefix: ${{ inputs.cache-key-prefix }}
78100
tools: ${{ inputs.tools }}
79101
set-env: ${{ inputs.set-env }}
102+
no-qt-binaries: ${{ inputs.no-qt-binaries }}
80103
tools-only: ${{ inputs.tools-only }}
81104
aqtversion: ${{ inputs.aqtversion }}
82105
py7zrversion: ${{ inputs.py7zrversion }}
106+
source: ${{ inputs.source }}
107+
src-archives: ${{ inputs.src-archives }}
108+
documentation: ${{ inputs.documentation }}
109+
doc-archives: ${{ inputs.doc-archives }}
110+
doc-modules: ${{ inputs.doc-modules }}
111+
examples: ${{ inputs.examples }}
112+
example-archives: ${{ inputs.example-archives }}
113+
example-modules: ${{ inputs.example-modules }}
83114
extra: ${{ inputs.extra }}

action/action.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ inputs:
3939
set-env:
4040
default: true
4141
description: Whether or not to set environment variables after running aqtinstall
42+
no-qt-binaries:
43+
description: Turns off installation of Qt. Useful for installing tools, source, documentation, or examples.
44+
default: false
4245
tools-only:
43-
description: Whether or not to actually install Qt or just the tools from the tools argument
46+
description: Synonym for `no-qt-binaries`, used for backwards compatibility.
4447
default: false
4548
aqtversion:
4649
description: Version of aqtinstall to use in case of issues
@@ -50,6 +53,25 @@ inputs:
5053
default: ==0.19.*
5154
extra:
5255
description: Any extra arguments to append to the back
56+
source:
57+
default: false
58+
description: Whether or not to install Qt source code.
59+
src-archives:
60+
description: Space-separated list of .7z source archives to install. Used to reduce download/image sizes.
61+
documentation:
62+
default: false
63+
description: Whether or not to install Qt documentation.
64+
doc-archives:
65+
description: Space-separated list of .7z docs archives to install. Used to reduce download/image sizes.
66+
doc-modules:
67+
description: Space-separated list of additional documentation modules to install.
68+
examples:
69+
default: false
70+
description: Whether or not to install Qt example code.
71+
example-archives:
72+
description: Space-separated list of .7z example archives to install. Used to reduce download/image sizes.
73+
example-modules:
74+
description: Space-separated list of additional example modules to install.
5375
runs:
5476
using: node16
5577
main: lib/main.js

0 commit comments

Comments
 (0)