Skip to content

Commit

Permalink
WIP: pip and wheels config
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Jun 3, 2024
1 parent 8a66055 commit 12c65af
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 30 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ jobs:
cmake --version
brew info boost
brew info hdf5
echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV
echo "CXX=/usr/local/opt/llvm/bin/clang++" >> $GITHUB_ENV
- name: Install ARM MacOS dependencies
Expand All @@ -60,9 +57,6 @@ jobs:
cmake --version
brew info boost
brew info hdf5
echo "CC=/opt/homebrew/opt/llvm/bin/clang" >> $GITHUB_ENV
echo "CXX=/opt/homebrew/opt/llvm/bin/clang++" >> $GITHUB_ENV
- name: Install Windows Dependencies
Expand All @@ -83,10 +77,6 @@ jobs:
mingw-w64-clang-x86_64-libzip
mingw-w64-clang-x86_64-zlib
mingw-w64-clang-x86_64-libaec
- if: matrix.os == 'windows-latest'
run: |
echo "CC=/c/Program Files/LLVM/bin/clang.exe" >> $GITHUB_ENV
echo "CXX=/c/Program Files/LLVM/bin/clang++.exe" >> $GITHUB_ENV
- name: Install Linux Dependencies
Expand All @@ -103,30 +93,35 @@ jobs:
dpkg -s libboost-all-dev
dpkg -s libhdf5-dev
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"

- name: Build and install macos-13
run: pip install --verbose .
run: |
PATH="/usr/local/opt/llvm/bin:$PATH"
pip install --verbose .
if: matrix.platform == 'macos-13'
env:
PATH: "/usr/local/opt/llvm/bin:${{ env.PATH }}"

- name: Build and install macos-14
run: pip install --verbose .
run: |
PATH="/opt/homebrew/opt/llvm/bin:$PATH"
pip install --verbose .
if: matrix.platform == 'macos-14'
env:
PATH: "/opt/homebrew/opt/llvm/bin:${{ env.PATH }}"

- name: Build and install windows-latest
run: pip install --verbose .
shell: msys2 {0}
run: |
platform=windows
PATH="/c/Program\ Files/LLVM/bin:$PATH"
pip install --verbose .
if: matrix.platform == 'windows-latest'
env:
PATH: "/c/Program Files/LLVM/bin:${{ env.PATH }}"

- name: Build and install ubuntu-latest
run: pip install --verbose .
run: |
platform=linux
pip install --verbose .
if: matrix.platform == 'ubuntu-latest'

- name: Test
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ jobs:
cmake --version
brew info boost
brew info hdf5
echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV
echo "CXX=/usr/local/opt/llvm/bin/clang++" >> $GITHUB_ENV
- name: Install ARM MacOS dependencies
Expand All @@ -91,9 +88,6 @@ jobs:
cmake --version
brew info boost
brew info hdf5
echo "CC=/opt/homebrew/opt/llvm/bin/clang" >> $GITHUB_ENV
echo "CXX=/opt/homebrew/opt/llvm/bin/clang++" >> $GITHUB_ENV
- name: Install Windows Dependencies
if: matrix.os == 'windows-latest'
Expand All @@ -113,10 +107,6 @@ jobs:
mingw-w64-clang-x86_64-libzip
mingw-w64-clang-x86_64-zlib
mingw-w64-clang-x86_64-libaec
- if: matrix.os == 'windows-latest'
run: |
echo "CC=/c/Program Files/LLVM/bin/clang.exe" >> $GITHUB_ENV
echo "CXX=/c/Program Files/LLVM/bin/clang++.exe" >> $GITHUB_ENV
- name: Install Linux Dependencies
Expand All @@ -133,6 +123,7 @@ jobs:
dpkg -s libboost-all-dev
dpkg -s libhdf5-dev
- name: build wheel
uses: pypa/[email protected]
env:
Expand Down
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ if (APPLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__x86_64__")
set(CMAKE_OSX_ARCHITECTURES "x86_64")
endif()
if(NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER "clang")
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER "clang++")
endif()

elseif (LINUX)
option(LINUX_32bit_BINARIES "Build 32bit Linux BINARIES" OFF)
option(LINUX_64bit_BINARIES "Build 64bit Linux BINARIES" ON)
Expand All @@ -97,13 +104,21 @@ elseif (LINUX)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
endif()
if(NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER "clang")
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER "clang++")
endif()

elseif (MINGW)
if(NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER "clang.exe")
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER "clang++.exe")
endif()

endif()

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
Expand Down

0 comments on commit 12c65af

Please sign in to comment.