Skip to content

Commit

Permalink
ci: fix macOS codesigning (#3408)
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
  • Loading branch information
cebtenzzre authored Jan 23, 2025
1 parent a97a28f commit 15f6657
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ jobs:
-DGPT4ALL_GEN_CPACK_CONFIG=ON
~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target package
~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake . -DGPT4ALL_GEN_CPACK_CONFIG=OFF
# The 'install' step here *should* be completely unnecessary. There is absolutely no reason we should have
# to copy all of the build artifacts to an output directory that we do not use (because we package GPT4All
# as an installer instead).
# However, because of the way signing is implemented in the cmake script, the *source* files are signed at
# install time instead of the *installed* files. This side effect is the *only* way libraries that are not
# processed by macdeployqt, such as libllmodel.so, get signed (at least, with -DBUILD_UNIVERSAL=ON).
# Also, we have to run this as a *separate* step. Telling cmake to run both targets in one command causes it
# to execute them in parallel, since it is not aware of the dependency of the package target on the install
# target.
~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target install
~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target package
ccache -s
mkdir upload
Expand Down Expand Up @@ -224,6 +234,8 @@ jobs:
-DGPT4ALL_GEN_CPACK_CONFIG=ON
~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target package
~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake . -DGPT4ALL_GEN_CPACK_CONFIG=OFF
# See comment above related to the 'install' target.
~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target install
~/Qt/Tools/CMake/CMake.app/Contents/bin/cmake --build . --target package
ccache -s
mkdir upload
Expand Down
8 changes: 4 additions & 4 deletions gpt4all-chat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ set(APP_VERSION "${APP_VERSION_BASE}")

project(gpt4all VERSION ${APP_VERSION_BASE} LANGUAGES CXX C)

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "..." FORCE)
endif()

if(APPLE)
option(BUILD_UNIVERSAL "Build a Universal binary on macOS" OFF)
if(BUILD_UNIVERSAL)
Expand Down Expand Up @@ -126,10 +130,6 @@ message(STATUS "Qt 6 root directory: ${Qt6_ROOT_DIR}")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install CACHE PATH "..." FORCE)
endif()

add_subdirectory(deps)
add_subdirectory(../gpt4all-backend llmodel)

Expand Down

0 comments on commit 15f6657

Please sign in to comment.