Skip to content

Commit

Permalink
fix: solve ci issues
Browse files Browse the repository at this point in the history
  • Loading branch information
saturneric committed Jul 29, 2024
1 parent 8f1edf2 commit a3d8f69
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 46 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/release-qt5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,16 +152,15 @@ jobs:
cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://')
cd third_party/mimalloc
mkdir build && cd build
cmake -G Ninja -DMI_SECURE=ON ..
ninja
sudo ninja install
cmake -G Ninja -DMI_SECURE=ON -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX .. && ninja
ninja install
if: matrix.os == 'windows-2019'

- name: Build googletest (Linux)
run: |
cd ${{github.workspace}}/third_party/googletest
mkdir build && cd build
cmake -G Ninja ..
cmake -G Ninja -DBUILD_SHARED_LIBS=ON ..
ninja
sudo ninja install
if: matrix.os == 'ubuntu-20.04'
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,15 @@ jobs:
cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://')
cd third_party/mimalloc
mkdir build && cd build
cmake -G Ninja -DMI_SECURE=ON ..
ninja
sudo ninja install
cmake -G Ninja -DMI_SECURE=ON -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX .. && ninja
ninja install
if: matrix.os == 'windows-2019'

- name: Build googletest (Linux)
run: |
cd ${{github.workspace}}/third_party/googletest
mkdir build && cd build
cmake -G Ninja ..
cmake -G Ninja -DBUILD_SHARED_LIBS=ON ..
ninja
sudo ninja install
if: matrix.os == 'ubuntu-20.04'
Expand Down
36 changes: 8 additions & 28 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ target_compile_definitions(gpgfrontend_core PUBLIC GF_CORE)
# mimalloc (except apple macos)
if(NOT APPLE)
target_link_libraries(gpgfrontend_core PUBLIC mimalloc)

# use system installed libraries or install it system wide
if(MINGW AND NOT STABLE_BUILD_FULL_SDK)
set_target_properties(mimalloc
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
)
endif()
endif()

# qt-aes
Expand All @@ -84,28 +75,17 @@ if(MINGW)
endif()

# configure libarchive
if(NOT MINGW)
if(APPLE)
if(EXISTS "/usr/local/opt/libarchive/include")
set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include")
else()
set(LibArchive_INCLUDE_DIR "/opt/homebrew/opt/libarchive/include")
endif()
endif()

find_package(LibArchive REQUIRED)
target_include_directories(gpgfrontend_core PRIVATE ${LibArchive_INCLUDE_DIR})
else()
# use system installed libraries or install it system wide
if(NOT STABLE_BUILD_FULL_SDK)
set_target_properties(archive
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
)
if(APPLE)
if(EXISTS "/usr/local/opt/libarchive/include")
set(LibArchive_INCLUDE_DIR "/usr/local/opt/libarchive/include")
else()
set(LibArchive_INCLUDE_DIR "/opt/homebrew/opt/libarchive/include")
endif()
endif()

find_package(LibArchive REQUIRED)
target_include_directories(gpgfrontend_core PRIVATE ${LibArchive_INCLUDE_DIR})

# link libarchive
target_link_libraries(gpgfrontend_core PRIVATE archive)

Expand Down
9 changes: 0 additions & 9 deletions src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ if(XCODE_BUILD)
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${GPGFRONTEND_XOCDE_CODE_SIGN_IDENTITY}")
endif()

# use system installed libraries or install it system wide
if(MINGW AND NOT STABLE_BUILD_FULL_SDK)
set_target_properties(gtest
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
)
endif()

if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
# lib output path
set_target_properties(gpgfrontend_test PROPERTIES
Expand Down

0 comments on commit a3d8f69

Please sign in to comment.