-
Notifications
You must be signed in to change notification settings - Fork 22
156 lines (155 loc) · 4.93 KB
/
ci.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: CI testing
on:
pull_request: {}
push:
branches:
- main
- release-candidate-*
tags:
- v*
workflow_dispatch:
inputs:
debug_enabled:
description: Run the build with SSH debugging enabled
type: boolean
required: false
default: false
jobs:
static:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: nengo/nengo-bones/actions/setup@main
- uses: nengo/nengo-bones/actions/generate-and-check@main
- uses: nengo/nengo-bones/actions/run-script@main
with:
name: static
test:
needs:
- static
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
include:
- script: test
- script: remote-test
coverage-name: remote
tf-version: tensorflow==2.10
nengo-version: git+https://github.com/nengo/nengo.git#egg=nengo[tests]
- script: test-coverage
coverage-name: latest
python: "3.10"
nengo-version: git+https://github.com/nengo/nengo.git#egg=nengo[tests]
scipy-version: scipy
- script: test-coverage
coverage-name: oldest
python: "3.7"
numpy-version: numpy==1.16.0
tf-version: tensorflow==2.3.4
nengo-version: nengo[tests]==3.0.0
fail-fast: false
env:
NUMPY_VERSION: ${{ matrix.numpy-version || 'numpy>=1.16.0' }}
TF_VERSION: ${{ matrix.tf-version || 'tensorflow' }}
NENGO_VERSION: ${{ matrix.nengo-version || 'nengo[tests]' }}
SCIPY_VERSION: ${{ matrix.scipy-version || 'noop' }}
TEST_ARGS: ${{ matrix.test_args }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_CONFIG: ${{ secrets.SSH_CONFIG }}
steps:
- uses: nengo/nengo-bones/actions/setup@main
with:
python-version: ${{ matrix.python || '3.9' }}
- name: Write secrets to file
run: |
mkdir -p ~/.ssh
echo '${{ secrets.AZURE_PEM }}' > ~/.ssh/azure.pem
- uses: nengo/nengo-bones/actions/generate-and-check@main
- uses: nengo/nengo-bones/actions/run-script@main
with:
name: ${{ matrix.script }}
- uses: actions/upload-artifact@v3
if: ${{ always() && matrix.coverage-name }}
with:
name: coverage-${{ matrix.coverage-name }}
path: .coverage
test-advanced:
needs:
- test
timeout-minutes: 45
strategy:
matrix:
include:
- script: remote-docs
tf-version: tensorflow==2.10
- script: remote-examples
tf-version: tensorflow==2.10
- script: test
test_args: --unroll-simulation 5 --dtype float64 --simulator-only
- script: test
test_args: --inference-only --simulator-only
- script: test
os: windows-latest
- script: test
os: windows-latest
python: "3.7"
numpy-version: numpy==1.16.0
tf-version: tensorflow==2.3.4
nengo-version: nengo[tests]==3.0.0
- script: test
os: windows-latest
python: "3.10"
tf-version: tensorflow
nengo-version: git+https://github.com/nengo/nengo.git#egg=nengo[tests]
fail-fast: false
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
env:
NUMPY_VERSION: ${{ matrix.numpy-version || 'numpy>=1.16.0' }}
TF_VERSION: ${{ matrix.tf-version || 'tensorflow' }}
NENGO_VERSION: ${{ matrix.nengo-version || 'nengo[tests]' }}
SCIPY_VERSION: noop
TEST_ARGS: ${{ matrix.test_args }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_CONFIG: ${{ secrets.SSH_CONFIG }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: nengo/nengo-bones/actions/setup@main
with:
python-version: ${{ matrix.python || '3.9' }}
- name: Write secrets to file
run: |
mkdir -p ~/.ssh
echo '${{ secrets.AZURE_PEM }}' > ~/.ssh/azure.pem
- uses: nengo/nengo-bones/actions/generate-and-check@main
- uses: nengo/nengo-bones/actions/run-script@main
with:
name: ${{ matrix.script }}
coverage:
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- test
if: ${{ always() }}
steps:
- uses: nengo/nengo-bones/actions/coverage-report@main
deploy:
needs:
- test-advanced
if: >-
startsWith(github.ref_name, 'release-candidate-') ||
(github.ref_type == 'tag' && startsWith(github.ref_name, 'v'))
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Write .pypirc to file
run: |
echo '${{ secrets.PYPIRC_FILE }}' > ~/.pypirc
- uses: actions/checkout@v3
- uses: nengo/nengo-bones/actions/setup@main
with:
python-version: "3.10"
- uses: nengo/nengo-bones/actions/generate-and-check@main
- uses: nengo/nengo-bones/actions/run-script@main
with:
name: deploy