Skip to content

Attempt at Python packaging #10

Attempt at Python packaging

Attempt at Python packaging #10

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
# linux:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# target: [x86_64, aarch64]
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: 'true'
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@stable
# with:
# targets: aarch64-apple-darwin, x86-64-apple-darwin
# - name: Install Rust aarch64-apple-darwin target
# if: matrix.platform.os == 'macos-latest'
# run: rustup target add aarch64-apple-darwin
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist
# windows:
# runs-on: windows-latest
# strategy:
# matrix:
# target: [x64]
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: 'true'
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# architecture: ${{ matrix.target }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist
macos:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Python environment
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build
shell: bash
env:
DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer
MACOSX_DEPLOYMENT_TARGET: '10.9'
ARCHFLAGS: -arch x86_64 -arch arm64
PYO3_CROSS_LIB_DIR: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib
run: |
pip install -r requirements.txt
python setup.py bdist_wheel --py-limited-api=cp37
pip install --force-reinstall dist/*_universal2.whl
python -c "import icicle"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
# release:
# name: Release
# runs-on: ubuntu-latest
# if: "startsWith(github.ref, 'refs/tags/')"
# needs: [linux, windows, macos]
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: wheels
# - name: Publish to PyPI
# uses: PyO3/maturin-action@v1
# env:
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
# with:
# command: upload
# args: --skip-existing *