Skip to content

Fix artifact name to wheels. #24

Fix artifact name to wheels.

Fix artifact name to wheels. #24

name: Build and run tests
on: [push]
jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Build wheels
uses: pypa/cibuildwheel@v2.1.2
env:
CIBW_ARCHS: auto64
CIBW_BUILD_VERBOSITY: 1
CIBW_BEFORE_ALL_LINUX: bash ci/setup_manylinux.sh
# CIBW_BEFORE_ALL_MACOS: python/tools/prepare_build_environment_macos.sh
CIBW_BEFORE_ALL_WINDOWS: bash ci/setup_windows.sh
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_SKIP: pp* *-musllinux_*
CIBW_BUILD: cp38-*
CIBW_REPAIR_WHEEL_COMMAND_LINUX: 'pip install -U auditwheel patchelf && auditwheel repair -w {dest_dir} {wheel} --exclude libcuda.so.1'
# CIBW_ENVIRONMENT_MACOS: CC='clang' CXX='clang++'
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./wheelhouse/*.whl
run:
name: Test on ${{ matrix.os }} with python ${{ matrix.python-version }}
needs: [build]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v3
with:
name: wheels
path: built_wheels
- name: Install packages
run: python -m pip install --no-index --find-links=./built_wheels torchoptix
# - name: Test import
# run: python -c "import torchoptix; help(torchoptix)"