Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/actions/install-qt/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Install Qt
description: >-
Install the Qt 5 archives that Plus needs with jurplel/install-qt-action,
restored from the actions cache when an entry exists. Shared by the VTK and
Plus build workflows so that both use the same archive list and therefore
the same cache key.

inputs:
arch:
description: Build architecture, x64 or Win32
required: true
version:
description: Qt version to install
required: false
default: '5.15.0'

runs:
using: composite
steps:
# aqtinstall downloads each archive from a geo-selected mirror and, on a
# timeout, tries exactly one random fallback mirror before giving up. Give
# slow mirrors more time, skip the mirrors that have failed nightly builds
# (ftp1/ftp2.nluug.nl serve a certificate for a different hostname), and
# avoid the slow mirror that download.qt.io redirects the runners to.
- name: Configure aqtinstall
shell: bash
run: |
cat > "$RUNNER_TEMP/aqt.ini" <<'EOF'
[requests]
connection_timeout : 10
response_timeout : 120
max_retries_on_connection_error : 10
[mirrors]
blacklist :
https://mirror.ossplanet.net
fallbacks :
https://ftp.fau.de/qtproject/
https://mirror.netcologne.de/qtproject/
https://mirrors.dotsrc.org/qtproject/
https://master.qt.io/
https://qt.mirror.constant.com/
https://mirrors.ukfast.co.uk/sites/qt.io/
EOF
echo "AQT_CONFIG=$RUNNER_TEMP/aqt.ini" >> "$GITHUB_ENV"

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
dir: ${{ github.workspace }}/Qt
version: ${{ inputs.version }}
arch: ${{ inputs.arch == 'x64' && 'win64_msvc2019_64' || 'win32_msvc2019' }}
# Only the archives Plus links against (Core/Gui/Widgets/OpenGL/Sql/
# Concurrent/Network/Test/Xml come from qtbase; Designer from qttools;
# Quick/Qml from qtdeclarative for VTK's GUISupportQtQuick module, which
# find_package(VTK) requires even though Plus does not use it) plus what
# windeployqt bundles. Cuts the download from 27 archives to 9 and keeps
# the cache entry small.
archives: qtbase qttools qtxmlpatterns qtmultimedia qtdeclarative qttranslations d3dcompiler_47 opengl32sw
# Restore the Qt directory from the actions cache so that only the first
# job per architecture downloads Qt at all.
cache: true
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
# "/" only covers .github/workflows; local composite actions have to be
# listed separately for their "uses:" lines to be updated too.
directories:
- "/"
- "/.github/actions/*"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/build-plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,19 @@ jobs:
with:
cmakeVersion: 4.3.4

# The job never checks out PlusLib itself (the superbuild clones it), so
# fetch just the local actions used below.
- name: Checkout CI actions
uses: actions/checkout@v7
with:
sparse-checkout: .github/actions
path: pluslib-ci

- name: Install Qt
uses: jurplel/install-qt-action@v4
uses: ./pluslib-ci/.github/actions/install-qt
with:
dir: ${{ github.workspace }}/Qt
arch: ${{ inputs.arch }}
version: ${{ inputs.qt-version }}
arch: ${{ inputs.arch == 'x64' && 'win64_msvc2019_64' || 'win32_msvc2019' }}

- name: Install NSIS
uses: repolevedavaj/install-nsis@v1.3.0
Expand Down Expand Up @@ -183,11 +190,22 @@ jobs:
}
# -M/-T is used instead of -D so that the Nightly model does not run an
# Update step, which would move the checkout to the nightly start time.
ctest -C Release -M ${{ inputs.dashboard-model }} -T Start -T Configure -T Build -T Test -T Submit -V
ctest -C Release -M ${{ inputs.dashboard-model }} -T Start -T Configure -T Build -T Test -V
if ($LASTEXITCODE -ne 0) {
throw "CTest failed with exit code $LASTEXITCODE"
}

# Separate from the build step so that a CDash outage cannot fail the job.
- name: Submit build results to CDash
continue-on-error: true
shell: pwsh
working-directory: ${{ github.workspace }}/build
run: |
ctest -M ${{ inputs.dashboard-model }} -T Submit
if ($LASTEXITCODE -ne 0) {
throw "CDash submission failed with exit code $LASTEXITCODE"
}

# The runners have no GPU, so VTK cannot create a render window. Tests that
# generate report plots (the calibration algorithm tests) crash without a
# software OpenGL implementation. This installs Mesa system-wide.
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/build-vtk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,21 @@ jobs:
with:
cmakeVersion: 4.3.4

# The job never checks out PlusLib itself (the superbuild clones it), so
# fetch just the local actions used below.
- name: Checkout CI actions
if: steps.cache-vtk.outputs.cache-hit != 'true'
uses: actions/checkout@v7
with:
sparse-checkout: .github/actions
path: pluslib-ci

- name: Install Qt
if: steps.cache-vtk.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v4
uses: ./pluslib-ci/.github/actions/install-qt
with:
dir: ${{github.workspace}}/Qt
arch: ${{ inputs.arch }}
version: '5.15.0'
arch: ${{ inputs.arch == 'x64' && 'win64_msvc2019_64' || 'win32_msvc2019' }}

- name: Clone VTK
if: steps.cache-vtk.outputs.cache-hit != 'true'
Expand Down
Loading