-
Notifications
You must be signed in to change notification settings - Fork 16
71 lines (63 loc) · 2.22 KB
/
testsuite.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: TestSuite
on: [push, pull_request]
jobs:
get_python_versions:
name: "Determine Python versions"
runs-on: ubuntu-latest
outputs:
min-python: ${{ steps.nep29.outputs.min-python }}
max-python: ${{ steps.nep29.outputs.max-python }}
steps:
- name: "calculate versions according to NEP29"
id: nep29
uses: mstimberg/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
testing:
needs: [get_python_versions]
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} (32bit: ${{ matrix.float_dtype_32 }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macOS-13]
float_dtype_32: [false, true]
python-version: ["${{ needs.get_python_versions.outputs.max-python }}"]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Conda and Python
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: "latest"
auto-activate-base: false
activate-environment: 'test_env'
python-version: ${{ matrix.python-version }}
- name: Install GeNN
run: |
# clone GeNN from github
git clone --depth=1 --no-single-branch https://github.com/genn-team/genn.git ../genn
cd ../genn
echo "GENN_PATH=$(pwd)" >> "$GITHUB_ENV"
# switch to stable release
git checkout 4.8.0
- name: Install Brian2 and dependencies
run: |
conda install -n test_env --quiet --yes -c conda-forge pip pytest cython sympy pyparsing numpy jinja2 scipy sphinx
pip install .
- name: Run Tests
run: |
cd $GITHUB_WORKSPACE/.. # move out of the workspace to avoid direct import
if [ $FLOAT_DTYPE_32 == 'true' ]; then
python -Wd $GITHUB_WORKSPACE/scripts/run_brian_tests_CPU_32bit.py
else
python -Wd $GITHUB_WORKSPACE/scripts/run_brian_tests_CPU.py
fi
env:
AGENT_OS: ${{runner.os}}
FLOAT_DTYPE_32: ${{ matrix.float_dtype_32 }}