-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into add_req_reading
- Loading branch information
Showing
2 changed files
with
21 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,13 +55,13 @@ jobs: | |
matrix: | ||
include: | ||
- config: {"name": "Linux", "os": "ubuntu-latest", "arch": "x86_64"} | ||
- config: {"name": "Linux", "os": "ubuntu-latest", "arch": "aarch64"} | ||
- config: {"name": "macOS", "os": "macos-14", "arch": "x86_64"} | ||
- config: {"name": "Linux", "os": "ubuntu-22.04-arm", "arch": "aarch64"} | ||
- config: {"name": "macOS", "os": "macos-13", "arch": "x86_64"} | ||
- config: {"name": "macOS", "os": "macos-14", "arch": "arm64"} | ||
- config: {"name": "Windows", "os": "windows-latest", "arch": "AMD64"} | ||
name: Build SpiceyPy 🌶️ 🥧 Python 🐍 wheels for ${{ matrix.config.os }} ${{ matrix.config.arch }} | ||
env: | ||
CSPICE_CACHE: 1 | ||
CSPICE_CACHE: 2 | ||
CIBW_ARCHS: ${{ matrix.config.arch }} | ||
runs-on: ${{ matrix.config.os }} | ||
steps: | ||
|
@@ -71,26 +71,20 @@ jobs: | |
if: runner.os == 'Windows' | ||
uses: ilammy/[email protected] | ||
- name: set additional environment variables for macOS arm | ||
if: runner.name == 'macOS' && matrix.config.arch == 'arm64' | ||
if: runner.os == 'macOS' && matrix.config.arch == 'arm64' | ||
run: | | ||
echo "CIBW_ARCHS_MACOS=arm64" >> $GITHUB_ENV | ||
echo "ARCHFLAGS='-arch arm64'" >> $GITHUB_ENV | ||
- name: set additional environment variables for macOS x86 | ||
if: runner.name == 'macOS' && matrix.config.arch == 'x86_64' | ||
if: runner.os == 'macOS' && matrix.config.arch == 'x86_64' | ||
run: | | ||
echo "CIBW_ARCHS_MACOS=x86_64" >> $GITHUB_ENV | ||
echo "ARCHFLAGS='-arch x86_64'" >> $GITHUB_ENV | ||
- name: Set up QEMU for arm64 builds | ||
if: matrix.config.arch == 'aarch64' | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: all | ||
- name: Cache libcspice.so for aarch64 builds because they take an hour to build with qemu | ||
if: matrix.config.arch == 'aarch64' | ||
uses: actions/cache@v4 | ||
with: | ||
path: ./src/spiceypy/utils/libcspice.so | ||
key: ${{ env.CSPICE_CACHE }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ hashFiles('get_spice.py') }}-${{ hashFiles('setup.cfg') }} | ||
- name: set additional environment variables for linux aarch64 | ||
if: runner.os == 'Linux' && matrix.config.arch == 'aarch64' | ||
run: | | ||
echo "CIBW_ARCHS_LINUX=aarch64" >> $GITHUB_ENV | ||
echo "ARCHFLAGS='-arch aarch64'" >> $GITHUB_ENV | ||
- name: Set up Python 🐍 3.13 | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -101,28 +95,13 @@ jobs: | |
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r ci-requirements.txt | ||
python -m pip install cibuildwheel==2.21.3 | ||
- name: See if libcspice.so is available from cache | ||
if: matrix.config.arch == 'aarch64' | ||
run: | | ||
pwd | ||
ls src/spiceypy/utils -lahtr | ||
python -m pip install cibuildwheel==2.22.0 | ||
- name: Build wheels for SpiceyPy 🌶️ 🥧 | ||
timeout-minutes: 120 | ||
run: | | ||
env | grep CIBW | ||
env | grep ARCH | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- name: Extract libcspice.so for aarch64 builds | ||
if: matrix.config.arch == 'aarch64' | ||
run: | | ||
pwd | ||
ls -lahtr | ||
ls src/ -lahtr | ||
ls src/spiceypy/ -lahtr | ||
ls src/spiceypy/utils -lahtr | ||
ls wheelhouse/* | ||
unzip -o wheelhouse/spiceypy-\*.whl 'spiceypy/utils/libcspice.so' -d src/ | ||
- name: Check dists | ||
run: | | ||
twine check wheelhouse/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters