Skip to content

Commit 4dfffe2

Browse files
authored
Merge pull request #570 from HEXRD/osx-arm64
Try cross-compiling for arm64 on osx
2 parents 55b78d4 + ae8f0c1 commit 4dfffe2

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

.github/workflows/package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run:
3232
shell: bash
3333
steps:
34-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v4
3535
with:
3636
fetch-depth: 0
3737

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

113113
- name: Upload the package to github
114-
uses: actions/upload-artifact@v2
114+
uses: actions/upload-artifact@v3
115115
with:
116116
name: HEXRD-${{ matrix.config.name }}-${{ env.HEXRD_GIT_DESCRIBE }}.tar.bz2
117117
path: output/**/*.tar.bz2

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ jobs:
3333
steps:
3434

3535
- name: Set up Python ${{ matrix.python-version }}
36-
uses: actions/setup-python@v2
36+
uses: actions/setup-python@v4
3737
with:
3838
python-version: ${{ matrix.python-version }}
3939

4040
- name: Checkout HEXRD
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242
with:
4343
path: hexrd
4444

4545
- name: Checkout examples
46-
uses: actions/checkout@v3
46+
uses: actions/checkout@v4
4747
with:
4848
repository: HEXRD/examples
4949
path: examples

conda.recipe/conda_build_config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@ python:
22
- 3.9
33
- 3.10
44
- 3.11
5+
c_compiler:
6+
- gcc # [linux]
7+
- clang # [osx]
8+
- vs2019 # [win]
9+
target_platform:
10+
- linux-64 # [linux]
11+
- osx-64 # [osx]
12+
- osx-arm64 # [osx]
13+
- win-64 # [win]

conda.recipe/meta.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,20 @@ build:
1313

1414
requirements:
1515
build:
16-
# Numba is only here to ensure the numpy version is compatible
17-
- numba
18-
- numpy >=1.20
16+
# This is so that we can build cross-platform for osx-arm64
17+
- {{ compiler('c') }}
18+
- python {{ python }} # [build_platform != target_platform]
19+
- cross-python_{{ target_platform }} # [build_platform != target_platform]
20+
- numpy >=1.20 # [build_platform != target_platform]
21+
# Numba is only here to make sure we use a version of numpy that is compatible
22+
- numba # [build_platform != target_platform]
23+
host:
1924
- python {{ python }}
25+
- numpy >=1.20
2026
- setuptools
2127
- setuptools_scm
28+
# Numba is only here to make sure we use a version of numpy that is compatible
29+
- numba
2230

2331
run:
2432
- appdirs
@@ -30,7 +38,7 @@ requirements:
3038
- h5py
3139
- lmfit
3240
- numba
33-
- numpy >=1.20
41+
- {{ pin_compatible('numpy') }}
3442
- psutil
3543
- pycifrw
3644
- python
@@ -44,7 +52,7 @@ requirements:
4452
- tbb
4553
- tqdm
4654

47-
test:
55+
test: # [build_platform == target_platform]
4856
imports:
4957
- hexrd
5058

0 commit comments

Comments
 (0)