diff --git a/.github/workflows/ResInsightWithCache.yml b/.github/workflows/ResInsightWithCache.yml index eb516703e5..0a4c921d33 100644 --- a/.github/workflows/ResInsightWithCache.yml +++ b/.github/workflows/ResInsightWithCache.yml @@ -28,7 +28,9 @@ jobs: environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat", vcpkg-response-file: vcpkg_x64-windows.txt, vcpkg-triplet: x64-windows, - cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake' + cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake', + build-python-module: true, + execute-unit-tests: true } - { name: "Ubuntu 20.04", @@ -36,7 +38,9 @@ jobs: cc: "gcc", cxx: "g++", vcpkg-response-file: vcpkg_x64-linux.txt, vcpkg-triplet: x64-linux, - cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake' + cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake', + build-python-module: true, + execute-unit-tests: true } - { name: "Ubuntu 20.04 clang", @@ -44,7 +48,19 @@ jobs: cc: "clang", cxx: "clang++", vcpkg-response-file: vcpkg_x64-linux.txt, vcpkg-triplet: x64-linux, - cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake' + cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake', + build-python-module: true, + execute-unit-tests: true + } + - { + name: "Mac OS", + os: macos-latest, + cc: "clang", cxx: "clang++", + vcpkg-response-file: vcpkg_x64-osx.txt, + vcpkg-triplet: x64-osx, + cmake-toolchain: 'ThirdParty/vcpkg/scripts/buildsystems/vcpkg.cmake', + build-python-module: false, + execute-unit-tests: false } steps: - name: Checkout @@ -67,6 +83,8 @@ jobs: run: | if ("${{ runner.os }}" STREQUAL "Windows") set(buildcache_suffix "win-msvc.zip") + elseif ("${{ runner.os }}" STREQUAL "macOS") + set(buildcache_suffix "macos.zip") elseif ("${{ runner.os }}" STREQUAL "Linux") set(buildcache_suffix "linux.tar.gz") endif() @@ -128,7 +146,7 @@ jobs: with: VCPKGRESPONSEFILE: ${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }} - name: Restore from cache and install vcpkg - uses: lukka/run-vcpkg@v5 + uses: lukka/run-vcpkg@v7 id: runvcpkg with: vcpkgArguments: '@${{ github.workspace }}/${{ matrix.config.vcpkg-response-file }}' @@ -181,7 +199,7 @@ jobs: -D RESINSIGHT_BUNDLE_OPENSSL=true -D RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS=true -D RESINSIGHT_TREAT_WARNINGS_AS_ERRORS=true - -D RESINSIGHT_ENABLE_GRPC=true + -D RESINSIGHT_ENABLE_GRPC=${{ matrix.config.build-python-module }} -D RESINSIGHT_GRPC_PYTHON_EXECUTABLE=${{ steps.python-path.outputs.PYTHON_EXECUTABLE }} -D RESINSIGHT_GRPC_DOWNLOAD_PYTHON_MODULE=true -D CMAKE_TOOLCHAIN_FILE=${{ matrix.config.cmake-toolchain }} @@ -217,12 +235,13 @@ jobs: - name: Stats for buildcache run: ${{ github.workspace }}/buildcache/bin/buildcache -s - - name: Run Unit Tests + if: "matrix.config.execute-unit-tests == true" shell: bash run: | cmakebuild/ApplicationExeCode/ResInsight --unittest - name: Run pytest + if: "matrix.config.build-python-module == true" env: RESINSIGHT_EXECUTABLE: ${{ runner.workspace }}/ResInsight/cmakebuild/ApplicationExeCode/ResInsight run: | diff --git a/ApplicationLibCode/Commands/SsiHubImportCommands/RiuWellImportWizard.cpp b/ApplicationLibCode/Commands/SsiHubImportCommands/RiuWellImportWizard.cpp index 81069c63a1..17cb753607 100644 --- a/ApplicationLibCode/Commands/SsiHubImportCommands/RiuWellImportWizard.cpp +++ b/ApplicationLibCode/Commands/SsiHubImportCommands/RiuWellImportWizard.cpp @@ -76,7 +76,8 @@ RiuWellImportWizard::RiuWellImportWizard( const QString& webServiceAddress, SIGNAL( authenticationRequired( QNetworkReply*, QAuthenticator* ) ), this, SLOT( slotAuthenticationRequired( QNetworkReply*, QAuthenticator* ) ) ); -#ifndef QT_NO_OPENSSL + +#if !defined( QT_NO_OPENSSL ) && !defined( CVF_OSX ) connect( &m_networkAccessManager, SIGNAL( sslErrors( QNetworkReply*, QList ) ), this, @@ -305,7 +306,7 @@ void RiuWellImportWizard::slotAuthenticationRequired( QNetworkReply* networkRepl } } -#ifndef QT_NO_OPENSSL +#if !defined( QT_NO_OPENSSL ) && !defined( CVF_OSX ) void RiuWellImportWizard::sslErrors( QNetworkReply*, const QList& errors ) { QString errorString; @@ -340,7 +341,7 @@ void RiuWellImportWizard::startRequest( QUrl url ) { auto request = QNetworkRequest( url ); -#ifndef QT_NO_OPENSSL +#if !defined( QT_NO_OPENSSL ) && !defined( CVF_OSX ) bool supportsSsl = QSslSocket::supportsSsl(); if ( supportsSsl ) { diff --git a/ApplicationLibCode/Commands/SsiHubImportCommands/RiuWellImportWizard.h b/ApplicationLibCode/Commands/SsiHubImportCommands/RiuWellImportWizard.h index 8cbfca1ceb..6a5dce6ae5 100644 --- a/ApplicationLibCode/Commands/SsiHubImportCommands/RiuWellImportWizard.h +++ b/ApplicationLibCode/Commands/SsiHubImportCommands/RiuWellImportWizard.h @@ -228,7 +228,7 @@ public slots: int wellSelectionPageId(); -#ifndef QT_NO_OPENSSL +#if !defined(QT_NO_OPENSSL) && !defined(CVF_OSX) void sslErrors( QNetworkReply*, const QList& errors ); #endif diff --git a/ApplicationLibCode/ReservoirDataModel/RigNncConnection.cpp b/ApplicationLibCode/ReservoirDataModel/RigNncConnection.cpp index 81bcd24066..65ba39f922 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigNncConnection.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigNncConnection.cpp @@ -110,7 +110,7 @@ bool RigConnection::hasCommonArea() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RigConnection::operator==( const RigConnection& rhs ) +bool RigConnection::operator==( const RigConnection& rhs ) const { return m_c1GlobIdx == rhs.m_c1GlobIdx && m_c2GlobIdx == rhs.m_c2GlobIdx; } diff --git a/ApplicationLibCode/ReservoirDataModel/RigNncConnection.h b/ApplicationLibCode/ReservoirDataModel/RigNncConnection.h index 3cc215e614..aa9626967f 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigNncConnection.h +++ b/ApplicationLibCode/ReservoirDataModel/RigNncConnection.h @@ -44,7 +44,7 @@ public: RigConnection( const RigConnection& rhs ); RigConnection& operator=( const RigConnection& rhs ); - bool operator==( const RigConnection& rhs ); + bool operator==( const RigConnection& rhs ) const; bool operator<( const RigConnection& other ) const; bool hasCommonArea() const; diff --git a/CMakeLists.txt b/CMakeLists.txt index f979c6e110..8bd2a174dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -502,7 +502,6 @@ list(APPEND APP_FWK_LIBRARIES set_property(TARGET ${APP_FWK_LIBRARIES} - cafHexInterpolator PROPERTY FOLDER "AppFwk" ) @@ -556,9 +555,18 @@ if (RESINSIGHT_PRIVATE_INSTALL) ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2 ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2.4 ) - - install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} ) + install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} ) endif() + + if (APPLE) + set(ERT_SHARED_LIB_FILES + ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.dylib + ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.2.dylib + ${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.2.4.dylib + ) + install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER}/ResInsight.app/Contents/MacOS ) + endif() + endif (RESINSIGHT_PRIVATE_INSTALL) diff --git a/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt b/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt index 036e5f8cd5..a741db2bab 100644 --- a/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt +++ b/Fwk/AppFwk/cafHexInterpolator/CMakeLists.txt @@ -2,12 +2,6 @@ cmake_minimum_required(VERSION 3.12) project(cafHexInterpolator) -set(PROJECT_FILES cafHexInterpolator.h) +add_library(${PROJECT_NAME} INTERFACE) -add_library(${PROJECT_NAME} ${PROJECT_FILES}) - -target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - -target_link_libraries(${PROJECT_NAME} LibCore) - -source_group("" FILES ${PROJECT_FILES}) +target_include_directories(${PROJECT_NAME} INTERFACE .) diff --git a/vcpkg_x64-osx.txt b/vcpkg_x64-osx.txt new file mode 100644 index 0000000000..243a439217 --- /dev/null +++ b/vcpkg_x64-osx.txt @@ -0,0 +1,6 @@ +grpc +boost-filesystem +boost-spirit +eigen3 +--triplet +x64-osx