-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update requirements-dev-raw.txt * update tests * recovery * upgrade tests * Update CI.yml * Revert "Update CI.yml" This reverts commit 343476f. * update tests * update tests * update CI * update CI * update CI --------- Co-authored-by: He Sichao <[email protected]>
- Loading branch information
1 parent
5112f25
commit 26d09c5
Showing
26 changed files
with
1,548 additions
and
2,570 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,12 +16,10 @@ permissions: | |
contents: read # to fetch code | ||
actions: write # to cancel previous workflows | ||
|
||
|
||
#on: | ||
# push: | ||
# branches: [ master ] | ||
# pull_request: | ||
# branches: [ master ] | ||
# This is what will cancel the workflow | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
|
||
jobs: | ||
|
@@ -30,14 +28,16 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11"] | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # ratchet: styfle/cancel-workflow-action@0.12.1 | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v4 | ||
- name: Print concurrency group | ||
run: echo '${{ github.workflow }}-${{ github.ref }}' | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
|
@@ -53,125 +53,64 @@ jobs: | |
cd brainpy | ||
pytest _src/ | ||
test_linux_with_taichi_numba: | ||
runs-on: ubuntu-latest | ||
test_macos: | ||
runs-on: macos-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [ "3.9", "3.10", "3.11"] | ||
python-version: [ "3.9", "3.10", "3.11" ] | ||
|
||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v4 | ||
- name: Print concurrency group | ||
run: echo '${{ github.workflow }}-${{ github.ref }}' | ||
- 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 | ||
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: | ||
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: | ||
runs-on: windows-latest | ||
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"] | ||
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/ | ||
- name: Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
- uses: actions/checkout@v4 | ||
- name: Print concurrency group | ||
run: echo '${{ github.workflow }}-${{ github.ref }}' | ||
- 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/ |
Oops, something went wrong.