-
Notifications
You must be signed in to change notification settings - Fork 110
141 lines (119 loc) · 4.08 KB
/
main.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
name: Tbots CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
software-tests:
name: Ubuntu 22.04 Build
runs-on: ubuntu-22.04
steps:
# checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: Environment Setup
run: |
"${GITHUB_WORKSPACE}"/environment_setup/setup_software.sh
- name: Software Build Test
run: |
cd src
bazel build --show_timestamps \
-- //... -//software:unix_full_system \
-//software/simulated_tests/... \
-//software/ai/hl/... \
-//software/field_tests/... \
-//software/jetson_nano/... \
- name: Jetson Nano Build Test
run: |
bazel build --cpu=jetson_nano //software/jetson_nano:thunderloop_main
software-tests:
name: Software Tests
runs-on: ubuntu-20.04
steps:
# checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: Environment Setup
run: |
"${GITHUB_WORKSPACE}"/environment_setup/setup_software.sh
- name: Software Test
run: |
cd src
bazel test --show_timestamps \
-- //... -//software:unix_full_system \
-//software/simulated_tests/... \
-//software/ai/hl/... \
-//software/field_tests/... \
jetson-nano-tests:
name: Jetson Nano Software Tests
runs-on: ubuntu-20.04
steps:
# checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: Environment Setup
run: |
"${GITHUB_WORKSPACE}"/environment_setup/setup_software.sh
- name: Install and start redis server
run: |
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz >/dev/null
cd redis-stable
make >/dev/null
make install >/dev/null
redis-server --daemonize yes
- name: Stop redis server
run: |
redis-cli shutdown
- name: Jetson Nano Build
run: |
cd src
bazel build --cpu=jetson_nano //software/jetson_nano:thunderloop_main
simulated-gameplay-tests:
name: Simulated Gameplay Tests
runs-on: ubuntu-20.04
steps:
# checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: Environment Setup
run: |
"${GITHUB_WORKSPACE}"/environment_setup/setup_software.sh
- name: Simulated Test Run 1 (Continue on error)
# make sure that replays are uploaded even if tests fail
continue-on-error: true
run: |
cd src
bazel test --show_timestamps \
//software:unix_full_system \
//software/simulated_tests/... \
//software/ai/hl/...
- name: Upload simulated test proto logs
uses: actions/upload-artifact@v3
with:
name: blue-ai-proto-logs
path: |
/tmp/tbots/blue/logs
- name: Upload simulated test proto logs
uses: actions/upload-artifact@v3
with:
name: yellow-ai-proto-logs
path: |
/tmp/tbots/yellow/logs
- name: Simulated Test Run 2 (Continue on error)
# Run a second time without checking for errors
continue-on-error: true
run: |
cd src
bazel test --show_timestamps \
//software:unix_full_system \
//software/simulated_tests/... \
//software/ai/hl/...
- name: Simulated Test Run 3 (Check for errors)
# Run Simulated Tests a third time and finally check for failures
run: |
cd src
bazel test --show_timestamps \
//software:unix_full_system \
//software/simulated_tests/... \
//software/ai/hl/...