Skip to content

fix: pin numpy version #651

fix: pin numpy version

fix: pin numpy version #651

Workflow file for this run

on: [push, pull_request]
name: release-please
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff
- name: Autoformat with black
run: |
black .
- name: Lint with ruff
run: |
ruff check . --fix
- name: Check for local changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "style: style fixes by ruff and autoformatting by black"
fi
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: style fixes by ruff and autoformatting by black"
continuous-integration:
name: Continuous integration ${{ matrix.os }} python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ${{ fromJSON(vars.BUILD_OS)}}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python }}
- name: Installing dependencies
shell: bash -l {0}
run: |
conda install -c loop3d -c conda-forge --file dependencies.txt -y
conda install pytest -y
- name: Building and install
shell: bash -l {0}
run: |
pip install .
- name: Testing
shell: bash -l {0}
run: |
pytest
documentation-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
cp CHANGELOG.md docs/source/CHANGELOG.md
docker build . -t=docs -f docs/Dockerfile
docker run -v $(pwd):/map2loop docs bash map2loop/docs/build_docs.sh
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: docs
path: docs/build/html
release-please:
runs-on: ubuntu-latest
needs: continuous-integration
if: github.ref == 'refs/heads/master'
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
release-type: python
package-name: map2loop
include-v-in-tag: false
outputs:
release_created: ${{ steps.release.outputs.release_created }}
conda-deploy:
name: Uploading to Loop3d for python ${{ matrix.os }})
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ${{ fromJSON(vars.BUILD_OS)}}
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
steps:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
- uses: actions/checkout@v4
- name: update submodules
run: |
git submodule update --init --recursive
- name: Add msbuild to PATH
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v1.0.2
- name: Conda build'
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
shell: bash -l {0}
run: |
conda install conda-build
conda install -c loop3d --file dependencies.txt -y
conda build -c loop3d --no-test --python ${{ matrix.python-version }} --output-folder conda conda
conda install anaconda-client -y
- name: upload windows
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
if: matrix.os == 'windows-latest'
shell: bash -l {0}
run: |
anaconda upload --label main conda/win-64/*.tar.bz2
- name: upload linux
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
if: matrix.os == 'ubuntu-latest'
shell: bash -l {0}
run: |
anaconda upload --label main conda/linux-64/*.tar.bz2
- name: upload macosx
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
if: matrix.os == 'macos-latest'
shell: bash -l {0}
run: |
anaconda upload --label main conda/osx-64/*.tar.bz2
documentation-deploy:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: docs
path: docs
- name: ls
run: |
ls -l docs
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.