Skip to content

try to use intel mac runners for arm build #31

try to use intel mac runners for arm build

try to use intel mac runners for arm build #31

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }} with label ${{ matrix.label }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: ubuntu-latest

Check failure on line 11 in .github/workflows/wheels.yml

View workflow run for this annotation

GitHub Actions / Build

Invalid workflow file

The workflow is not valid. .github/workflows/wheels.yml (Line: 11, Col: 9): A sequence was not expected
label: "linux-target-x86_64"
- os: macos-13
label: "macos-target-x86_64"
env: MACOSX_DEPLOYMENT_TARGET=10.15
- os: macos-13
label: "macos-target-arm64"
env: MACOSX_DEPLOYMENT_TARGET=11
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set OpenMP env for macos x86_64
if: matrix.label == 'macos-target-x86_64'
run: |
brew install libomp
prefix=$(brew --prefix libomp)
echo "LDFLAGS=$LDFLAGS -L$prefix/lib" >> $GITHUB_ENV
echo "CXXFLAGS=$CXXFLAGS -I$prefix/include" >> $GITHUB_ENV
- name: Set OpenMP env for macos arm64
if: matrix.label == 'macos-target-arm64'
run: |
pkg=$(brew fetch --force --bottle-tag=arm64_ventura libomp | grep 'Downloaded to' | cut -d' ' -f3)
brew install $pkg
prefix=$(brew --prefix libomp)
echo "LDFLAGS=$LDFLAGS -L$prefix/lib" >> $GITHUB_ENV
echo "CXXFLAGS=$CXXFLAGS -I$prefix/include" >> $GITHUB_ENV
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Build SDist
run: |
pip install -U build
python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_all:
needs: [build_wheels, make_sdist]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
# TODO: only run on release
# if: github.event_name == 'release' && github.event.action == 'published'
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1