Skip to content

Commit

Permalink
Build only Burn installer with single arch
Browse files Browse the repository at this point in the history
IB-7146

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored and mrts committed Jul 19, 2022
1 parent 437adea commit 0ac6248
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 72 deletions.
63 changes: 7 additions & 56 deletions .github/workflows/cmake-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ jobs:
- arch: x64
qt: win64_msvc2017_64
- suffix: qt6
qtver: 6.3.0
qtver: 6.3.1
arch: x64
qt: win64_msvc2019_64

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive

- name: Prepare vcpkg and libraries
uses: lukka/run-vcpkg@v7
with:
vcpkgArguments: gtest openssl
vcpkgTriplet: ${{ matrix.arch }}-windows
vcpkgTriplet: ${{matrix.arch}}-windows
vcpkgGitCommitId: 9b064ff07b987c8f213fdbf4358122fd4fe38ef1

- name: Install Qt
Expand All @@ -60,66 +60,17 @@ jobs:
run: |
cmake --build build --config ${env:BUILD_TYPE}
cmake --build build --config ${env:BUILD_TYPE} --target installer
cmake --build build --config ${env:BUILD_TYPE} --target bundle
- name: Test
if: matrix.arch == 'x64'
run: ctest -V -C ${env:BUILD_TYPE} --test-dir build

- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: web-eid-app-windows-build-${{github.run_number}}-${{ matrix.suffix }}
name: web-eid-app-windows-build-${{github.run_number}}-${{matrix.suffix}}
path: |
build/src/app/*.msi
build/**/*.pdb
bundle:
needs: build
runs-on: windows-2019
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive

- name: Prepare vcpkg and libraries
uses: lukka/run-vcpkg@v7
with:
vcpkgArguments: gtest openssl
vcpkgTriplet: x64-windows
vcpkgGitCommitId: 9b064ff07b987c8f213fdbf4358122fd4fe38ef1

- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: 5.12.12
arch: win64_msvc2017_64

- name: Setup MS Visual C++ dev env
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
toolset: 14.29

- name: Configure CMake
run: |
cmake "-GNinja" `
"-DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" `
"-DCMAKE_BUILD_TYPE=${env:BUILD_TYPE}" -S . -B build
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: web-eid-app-windows-build-${{github.run_number}}-qt5
path: build

- name: Build
run: |
cmake --build build --config ${env:BUILD_TYPE} --target bundle
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: web-eid-app-windows-build-${{github.run_number}}
path: |
build/src/app/*.exe
build/**/*.pdb
13 changes: 2 additions & 11 deletions install/plugins.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,8 @@
Key="SOFTWARE\Mozilla\NativeMessagingHosts\eu.webeid" Win64="yes"/>

<Chain>
<MsiPackage Id="WebEID.X86" InstallCondition="NOT VersionNT64" ForcePerMachine="yes"
SourceFile="$(var.webeid).x86.qt.msi" Compressed="yes">
<MsiProperty Name="APPLICATIONFOLDER" Value="[ProgramFilesFolder]Web eID"/>
<MsiProperty Name="CHROMEINSTALL" Value="[ChromeSupport]"/>
<MsiProperty Name="CHROMEPOLICY" Value="[ForceChromeExtensionActivation]"/>
<MsiProperty Name="EDGEINSTALL" Value="[EdgeSupport]"/>
<MsiProperty Name="EDGEPOLICY" Value="[ForceEdgeExtensionActivation]"/>
<MsiProperty Name="FIREFOXINSTALL" Value="[FirefoxSupport]"/>
</MsiPackage>
<MsiPackage Id="WebEID.X64" InstallCondition="VersionNT64" ForcePerMachine="yes"
SourceFile="$(var.webeid).x64.qt.msi" Compressed="yes">
<MsiPackage Id="WebEID" InstallCondition="VersionNT64" ForcePerMachine="yes"
SourceFile="$(var.webeid).qt.msi" Compressed="yes">
<MsiProperty Name="APPLICATIONFOLDER" Value="[ProgramFiles64Folder]Web eID"/>
<MsiProperty Name="CHROMEINSTALL" Value="[ChromeSupport]"/>
<MsiProperty Name="CHROMEPOLICY" Value="[ForceChromeExtensionActivation]"/>
Expand Down
9 changes: 4 additions & 5 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ if(WIN32)
get_filename_component(SSL_PATH "${OPENSSL_INCLUDE_DIR}/../bin" ABSOLUTE)
endif()
set(WEBEID_PATH web-eid.exe)
set(BASE_FILE $<TARGET_NAME:web-eid>_${PROJECT_VERSION})
set(MSI_FILE ${BASE_FILE}.${PLATFORM})
set(BASE_FILE $<TARGET_NAME:web-eid>_${PROJECT_VERSION}.${PLATFORM})
list(APPEND CANDLE_CMD "$ENV{WIX}bin\\candle.exe" -nologo -arch ${PLATFORM}
-dMSI_VERSION=${PROJECT_VERSION}
-dPlatform=${PLATFORM}
Expand All @@ -49,10 +48,10 @@ if(WIN32)
)
add_custom_target(installer DEPENDS web-eid
COMMAND ${CANDLE_CMD}
COMMAND ${LIGHT_CMD} -o "${MSI_FILE}.msi"
COMMAND ${LIGHT_CMD} -o "${BASE_FILE}.msi"
#Build MSI with QT
COMMAND ${CANDLE_CMD} -dqt_path=${qtCore_install_prefix} -dqt_version_major=${QT_VERSION_MAJOR}
COMMAND ${LIGHT_CMD} -o "${MSI_FILE}.qt.msi"
COMMAND ${LIGHT_CMD} -o "${BASE_FILE}.qt.msi"
WORKING_DIRECTORY $<TARGET_FILE_DIR:web-eid>
)
add_custom_target(bundle
Expand All @@ -69,7 +68,7 @@ if(WIN32)
COMMAND_EXPAND_LISTS
)
add_custom_command(TARGET installer POST_BUILD
COMMAND ${SIGNCMD} "${MSI_FILE}.msi" "${MSI_FILE}.qt.msi"
COMMAND ${SIGNCMD} "${BASE_FILE}.msi" "${BASE_FILE}.qt.msi"
WORKING_DIRECTORY $<TARGET_FILE_DIR:web-eid>
)
add_custom_command(TARGET bundle POST_BUILD
Expand Down

0 comments on commit 0ac6248

Please sign in to comment.