Skip to content

Commit

Permalink
Merge pull request #179 from ddalcino/topic/add-src-doc-examples
Browse files Browse the repository at this point in the history
Add options to install source, docs, and examples
  • Loading branch information
jurplel authored May 13, 2023
2 parents ecc7eab + 2a2a30b commit b0a26e3
Show file tree
Hide file tree
Showing 5 changed files with 287 additions and 63 deletions.
65 changes: 61 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
- macos-12
aqtversion:
- null # use whatever the default is
src-doc-examples:
- false
qt:
- version: "5.9.0"
requested: "5.9.0"
Expand All @@ -48,12 +50,31 @@ jobs:
requested: "6.3.*"
# In Qt 6.2.0+, qtwebengine requires qtpositioning and qtwebchannel
modules: qtwebengine qtpositioning qtwebchannel
- version: null # Tools-only build
requested: null
- tools-only-build: true
cache:
- cached
- uncached
include:
- os: ubuntu-20.04
src-doc-examples: true
source: true
src-archives: qtcharts
check-dir: ../Qt/5.15.2/Src
check: qtcharts/src/src.pro
- os: ubuntu-20.04
src-doc-examples: true
documentation: true
doc-archives: qmake
doc-modules: qtcharts qtwebengine
check-dir: ../Qt/Docs/Qt-5.15.2
check: qmake/qmake-tutorial.html qtcharts/qtcharts-index.html qtwebengine/qtwebengine-index.html
- os: ubuntu-20.04
src-doc-examples: true
examples: true
example-archives: qtsensors
example-modules: qtcharts qtwebengine
check-dir: ../Qt/Examples/Qt-5.15.2
check: charts/charts.pro sensors/sensors.pro webengine/webengine.pro
- os: ubuntu-22.04
aqtversion: "==3.1.*"
qt:
Expand Down Expand Up @@ -124,16 +145,52 @@ jobs:
qmake
shell: bash

- name: Install source
if: ${{ matrix.source }}
uses: ./
with:
version: "5.15.2"
source: true
no-qt-binaries: true
src-archives: ${{ matrix.src-archives }}

- name: Install docs
if: ${{ matrix.documentation }}
uses: ./
with:
version: "5.15.2"
documentation: true
no-qt-binaries: true
doc-archives: ${{ matrix.doc-archives }}
doc-modules: ${{ matrix.doc-modules }}

- name: Install examples
if: ${{ matrix.examples }}
uses: ./
with:
version: "5.15.2"
examples: true
no-qt-binaries: true
example-archives: ${{ matrix.example-archives }}
example-modules: ${{ matrix.example-modules }}

- name: Test source, docs, examples
if: ${{ matrix.src-doc-examples }}
shell: bash
run: |
cd ${{ matrix.check-dir }}
ls ${{ matrix.check }}
- name: Install tools with options
if: ${{ !matrix.qt.version }}
if: ${{ matrix.qt.tools-only-build }}
uses: ./
with:
tools-only: true
tools: tools_ifw tools_qtcreator,qt.tools.qtcreator
cache: ${{ matrix.cache == 'cached' }}

- name: Test installed tools
if: ${{ !matrix.qt.version }}
if: ${{ matrix.qt.tools-only-build }}
env:
# Conditionally set qtcreator path based on os:
QTCREATOR_BIN_PATH: ${{ startsWith(matrix.os, 'macos') && '../Qt/Qt Creator.app/Contents/MacOS/' || '../Qt/Tools/QtCreator/bin/' }}
Expand Down
83 changes: 82 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,95 @@ For example, this value will install the most recent versions of QtIFW and QtCre

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

### `source`

Set this to `true` to install Qt source code. Incompatible with `aqtinstall < 2.0.4`.

Default: `false`

### `src-archives`

String with whitespace delimited list of source archives to install, with each entry separated by a space.
Has no effect unless `source` is set to `true`.
Useful to limit download size.

See the `--archives` flag for [aqt install-src](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-src-command) for more details.
Use [aqt list-src](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-src-command) to see available options.

Default: none

### `documentation`

Set this to `true` to install Qt documentation files. Incompatible with `aqtinstall < 2.0.4`.

Default: `false`

### `doc-archives`

String with whitespace delimited list of documentation archives to install, with each entry separated by a space.
Has no effect unless `documentation` is set to `true`.
Useful to limit download size.

See the `--archives` flag for [aqt install-doc](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-doc-command) for more details.
Use [aqt list-doc](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-doc-command) to see available options.

Default: none

### `doc-modules`

String with whitespace delimited list of documentation modules to install, with each entry separated by a space.
Has no effect unless `documentation` is set to `true`.
Each module contains extra documentation not included with the base installation.

