Skip to content

Commit

Permalink
Update CI and remove taichi, numba from requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Routhleck committed Feb 23, 2024
1 parent ce43e4e commit 86cc096
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,37 @@ jobs:
cd brainpy
pytest _src/
test_linux_with_taichi_numba:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest taichi numba
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip uninstall brainpy -y
python setup.py install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 brainpy/ --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 brainpy/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
cd brainpy
pytest _src/
# test_linux_py37:
# runs-on: ubuntu-latest
Expand Down Expand Up @@ -116,6 +147,37 @@ jobs:
cd brainpy
pytest _src/
test_macos_with_taichi_numba:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest taichi numba
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
pip uninstall brainpy -y
python setup.py install
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 brainpy/ --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 brainpy/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
cd brainpy
pytest _src/
# test_macos_py37:
# runs-on: macos-latest
# strategy:
Expand Down
2 changes: 0 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
numpy
numba
brainpylib
jax
jaxlib
matplotlib
msgpack
tqdm
pathos
taichi==1.7.0

# test requirements
pytest
Expand Down

0 comments on commit 86cc096

Please sign in to comment.