Skip to content

Commit

Permalink
try cross compile on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
haohanyang committed Nov 21, 2024
1 parent 972b4b8 commit ee33e97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/test-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
python-version: '3.12'
- name: Update version
run: python script.py version 0.0.12
run: python script.py version 0.0.13
- name: Build sdist
run: pipx run build --sdist
- name: Check metadata
Expand All @@ -33,7 +33,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
os: [macos-latest]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -42,23 +42,16 @@ jobs:
with:
python-version: '3.12'
- name: Update version
run: python script.py version 0.0.12
run: python script.py version 0.0.13
- name: Check OS matrix
run: echo ${{ matrix.os }}
- name: Build wheels on non M1 macOS machine
- name: Build wheels
uses: pypa/[email protected]
if: matrix.os != 'macos-latest'
env:
CIBW_BUILD: cp312-*
CIBW_ARCHS_MACOS: x86_64
CIBW_ARCHS_MACOS: 'x86_64 arm64'
CIBW_ARCHS_WINDOWS: AMD64
CIBW_ARCHS_LINUX: x86_64
- name: Build wheels on M1 macOS machine
uses: pypa/[email protected]
if: matrix.os == 'macos-latest'
env:
CIBW_BUILD: cp312-*
CIBW_ARCHS_MACOS: arm64
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ option(IPHREEQC_VERSION "IPhreeqc version or tag name of the IPhreeqc repository
ExternalProject_Add(IPhreeqcBuild
GIT_REPOSITORY https://github.com/usgs-coupled/iphreeqc.git
GIT_TAG ${IPHREEQC_VERSION}
BUILD_ALWAYS 1
CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/iphreeqc-install" "-DBUILD_TESTING=OFF" "-DCMAKE_BUILD_TYPE=Release" "-DCMAKE_POSITION_INDEPENDENT_CODE=ON"
INSTALL_DIR "${CMAKE_SOURCE_DIR}/iphreeqc-install"
)
Expand Down

0 comments on commit ee33e97

Please sign in to comment.