-
Notifications
You must be signed in to change notification settings - Fork 34
111 lines (109 loc) · 3.06 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
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
defaults:
run:
shell: bash -el {0}
jobs:
static:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: nengo/nengo-bones/actions/setup@main
with:
python-version: "3.9"
- uses: nengo/nengo-bones/actions/generate-and-check@main
- uses: nengo/nengo-bones/actions/run-script@main
with:
name: static
test:
needs:
- static
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
matrix:
include:
- script: remote-test
coverage-name: remote
tf-version: tensorflow==2.10
- script: test
python-version: "3.11"
coverage-name: latest
- script: test
tf-version: tensorflow==2.4.4
python-version: "3.8"
coverage-name: oldest
- script: test
tf-version: tensorflow~=2.6.0
python-version: "3.8"
coverage-name: tf-2.6
- script: remote-docs
tf-version: tensorflow==2.10
python-version: "3.9"
- script: remote-examples
tf-version: tensorflow==2.10
fail-fast: false
env:
TF_VERSION: ${{ matrix.tf-version || 'tensorflow' }}
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-version || '3.10' }}
- uses: nengo/nengo-bones/actions/generate-and-check@main
- name: Write secrets to file
run: |
mkdir -p ~/.ssh
echo '${{ secrets.AZURE_PEM }}' > ~/.ssh/azure.pem
- 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
coverage:
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- test
if: ${{ always() }}
steps:
- uses: nengo/nengo-bones/actions/coverage-report@main
deploy:
needs:
- test
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