-
Notifications
You must be signed in to change notification settings - Fork 67
210 lines (190 loc) · 11.3 KB
/
plgd-hub-tests.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Run plgd/hub tests with cloud_server
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'master' }}
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
build_type:
description: "Type of the build"
type: string
default: "Debug"
cert_signature_algorithm:
type: choice
description: Signature algorithm used in generated certificates
options:
- ECDSA-SHA256
- ECDSA-SHA384
# - ECDSA-SHA512
default: ECDSA-SHA256
cert_elliptic_curve:
type: choice
description: Elliptic curve used to generate keys in certificates
options:
- P256
- P384
# - P521
default: P256
jobs:
plgd-hub-test:
strategy:
fail-fast: false
matrix:
include:
- name: cloud-server
build_args: ""
- name: cloud-server-asan
build_args: "-DOC_ASAN_ENABLED=ON"
- name: cloud-server-tsan
build_args: "-DOC_TSAN_ENABLED=ON"
# GCC thread-sanitizer keeps reporting false positives, so we use clang instead for tests with thread-sanitizer
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
- name: cloud-server-simulate-tpm-asan
build_args: "-DOC_ASAN_ENABLED=ON"
args: "--simulate-tpm"
- name: cloud-server-time-2000-01-01
build_args: ""
docker_args: '-e FAKETIME="@2000-01-01 11:12:13"'
args: "--disable-tls-verify-time"
- name: cloud-server-time-2000-01-01-asan
build_args: "-DOC_ASAN_ENABLED=ON"
docker_args: '-e FAKETIME="@2000-01-01 11:12:13"'
args: "--disable-tls-verify-time"
- name: cloud-server-time-2000-01-01-tsan
build_args: "-DOC_TSAN_ENABLED=ON"
docker_args: '-e FAKETIME="@2000-01-01 11:12:13"'
args: "--disable-tls-verify-time"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
- name: cloud-server-time-2100-01-01
build_args: ""
docker_args: '-e FAKETIME="@2100-01-01 11:12:13"'
args: "--disable-tls-verify-time"
- name: cloud-server-time-2100-01-01-asan
build_args: "-DOC_ASAN_ENABLED=ON"
docker_args: '-e FAKETIME="@2100-01-01 11:12:13"'
args: "--disable-tls-verify-time"
- name: cloud-server-time-2100-01-01-tsan
build_args: "-DOC_TSAN_ENABLED=ON"
docker_args: '-e FAKETIME="@2100-01-01 11:12:13"'
args: "--disable-tls-verify-time"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
- name: cloud-server-set-mbedtls-time-2000-01-01
build_args: ""
docker_args: -e FAKETIME="@2000-01-01 11:12:13"
args: --time $(date --iso-8601=seconds)
- name: cloud-server-set-system-time-2000-01-01
build_args: ""
docker_args: -e FAKETIME="@2000-01-01 11:12:13"
args: --time $(date --iso-8601=seconds) --set-system-time
- name: cloud-server-access-in-RFOTM
build_args: "-DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
- name: cloud-server-asan-access-in-RFOTM
build_args: "-DOC_ASAN_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
- name: cloud-server-tsan-access-in-RFOTM
build_args: "-DOC_TSAN_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
- name: cloud-server-discovery-resource-observable
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON"
- name: cloud-server-discovery-resource-observable-asan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_ASAN_ENABLED=ON"
- name: cloud-server-discovery-resource-observable-tsan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_TSAN_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
- name: cloud-server-discovery-resource-observable-access-in-RFOTM
# same configuration as "cloud-server-discovery-resource-observable-access-in-RFOTM" in the SonarCloud scan job, skip for events that trigger both jobs
skip: ${{ github.event_name != 'workflow_dispatch' }}
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
- name: cloud-server-discovery-resource-observable-asan-access-in-RFOTM
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_ASAN_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
- name: cloud-server-discovery-resource-observable-tsan-access-in-RFOTM
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_TSAN_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
- name: cloud-server-rep-realloc
build_args: "-DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON"
- name: cloud-server-rep-realloc-asan
build_args: "-DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_ASAN_ENABLED=ON"
- name: cloud-server-rep-realloc-tsan
build_args: "-DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_TSAN_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
- name: cloud-server-discovery-resource-observable-access-in-RFOTM-rep-realloc
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON"
- name: cloud-server-discovery-resource-observable-access-in-RFOTM-rep-realloc-asan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_ASAN_ENABLED=ON"
- name: cloud-server-discovery-resource-observable-access-in-RFOTM-rep-realloc-tsan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_TSAN_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
# ports
- name: cloud-server-tcp-disabled
args: "--udp-port 61234 --udp-port4 61234 --dtls-port 61235 --dtls-port4 61235 --tcp-port -1 --tcp-port4 -1 --tls-port -1 --tls-port4 -1"
build_args: ""
- name: cloud-server-ipv6-disabled
args: "--udp-port -1 --udp-port4 61234 --dtls-port -1 --dtls-port4 61235 --tcp-port -1 --tcp-port4 61234 --tls-port -1 --tls-port4 61235"
build_args: ""
- name: dtls-cloud-server
build_args: ""
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-asan
build_args: "-DOC_ASAN_ENABLED=ON"
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-tsan
build_args: "-DOC_TSAN_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-discovery-resource-observable
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON"
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-discovery-resource-observable-asan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_ASAN_ENABLED=ON"
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-discovery-resource-observable-tsan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_TSAN_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-rep-realloc
# same configuration as "dtls-cloud-server-rep-realloc" in the SonarCloud scan job, skip for events that trigger both jobs
skip: ${{ github.event_name != 'workflow_dispatch' }}
build_args: "-DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON"
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-rep-realloc-asan
build_args: "-DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_ASAN_ENABLED=ON"
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-rep-realloc-tsan
build_args: "-DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_TSAN_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-discovery-resource-observable-rep-realloc
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON"
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-discovery-resource-observable-rep-realloc-asan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_ASAN_ENABLED=ON"
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: dtls-cloud-server-discovery-resource-observable-rep-realloc-tsan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_TSAN_ENABLED=ON"
docker_file: docker/apps/Dockerfile.cloud-server-debug-clang
hub_args: "-e COAP_GATEWAY_UDP_ENABLED=true"
- name: cloud-server-release-discovery-resource-observable-access-in-RFOTM-rep-realloc
build_args: "-DOC_DEBUG_ENABLED=OFF -DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON"
build_type: Release
docker_file: docker/apps/Dockerfile.cloud-server
uses: ./.github/workflows/plgd-hub-test-with-cfg.yml
with:
name: ${{ matrix.name }}
build_args: -DOC_DEBUG_ENABLED=ON -DOC_COLLECTIONS_IF_CREATE_ENABLED=ON -DOC_MNT_ENABLED=ON -DOC_OSCORE_ENABLED=OFF -DPLGD_DEV_TIME_ENABLED=ON -DOC_ETAG_ENABLED=ON -DOC_SOFTWARE_UPDATE_ENABLED=ON ${{ matrix.build_args }}
build_type: ${{ (github.event_name == 'workflow_dispatch' && inputs.build_type) || (matrix.build_type || 'Debug') }}
hub_args: ${{ matrix.hub_args }}
args: ${{ matrix.args }}
docker_args: ${{ matrix.docker_args }}
cert_signature_algorithm: ${{ (github.event_name == 'workflow_dispatch' && inputs.cert_signature_algorithm) || 'ECDSA-SHA256' }}
cert_elliptic_curve: ${{ (github.event_name == 'workflow_dispatch' && inputs.cert_elliptic_curve) || 'P256' }}
skip: ${{ matrix.skip || false }}
docker_file: ${{ matrix.docker_file || 'docker/apps/Dockerfile.cloud-server-debug' }}