debug ci #658
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: Verify that tests pass on all platforms | |
on: [push] | |
jobs: | |
lint_code: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
rm -rf 0/ | |
flake8 cyanure --count --select=E9,F63,F7,F82 --show-source --statistics | |
flake8 cyanure --count --max-complexity=10 --max-line-length=110 --statistics | |
build_wheels: | |
needs: [lint_code] | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- uses: conda-incubator/setup-miniconda@v3 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.19.2 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
test_imports: | |
needs: [build_wheels] | |
name: Smoke test for c++ depenencies on raw ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Try to import cyanure | |
run: pip install "scipy<=1.8.1" && pip install "numpy<=1.23.5" && pip install "scikit-learn>=1.1.3" && python -m pip install --no-index --find-links dist cyanure && python -c "import cyanure;" | |
run_tests: | |
needs: [build_wheels] | |
name: Run the tests on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install cyanure | |
run: pip install "scipy<=1.8.1" && pip install "numpy<=1.23.5" && pip install "scikit-learn>=1.1.3" && python -m pip install --no-index --find-links dist cyanure | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Switch to Current Branch | |
run: git checkout ${{ env.BRANCH }} | |
- name: Run tests without the lib | |
uses: knicknic/[email protected] | |
with: | |
macos: rm -rf cyanure && rm -rf cyanure_lib && python -m pip install pytest && python -m pip install pandas && python -m pip install libsvmdata && pip list && python -m pytest test/ | |
linux: rm -rf cyanure && rm -rf cyanure_lib && python -m pip install pytest && python -m pip install pandas && python -m pip install libsvmdata && pip list && python -m pytest test/ | |
windows: Remove-Item -Force -Recurse cyanure && Remove-Item -Force -Recurse cyanure_lib && python -m pip install pytest && python -m pip install libsvmdata && python -m pip install pandas && python -m pytest test/ |