Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from profminton/master
Browse files Browse the repository at this point in the history
Small changes to the CI build process
  • Loading branch information
carlislewishard authored and GitHub committed Sep 9, 2023
2 parents ef89afd + ed6165f commit ff080e7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
name: swiftest

on: push
on: [push, pull_request]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11, macos-12, macos-13]
os: [ubuntu-latest, macos-11, macos-12, macos-13]
cibw_archs: [x86_64]
include:
- os: ubuntu-latest
cibw_archs: "aarch64"
env:
SYSTEM_VERSION_COMPAT: 0

steps:
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: actions/checkout@v3

- name: Build wheels
uses: pypa/cibuildwheel@v2.15.0
env:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS: ${{ matrix.cibw_archs }}
with:
package-dir: .
output-dir: wheelhouse
Expand All @@ -27,7 +36,6 @@ jobs:
with:
path: ./wheelhouse/*.whl


build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ netcdf-c-*
netcdf-fortran-*
zlib-*


actions-runner*
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,19 @@ build-verbosity = 1

[tool.cibuildwheel.macos.environment]
ROOT_DIR="$(pwd)"
ARCH="$(uname -m)"
MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion)"
PREFIX="${ROOT_DIR}"
HOMEBREW_PREFIX="$(brew --prefix)"
ARCH="$(uname -m)"
LD_LIBRARY_PATH="/usr/local/lib:${PREFIX}/lib:${HOMEBREW_PREFIX}/lib"
LDFLAGS="-Wl,-rpath,${ROOT_DIR}/lib -Wl,-no_compact_unwind -L${PREFIX}/lib -L${HOMEBREW_PREFIX}/lib"
CPATH="/usr/local/include:${PREFIX}/include:${HOMEBREW_PREFIX}/include:${ROOT_DIR}/include"
CPPFLAGS="-isystem ${PREFIX}/include -isystem /usr/local/include"
LIBS="-lomp"
CFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -Wno-deprecated-non-prototype -arch ${ARCH}"
FCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch ${ARCH}"
FFFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET} -arch ${ARCH}"
FFFLAGS="${FCFLAGS}"
CFLAGS="${FCFLAGS} -Wno-deprecated-non-prototype -arch ${ARCH}"
CXXFLAGS="${CFLAGS}"
HDF5_ROOT="${PREFIX}"
HDF5_LIBDIR="${HDF5_ROOT}/lib"
HDF5_INCLUDE_DIR="${HDF5_ROOT}/include"
Expand All @@ -83,6 +84,7 @@ NETCDF_INCLUDE="${PREFIX}"
NCDIR="${PREFIX}"
NFDIR="${PREFIX}"
FC="$(command -v gfortran-12)"
F77="${FC}"
CC="/usr/bin/clang"
CXX="/usr/bin/clang++"
CPP="/usr/bin/cpp"
Expand Down

0 comments on commit ff080e7

Please sign in to comment.