Skip to content

Prepare for 0.0.1 release #37

Prepare for 0.0.1 release

Prepare for 0.0.1 release #37

Workflow file for this run

name: CI
permissions:
contents: write
on: [push, pull_request]
jobs:
windows:
# 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: windows-latest
env:
# Disable output buffering in an attempt to get readable errors
PYTHONUNBUFFERED: '1'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Python environment
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Build
shell: bash
run: |
pip install -r requirements.txt
python setup.py sdist
python setup.py bdist_wheel --py-limited-api=cp37
pip install --force-reinstall dist/*.whl
python -c "import icicle"
- name: Test
run: |
pip install -r tests/requirements.txt
python tests/example.py
python tests/invalid.py
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: dist
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
env:
# Disable output buffering in an attempt to get readable errors
PYTHONUNBUFFERED: '1'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Python environment
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: 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: Test
run: |
pip install -r tests/requirements.txt
python tests/example.py
python tests/invalid.py
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
linux:
# 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: ubuntu-latest
env:
# Disable output buffering in an attempt to get readable errors
PYTHONUNBUFFERED: '1'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Python environment
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu
- name: Build
shell: bash
run: |
pip install -r requirements.txt
python setup.py bdist_wheel --py-limited-api=cp37
pip install --force-reinstall dist/*.whl
python -c "import icicle"
- name: Test
run: |
pip install -r tests/requirements.txt
python tests/example.py
python tests/invalid.py
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
release:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: [windows, macos, linux]
steps:
- name: Download wheels
uses: actions/download-artifact@v3
with:
name: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: dist/
- name: Release
uses: softprops/action-gh-release@c9b46fe7aad9f02afd89b12450b780f52dacfb2d # master 2023-03-26
with:
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}