Try fix CI linux. #14
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 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_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/stubs | |
# 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@v2 | |
with: | |
name: wheel | |
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)" |