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
9 changes: 7 additions & 2 deletions .github/workflows/LinuxInstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ permissions:

jobs:
build_ubuntu:
runs-on: ubuntu-24.04
# linuxdeployqt is pinned to a glibc-2.35-compatible build. Keep the
# packaging runner aligned with that oldest-supported deployment tool.
runs-on: ubuntu-22.04
env:
VCPKG_OVERLAY_PORTS: ${{ github.workspace }}/loupe/vcpkg/overlays/linux:${{ github.workspace }}/loupe/vcpkg/overlays/general
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg-binary-cache
GNUPGHOME: ${{ github.workspace }}/gnupg
QT_QPA_PLATFORM: offscreen

Expand Down Expand Up @@ -129,6 +132,7 @@ jobs:

./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg integrate install
echo "VCPKG_BINARY_SOURCES=clear;files,$VCPKG_DEFAULT_BINARY_CACHE,readwrite" >> "$GITHUB_ENV"

- name: 'VCPKG: Cache vcpkg dependencies'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
Expand All @@ -137,6 +141,7 @@ jobs:
./vcpkg/downloads
./vcpkg/packages
./vcpkg_installed
./vcpkg-binary-cache
key: ${{ runner.os }}-vcpkg-v2-${{ hashFiles('**/vcpkg.json', '**/vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-v2-
Expand All @@ -162,7 +167,7 @@ jobs:
working-directory: loupe
run: |
cmake -B build -S . -DLOUPE_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_VCPKG_BUILD_TYPE=Release -DLOUPE_INSTALL_TO_USR=ON -DLOUPE_LOUPE_DISTRIBUTION=ON -DLOUPE_PLUGIN_OCR=OFF -DLOUPE_BUILD_PRODUCT_QUICK_A11Y_SMOKE=ON
cmake --build build --target all release_translations -j6
cmake --build build --target LoupeEditor PdfTool ProductQuickAccessibilitySmoke release_translations -j6
cmake --install build
pwsh ./scripts/verify-loupe-surface.ps1 -InstallDir "$GITHUB_WORKSPACE/loupe/build/install" -Profile loupe-release -BuildDir build -InstallManifestPath build/install_manifest.txt

Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/WindowsInstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,16 @@ jobs:
cd vcpkg
.\bootstrap-vcpkg.bat -disableMetrics
.\vcpkg integrate install
set VCPKG_ROOT=${env:GITHUB_WORKSPACE}\vcpkg\
set "VCPKG_BINARY_SOURCES=clear;files,${env:GITHUB_WORKSPACE}\vcpkg\archives,readwrite"
"VCPKG_BINARY_SOURCES=clear;files,$env:GITHUB_WORKSPACE\vcpkg-binary-cache,readwrite" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: 'VCPKG: Cache vcpkg dependencies'
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
./vcpkg/downloads
./vcpkg/packages
./vcpkg/installed
./vcpkg/archives
./vcpkg_installed
./vcpkg-binary-cache
key: ${{ runner.os }}-vcpkg-v2-${{ hashFiles('**/vcpkg.json', '**/vcpkg-configuration.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-v2-
Expand Down Expand Up @@ -251,9 +250,7 @@ jobs:
shell: pwsh
run: |
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_VCPKG_BUILD_TYPE=Release -DLOUPE_INSTALL_QT_DEPENDENCIES=ON -DLOUPE_INSTALL_DEPENDENCIES=ON -DCMAKE_TOOLCHAIN_FILE="${env:GITHUB_WORKSPACE}\vcpkg\scripts\buildsystems\vcpkg.cmake" -DLOUPE_QT_ROOT="${env:QT_ROOT_DIR}" -DLOUPE_INSTALL_MSVC_REDISTRIBUTABLE=ON -DLOUPE_INSTALL_PREPARE_WIX_INSTALLER=ON -DLOUPE_INSTALL_TO_USR=ON -DLOUPE_LOUPE_DISTRIBUTION=ON -DLOUPE_PLUGIN_OCR=OFF -DLOUPE_BUNDLE_OCR_SERVICE=OFF -DLOUPE_BUILD_PRODUCT_QUICK_A11Y_SMOKE=ON
cmake --build build --target release_translations --config Release -j6
cmake --build build --config Release -j6
ctest --test-dir build -C Release --output-on-failure
cmake --build build --target LoupeEditor PdfTool ProductQuickAccessibilitySmoke release_translations --config Release -j6
cmake --install build --config Release
.\scripts\verify-loupe-surface.ps1 -InstallDir "${env:GITHUB_WORKSPACE}\loupe\build\install\usr\bin" -Profile loupe-release -BuildDir .\build -InstallManifestPath .\build\install_manifest.txt

Expand Down Expand Up @@ -283,6 +280,18 @@ jobs:
throw "windeployqt failed for $name with exit code $exitCode"
}
}

# The clean installed-artifact smoke intentionally removes developer
# Qt environment variables. Make the staged tree self-describing so
# Qt resolves its bundled QML imports and plugins without the runner's
# Qt installation.
@"
[Paths]
Prefix=.
Plugins=.
Qml2Imports=qml
"@ | Set-Content -LiteralPath (Join-Path $installBin "qt.conf") -Encoding ascii
Copy-Item -LiteralPath (Join-Path $installBin "qt.conf") -Destination (Join-Path $evidenceDir "qt.conf")
env:
VCToolsRedistDir: ${{ env.VCToolsRedistDir }}
VSCMD_ARG_TGT_ARCH: ${{ env.VSCMD_ARG_TGT_ARCH }}
Expand Down
4 changes: 4 additions & 0 deletions changes/cdx-session-07-package-boundary-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Category: internal
Audience: developers
Breaking-Change: no
Summary: Align Linux package deployment with the pinned linuxdeployqt glibc floor and make the Windows staged Qt runtime self-describing for clean installed-artifact smoke.
15 changes: 15 additions & 0 deletions scripts/ci/test_workflow_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,27 @@ def test_package_workflows_require_and_record_exact_source_sha(self):
self.assertIn("./vcpkg/vcpkg integrate install", linux)
self.assertNotIn("./vcpkg integrate install", linux)
self.assertIn("libfontconfig1-dev", linux)
self.assertIn("runs-on: ubuntu-22.04", linux)
self.assertIn("VCPKG_DEFAULT_BINARY_CACHE", linux)
self.assertIn("VCPKG_BINARY_SOURCES=clear;files", linux)
self.assertIn("./vcpkg-binary-cache", linux)
self.assertIn("cmake --build build --target LoupeEditor PdfTool ProductQuickAccessibilitySmoke release_translations -j6", linux)
self.assertNotIn("--target all", linux)
self.assertNotIn("ctest --test-dir build", linux)
self.assertIn("Deploy Qt runtime closure to staged install tree", windows)
self.assertIn("windeployqt.exe", windows)
self.assertIn("--no-compiler-runtime", windows)
self.assertIn("--qmldir", windows)
self.assertIn("windeployqt-$name.txt", windows)
self.assertIn("LoupeEditor.exe", windows)
self.assertIn("Qml2Imports=qml", windows)
self.assertIn('Join-Path $installBin "qt.conf"', windows)
self.assertIn("VCPKG_BINARY_SOURCES=clear;files", windows)
self.assertIn("./vcpkg_installed", windows)
self.assertIn("./vcpkg-binary-cache", windows)
self.assertIn("cmake --build build --target LoupeEditor PdfTool ProductQuickAccessibilitySmoke release_translations --config Release -j6", windows)
self.assertNotIn("--target all", windows)
self.assertNotIn("ctest --test-dir build", windows)
self.assertIn("--appimage-extract-and-run", linux)
self.assertIn("linuxdeployqt.txt", linux)
for workflow in (linux, windows):
Expand Down
Loading