Skip to content

Commit

Permalink
Add logic for picking pre-compiled binary to download
Browse files Browse the repository at this point in the history
  • Loading branch information
nightlark committed Feb 3, 2024
1 parent d901823 commit e227de0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
build: ""
artifact_suffix: "windows_x86"
use_qemu: false
- os: macos-14
- os: macos-13
arch: "universal2"
build: ""
artifact_suffix: "macos"
Expand Down
30 changes: 17 additions & 13 deletions helics_apps-pip/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
cmake_minimum_required(VERSION 3.15...3.26)
project(HELICS LANGUAGES CXX) # Must be "HELICS" due to its CMake files requiring CMAKE_PROJECT_NAME == PROJECT_NAME in order to build app executables

message(STATUS "--------------------")
message(STATUS "SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P}") # if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message(STATUS "CMAKE_GENERATOR ${CMAKE_GENERATOR}")
message(STATUS "INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}")
message(STATUS "SYSTEM ${CMAKE_SYSTEM}")
message(STATUS "SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}")
message(STATUS "SYSTEM_VERSION ${CMAKE_SYSTEM_VERSION}")
message(STATUS "SYSTEM_NAME ${CMAKE_SYSTEM_NAME}")
message(STATUS "APPLE ${APPLE}")
message(STATUS "LINUX ${LINUX}")
message(STATUS "UNIX ${UNIX}")
message(STATUS "WIN32 ${WIN32}")
message(STATUS "ENV(TEST_ENV_VAR) $ENV{TEST_ENV_VAR}")
# Note: This will likely not produce valid wheels for musl systems...
if(LINUX AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(HELICS_DOWNLOAD_URL https://github.com/GMLC-TDC/HELICS/releases/download/v${SKBUILD_PROJECT_VERSION}/Helics-${SKBUILD_PROJECT_VERSION}-Linux-x86_64.tar.gz)
elseif(APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin")
message(STATUS "${CMAKE_SYSTEM_PROCESSOR}")
set(HELICS_DOWNLOAD_URL https://github.com/GMLC-TDC/HELICS/releases/download/${SKBUILD_PROJECT_VERSION}/Helics-${SKBUILD_PROJECT_VERSION}-macOS-universal2.zip)
elseif(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(HELICS_DOWNLOAD_URL https://github.com/GMLC-TDC/HELICS/releases/download/v${SKBUILD_PROJECT_VERSION}/Helics-${SKBUILD_PROJECT_VERSION}-win64.zip)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
set(HELICS_DOWNLOAD_URL https://github.com/GMLC-TDC/HELICS/releases/download/v${SKBUILD_PROJECT_VERSION}/Helics-${SKBUILD_PROJECT_VERSION}-win32.zip)
endif()
endif()

message(STATUS "CIBW_BUILD: $ENV{CIBW_BUILD}")
message(STATUS "CIBUILDWHEEL: $ENV{CIBUILDWHEEL}")
message(STATUS "DOWNLOAD URL: ${HELICS_DOWNLOAD_URL}")

return()
message(STATUS ${SKBUILD_PROJECT_NAME})
Expand Down

0 comments on commit e227de0

Please sign in to comment.