Skip to content

mod build.yml

mod build.yml #197

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
- v[0-9]+.[0-9]+.x
tags:
- v*
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8]
os: [ubuntu-latest] #ubuntu-latest [macos-latest, ] #
env:
PYTHON_VERSION: ${{ matrix.python-version }}
SPARK_VERSION: ${{ matrix.spark-version }}
PANDAS_VERSION: ${{ matrix.pandas-version }}
PYARROW_VERSION: ${{ matrix.pyarrow-version }}
NUMPY_VERSION: ${{ matrix.numpy-version }}
DEFAULT_INDEX_TYPE: ${{ matrix.default-index-type }}
KOALAS_TESTING: 1
SPARK_LOCAL_IP: 127.0.0.1
# DISPLAY=0.0 does not work in Github Actions with Python 3.5. Here we work around with xvfb-run
PYTHON_EXECUTABLE: xvfb-run python
GITHUB_OAUTH_KEY: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install libomp
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install libomp
fi
shell: bash
- name: install dependencies
run: |
pip install --upgrade pip
pip install certifi
pip install tox tox-wheel tox-gh-actions
# pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements_tox.txt
# python setup.py build_ext --inplace
# python setup.py install
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org -r requirements.txt
pip install -e ."[dev]"
- name: tests
run: |
coverage run --omit gators/*/test*.py -m pytest gators && coverage report && coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
build_wheels:
runs-on: ${{ matrix.os }}
needs: [test]
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2
name: Install java
with:
java-version: 1.8
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'
- name: Install python depencies
run: |
python -m pip install --upgrade pip
python -m pip install certifi cibuildwheel
python -m pip install -r requirements.txt
# - name: Build MacOS wheel
if: matrix.os == 'macos-latest'
env:
CIBW_BUILD: "cp37-macosx_x86_64 cp38-macosx_x86_64 cp311-macosx_x86_64 cp39-macosx_x86_64 cp310-macosx_x86_64 cp311-macosx_x86_64 cp312-macosx_x86_64"
CIBW_BEFORE_ALL: brew install libomp
CIBW_BEFORE_BUILD_MACOS: >
python -m pip install pip -U &&
python -m pip install setuptools &&
python -m pip install numpy &&
python -m pip install cython
run: python -m cibuildwheel --platform macos --output-dir dist

Check failure on line 106 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build and Test

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 106, Col: 9): 'run' is already defined
- name: Build linux wheels
if: matrix.os == 'ubuntu-latest'
env:
CIBW_BUILD: "cp37-manylinux_x86_64 cp38-manylinux_x86_64 cp39-manylinux_x86_64 cp310-manylinux_x86_64 cp311-manylinux_x86_64 "
CIBW_BEFORE_BUILD_LINUX: >
python -m pip install pip -U &&
python -m pip install setuptools &&
python -m pip install setuptools -U &&
python -m pip install install "numpy<1.25" &&
python -m pip install cython
run: python -m cibuildwheel --platform linux --output-dir dist
- uses: actions/upload-artifact@v2
with:
name: wheels
path: ./dist/*.whl