v0.10.49 Adding more fields to SubjectOnDisk #152
Workflow file for this run
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
name: Build and Publish Wheels (Mac OSX x86_64 only) | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build-mac: | |
name: Mac OSX Python ${{ matrix.python-version }} - Build Wheels | |
runs-on: macos-12 | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
include: | |
- python-version: "3.8" | |
PYTHON_VERSION_CODE: cp38-cp38 | |
PYTHON_VERSION_NUMBER: "3.8" | |
- python-version: "3.9" | |
PYTHON_VERSION_CODE: cp39-cp39 | |
PYTHON_VERSION_NUMBER: "3.9" | |
- python-version: "3.10" | |
PYTHON_VERSION_CODE: cp310-cp310 | |
PYTHON_VERSION_NUMBER: "3.10" | |
- python-version: "3.11" | |
PYTHON_VERSION_CODE: cp311-cp311 | |
PYTHON_VERSION_NUMBER: "3.11" | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Select Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified | |
- name: Set variables | |
run: | | |
VER=$(cat ./VERSION.txt) | |
echo "VERSION=$VER" | |
echo "VERSION=$VER" >> $GITHUB_ENV | |
- name: Test environment | |
run: | | |
echo "VERSION=${{ env.VERSION }}" | |
echo "PYTHON_VERSION_CODE=${{ matrix.PYTHON_VERSION_CODE }}" | |
echo "PYTHON_VERSION_NUMBER=${{ matrix.PYTHON_VERSION_NUMBER }}" | |
- name: Install pytest, wheel, auditwheel, pybind11-stubgen, numpy and torch | |
run: python -m pip install pytest wheel auditwheel numpy torch | |
- name: Install dependencies | |
run: ci/mac/install_dependencies.sh | |
- name: Build wheel | |
run: | | |
cd ci/mac | |
./build_wheels_x86_64.sh | |
env: | |
PYTHON: ${{ matrix.PYTHON }} | |
ARCHFLAGS: "-arch x86_64" | |
CFLAGS: "-arch x86_64" | |
CXXFLAGS: "-arch x86_64" | |
_PYTHON_HOST_PLATFORM: "macosx-10.9-x86_64" | |
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION_CODE }} | |
PYTHON_VERSION_NUMBER: ${{ matrix.PYTHON_VERSION_NUMBER }} | |
DYLD_PRINT_LIBRARIES: 1 | |
- name: Publish artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: nimblephysics-${{ env.VERSION }}-${{ matrix.PYTHON_VERSION_CODE }}-macosx_12_0_x86_64.whl | |
path: wheelhouse/nimblephysics-${{ env.VERSION }}-${{ matrix.PYTHON_VERSION_CODE }}-macosx_12_0_x86_64.whl | |
publish: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
needs: [build-mac] | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: wheelhouse | |
- name: Display structure of downloaded files before flattening | |
run: ls -R | |
working-directory: wheelhouse | |
- name: Flatten files | |
run: | | |
mkdir wheelhouse2 | |
find wheelhouse -type f -exec mv {} wheelhouse2 \; | |
rm -rf wheelhouse | |
mv wheelhouse2 wheelhouse | |
- name: Display structure of downloaded files after flattening | |
run: ls -R | |
working-directory: wheelhouse | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1.8 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages_dir: wheelhouse/ | |
skip_existing: true | |
verbose: true |