Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try cross-compiling for arm64 on osx #570

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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