Skip to content

Commit

Permalink
mod build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoli committed Aug 1, 2024
1 parent ad3c551 commit c8a07ae
Showing 1 changed file with 37 additions and 41 deletions.
78 changes: 37 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
python-version: [3.8]
os: [ubuntu-latest] #ubuntu-latest [macos-latest, ] #
os: [ubuntu-latest] #ubuntu-latest [macos-latest, ] #

env:
PYTHON_VERSION: ${{ matrix.python-version }}
Expand All @@ -30,39 +30,39 @@ jobs:
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
- 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 }}
Expand All @@ -72,7 +72,6 @@ jobs:
os: [macos-latest, ubuntu-latest]

steps:

- name: Checkout code
uses: actions/checkout@v2

Expand All @@ -84,16 +83,15 @@ jobs:
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'

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
- 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"
Expand All @@ -116,11 +114,9 @@ jobs:
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
path: ./dist/*.whl

0 comments on commit c8a07ae

Please sign in to comment.