See the `--modules` flag for [aqt install-doc](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-doc-command) for more details.
Use [aqt list-doc](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-doc-command) to see available options.

Default: none

### `examples`

Set this to `true` to install Qt example code. Incompatible with `aqtinstall < 2.0.4`.

Default: `false`

### `example-archives`

String with whitespace delimited list of example archives to install, with each entry separated by a space.
Has no effect unless `examples` is set to `true`.
Useful to limit download size.

See the `--archives` flag for [aqt install-example](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-example-command) for more details.
Use [aqt list-example](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-example-command) to see available options.

Default: none

### `example-modules`

String with whitespace delimited list of example modules to install, with each entry separated by a space.
Has no effect unless `examples` is set to `true`.
Each module contains extra examples not included with the base installation.

See the `--modules` flag for [aqt install-example](https://aqtinstall.readthedocs.io/en/latest/cli.html#install-example-command) for more details.
Use [aqt list-example](https://aqtinstall.readthedocs.io/en/latest/cli.html#list-example-command) to see available options.

Default: none

### `set-env`
Set this to false if you want to avoid setting environment variables for whatever reason.

Default: `true`

### `no-qt-binaries`

Set this to true if you want to skip installing Qt.
This option is useful if you want to install tools, source, documentation, or examples.

Default: `false`

### `tools-only`

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

Default: `false`

Expand Down
33 changes: 32 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ inputs:
set-env:
default: true
description: Whether or not to set environment variables after running aqtinstall
no-qt-binaries:
description: Turns off installation of Qt. Useful for installing tools, source, documentation, or examples.
default: false
tools-only:
description: Whether or not to actually install Qt or just the tools from the tools argument
description: Synonym for `no-qt-binaries`, used for backwards compatibility.
default: false
aqtversion:
description: Version of aqtinstall to use in case of issues
Expand All @@ -53,6 +56,25 @@ inputs:
default: ==0.19.*
extra:
description: Any extra arguments to append to the back
source:
default: false
description: Whether or not to install Qt source code.
src-archives:
description: Space-separated list of .7z source archives to install. Used to reduce download/image sizes.
documentation:
default: false
description: Whether or not to install Qt documentation.
doc-archives:
description: Space-separated list of .7z docs archives to install. Used to reduce download/image sizes.
doc-modules:
description: Space-separated list of additional documentation modules to install.
examples:
default: false
description: Whether or not to install Qt example code.
example-archives:
description: Space-separated list of .7z example archives to install. Used to reduce download/image sizes.
example-modules:
description: Space-separated list of additional example modules to install.
runs:
using: "composite"
steps:
Expand All @@ -77,7 +99,16 @@ runs:
cache-key-prefix: ${{ inputs.cache-key-prefix }}
tools: ${{ inputs.tools }}
set-env: ${{ inputs.set-env }}
no-qt-binaries: ${{ inputs.no-qt-binaries }}
tools-only: ${{ inputs.tools-only }}
aqtversion: ${{ inputs.aqtversion }}
py7zrversion: ${{ inputs.py7zrversion }}
source: ${{ inputs.source }}
src-archives: ${{ inputs.src-archives }}
documentation: ${{ inputs.documentation }}
doc-archives: ${{ inputs.doc-archives }}
doc-modules: ${{ inputs.doc-modules }}
examples: ${{ inputs.examples }}
example-archives: ${{ inputs.example-archives }}
example-modules: ${{ inputs.example-modules }}
extra: ${{ inputs.extra }}
24 changes: 23 additions & 1 deletion action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ inputs:
set-env:
default: true
description: Whether or not to set environment variables after running aqtinstall
no-qt-binaries:
description: Turns off installation of Qt. Useful for installing tools, source, documentation, or examples.
default: false
tools-only:
description: Whether or not to actually install Qt or just the tools from the tools argument
description: Synonym for `no-qt-binaries`, used for backwards compatibility.
default: false
aqtversion:
description: Version of aqtinstall to use in case of issues
Expand All @@ -50,6 +53,25 @@ inputs:
default: ==0.19.*
extra:
description: Any extra arguments to append to the back
source:
default: false
description: Whether or not to install Qt source code.
src-archives:
description: Space-separated list of .7z source archives to install. Used to reduce download/image sizes.
documentation:
default: false
description: Whether or not to install Qt documentation.
doc-archives:
description: Space-separated list of .7z docs archives to install. Used to reduce download/image sizes.
doc-modules:
description: Space-separated list of additional documentation modules to install.
examples:
default: false
description: Whether or not to install Qt example code.
example-archives:
description: Space-separated list of .7z example archives to install. Used to reduce download/image sizes.
example-modules:
description: Space-separated list of additional example modules to install.
runs:
using: node16
main: lib/main.js
Loading

0 comments on commit b0a26e3

Please sign in to comment.