From c8a07ae8a1fc3abee93195fcede7743789b0e787 Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 1 Aug 2024 14:11:38 +0100 Subject: [PATCH] mod build.yml --- .github/workflows/build.yml | 78 ++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 566e874..a8609df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} @@ -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 }} @@ -72,7 +72,6 @@ jobs: os: [macos-latest, ubuntu-latest] steps: - - name: Checkout code uses: actions/checkout@v2 @@ -84,8 +83,7 @@ jobs: - uses: actions/setup-python@v2 name: Install Python with: - python-version: '3.8' - + python-version: "3.8" - name: Install python depencies run: | @@ -93,7 +91,7 @@ jobs: 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" @@ -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 \ No newline at end of file + path: ./dist/*.whl