clear_buffer_memory()
support clearing array
, compilation
, and …
#1047
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- '**' # matches every branch | |
pull_request: | |
branches: | |
- '**' # matches every branch | |
permissions: | |
contents: read # to fetch code | |
actions: write # to cancel previous workflows | |
#on: | |
# push: | |
# branches: [ master ] | |
# pull_request: | |
# branches: [ master ] | |
jobs: | |
test_linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.9", "3.10", "3.11"] | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # ratchet: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- 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 | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
pip uninstall brainpy -y | |
python setup.py install | |
- name: Test with pytest | |
run: | | |
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-raw.txt ]; then pip install -r requirements-dev-raw.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: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # ratchet: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- 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 | |
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi | |
pip uninstall brainpy -y | |
python setup.py install | |
- name: Test with pytest | |
run: | | |
cd brainpy | |
pytest -n auto --tb=short _src/ | |
test_windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ win-2019-16core ] | |
arch: [ AMD64 ] | |
python-version: ["3.9", "3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # ratchet: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- 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 -r requirements-dev.txt | |
pip uninstall brainpy -y | |
python setup.py install | |
- name: Test with pytest | |
run: | | |
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-raw.txt ]; then pip install -r requirements-dev-raw.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/ | |