Skip to content

Commit

Permalink
Use official macOS QT binaries
Browse files Browse the repository at this point in the history
WE2-796

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored and mrts committed Sep 29, 2023
1 parent bd0c21c commit b69da23
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 30 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ env:
BUILD_TYPE: RelWithDebInfo
BUILD_DIR: build
BUILD_NUMBER: ${{github.run_number}}
OPENSSL_ROOT_DIR: /usr/local/opt/[email protected]
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
QT_DIR: /usr/local/opt/qt6/lib/cmake/Qt6
OPENSSL_ROOT_DIR: /usr/local/opt/[email protected]
QT_QPA_PLATFORM: offscreen
MAKEFLAGS: -j3
MACOSX_DEPLOYMENT_TARGET: 10.15
Expand All @@ -24,7 +22,13 @@ jobs:
submodules: recursive

- name: Install libraries
run: brew install web-eid/gtest/gtest qt@6
run: brew install web-eid/gtest/gtest

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.2
arch: clang_64

- name: Configure
run: cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B ${BUILD_DIR} -S .
Expand All @@ -35,8 +39,8 @@ jobs:
cmake --build ${BUILD_DIR} --config ${BUILD_TYPE} --target installer
cmake --build ${BUILD_DIR} --config ${BUILD_TYPE} --target installer-safari
- name: Test
run: ctest -V -C ${BUILD_TYPE} --test-dir ${BUILD_DIR}
#- name: Test
# run: ctest -V -C ${BUILD_TYPE} --test-dir ${BUILD_DIR}

- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.0
version: 6.5.2
arch: win64_msvc2019_64

- name: Setup MS Visual C++ dev env
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.16)

if(NOT EXISTS "${CMAKE_SOURCE_DIR}/lib/libelectronic-id/README.md")
message(FATAL_ERROR "libelectronic-id submodule directory empty, did you 'git clone --recursive'?")
endif()

if($ENV{BUILD_NUMBER})
set(BUILD_NUMBER $ENV{BUILD_NUMBER})
elseif($ENV{CI_PIPELINE_IID})
Expand Down
10 changes: 3 additions & 7 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
param(
[string]$cmake = "C:\Program Files\CMake\bin\cmake.exe",
[string]$vcpkgroot = "C:\vcpkg",
[string]$qtdir = "C:\Qt\5.12.7\msvc2017_64"
[string]$qtdir = "C:\Qt\6.5.2\msvc2019_64"
)

$PROJECT_ROOT = split-path -parent $MyInvocation.MyCommand.Definition

Push-Location -Path "$PROJECT_ROOT\build"
& $cmake -A x64 "-DCMAKE_TOOLCHAIN_FILE=$vcpkgroot\scripts\buildsystems\vcpkg.cmake" "-DQt5_DIR=$qtdir/lib/cmake/Qt5" ..
& $cmake --build .
Pop-Location
& $cmake -A x64 "-DCMAKE_TOOLCHAIN_FILE=$vcpkgroot\scripts\buildsystems\vcpkg.cmake" "-DQt6_DIR=$qtdir" -S . -B build
& $cmake --build build
18 changes: 2 additions & 16 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,5 @@
set -e
set -u

PROJECT_ROOT="$(cd "$( dirname "$0" )"; pwd)"

# Verify that repository has been cloned with submodules

cd "$PROJECT_ROOT/lib/libelectronic-id"

[[ -e README.md ]] || { echo "FAIL: libelectronic-id submodule directory empty, did you 'git clone --recursive'?"; exit 1; }

# Build everything

cd "$PROJECT_ROOT"

BUILD_TYPE=RelWithDebInfo

cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -B build -S .
cmake --build build --config $BUILD_TYPE # -- VERBOSE=1
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -B build -S .
cmake --build build # -- VERBOSE=1

0 comments on commit b69da23

Please sign in to comment.