Skip to content

Commit

Permalink
Merge pull request #570 from HEXRD/osx-arm64
Browse files Browse the repository at this point in the history
Try cross-compiling for arm64 on osx
  • Loading branch information
psavery authored Oct 19, 2023
2 parents 55b78d4 + ae8f0c1 commit 4dfffe2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
run: echo "HEXRD_GIT_DESCRIBE=$(git describe --tag)" >> $GITHUB_ENV

- name: Upload the package to github
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: HEXRD-${{ matrix.config.name }}-${{ env.HEXRD_GIT_DESCRIBE }}.tar.bz2
path: output/**/*.tar.bz2
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ jobs:
steps:

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Checkout HEXRD
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: hexrd

- name: Checkout examples
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: HEXRD/examples
path: examples
Expand Down
9 changes: 9 additions & 0 deletions conda.recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@ python:
- 3.9
- 3.10
- 3.11
c_compiler:
- gcc # [linux]
- clang # [osx]
- vs2019 # [win]
target_platform:
- linux-64 # [linux]
- osx-64 # [osx]
- osx-arm64 # [osx]
- win-64 # [win]
18 changes: 13 additions & 5 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ build:

requirements:
build:
# Numba is only here to ensure the numpy version is compatible
- numba
- numpy >=1.20
# This is so that we can build cross-platform for osx-arm64
- {{ compiler('c') }}
- python {{ python }} # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- numpy >=1.20 # [build_platform != target_platform]
# Numba is only here to make sure we use a version of numpy that is compatible
- numba # [build_platform != target_platform]
host:
- python {{ python }}
- numpy >=1.20
- setuptools
- setuptools_scm
# Numba is only here to make sure we use a version of numpy that is compatible
- numba

run:
- appdirs
Expand All @@ -30,7 +38,7 @@ requirements:
- h5py
- lmfit
- numba
- numpy >=1.20
- {{ pin_compatible('numpy') }}
- psutil
- pycifrw
- python
Expand All @@ -44,7 +52,7 @@ requirements:
- tbb
- tqdm

test:
test: # [build_platform == target_platform]
imports:
- hexrd

Expand Down

0 comments on commit 4dfffe2

Please sign in to comment.