@@ -54,13 +54,13 @@ jobs:
54
54
matrix :
55
55
include :
56
56
- config : {"name": "Linux", "os": "ubuntu-latest", "arch": "x86_64"}
57
- - config : {"name": "Linux", "os": "ubuntu-latest ", "arch": "aarch64"}
58
- - config : {"name": "macOS", "os": "macos-14 ", "arch": "x86_64"}
57
+ - config : {"name": "Linux", "os": "ubuntu-22.04-arm ", "arch": "aarch64"}
58
+ - config : {"name": "macOS", "os": "macos-13 ", "arch": "x86_64"}
59
59
- config : {"name": "macOS", "os": "macos-14", "arch": "arm64"}
60
60
- config : {"name": "Windows", "os": "windows-latest", "arch": "AMD64"}
61
61
name : Build SpiceyPy 🌶️ 🥧 Python 🐍 wheels for ${{ matrix.config.os }} ${{ matrix.config.arch }}
62
62
env :
63
- CSPICE_CACHE : 1
63
+ CSPICE_CACHE : 2
64
64
CIBW_ARCHS : ${{ matrix.config.arch }}
65
65
runs-on : ${{ matrix.config.os }}
66
66
steps :
@@ -70,26 +70,20 @@ jobs:
70
70
if : runner.os == 'Windows'
71
71
72
72
- name : set additional environment variables for macOS arm
73
- if : runner.name == 'macOS' && matrix.config.arch == 'arm64'
73
+ if : runner.os == 'macOS' && matrix.config.arch == 'arm64'
74
74
run : |
75
75
echo "CIBW_ARCHS_MACOS=arm64" >> $GITHUB_ENV
76
76
echo "ARCHFLAGS='-arch arm64'" >> $GITHUB_ENV
77
77
- name : set additional environment variables for macOS x86
78
- if : runner.name == 'macOS' && matrix.config.arch == 'x86_64'
78
+ if : runner.os == 'macOS' && matrix.config.arch == 'x86_64'
79
79
run : |
80
80
echo "CIBW_ARCHS_MACOS=x86_64" >> $GITHUB_ENV
81
81
echo "ARCHFLAGS='-arch x86_64'" >> $GITHUB_ENV
82
- - name : Set up QEMU for arm64 builds
83
- if : matrix.config.arch == 'aarch64'
84
- uses : docker/setup-qemu-action@v3
85
- with :
86
- platforms : all
87
- - name : Cache libcspice.so for aarch64 builds because they take an hour to build with qemu
88
- if : matrix.config.arch == 'aarch64'
89
- uses : actions/cache@v4
90
- with :
91
- path : ./src/spiceypy/utils/libcspice.so
92
- key : ${{ env.CSPICE_CACHE }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ hashFiles('get_spice.py') }}-${{ hashFiles('setup.cfg') }}
82
+ - name : set additional environment variables for linux aarch64
83
+ if : runner.os == 'Linux' && matrix.config.arch == 'aarch64'
84
+ run : |
85
+ echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV
86
+ echo "ARCHFLAGS='-arch aarch64'" >> $GITHUB_ENV
93
87
- name : Set up Python 🐍 3.13
94
88
uses : actions/setup-python@v5
95
89
with :
@@ -100,28 +94,13 @@ jobs:
100
94
run : |
101
95
python -m pip install --upgrade pip
102
96
python -m pip install -r ci-requirements.txt
103
- python -m pip install cibuildwheel==2.21.3
104
- - name : See if libcspice.so is available from cache
105
- if : matrix.config.arch == 'aarch64'
106
- run : |
107
- pwd
108
- ls src/spiceypy/utils -lahtr
97
+ python -m pip install cibuildwheel==2.22.0
109
98
- name : Build wheels for SpiceyPy 🌶️ 🥧
110
99
timeout-minutes : 120
111
100
run : |
112
101
env | grep CIBW
113
102
env | grep ARCH
114
103
python -m cibuildwheel --output-dir wheelhouse
115
- - name : Extract libcspice.so for aarch64 builds
116
- if : matrix.config.arch == 'aarch64'
117
- run : |
118
- pwd
119
- ls -lahtr
120
- ls src/ -lahtr
121
- ls src/spiceypy/ -lahtr
122
- ls src/spiceypy/utils -lahtr
123
- ls wheelhouse/*
124
- unzip -o wheelhouse/spiceypy-\*.whl 'spiceypy/utils/libcspice.so' -d src/
125
104
- name : Check dists
126
105
run : |
127
106
twine check wheelhouse/*
0 commit comments