-
Notifications
You must be signed in to change notification settings - Fork 66
147 lines (139 loc) · 8.1 KB
/
cmake-linux.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
# Build on Linux with CMake and execute tests
name: CI-cmake building linux
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'master' }}
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
# 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"
clang:
description: "Compile using clang"
required: false
type: boolean
default: false
install_mbedtls:
description: "Install mbedTLS and use it for the build"
required: false
type: boolean
default: false
install_tinycbor:
description: "Install tinyCBOR and use it for the build"
required: false
type: boolean
default: false
jobs:
cmake_linux:
strategy:
fail-fast: false
matrix:
include:
# default (secure on, pki on, dynamic allocation on, tcp off, oscore on, cloud off, maintenance resource on, software update on, well-known core resource on, /oic/res observable, push notifications on, plgd-time on, etag on)
- args: ""
# ipv4 on
- args: "-DOC_IPV4_ENABLED=ON"
# access in RFOTM on
- args: "-DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
# tcp on
- args: "-DOC_TCP_ENABLED=ON"
# ipv4 on, tcp on
- args: "-DOC_IPV4_ENABLED=ON -DOC_TCP_ENABLED=ON"
# ipv4 on, tcp on, pki off
- args: "-DOC_IPV4_ENABLED=ON -DOC_TCP_ENABLED=ON -DOC_PKI_ENABLED=OFF"
# cloud on (ipv4+tcp on), dynamic allocation off
- args: "-DOC_CLOUD_ENABLED=ON -DOC_DYNAMIC_ALLOCATION_ENABLED=OFF"
# cloud on (ipv4+tcp on), collections create on
- args: "-DOC_CLOUD_ENABLED=ON -DOC_COLLECTIONS_IF_CREATE_ENABLED=ON"
# cloud on (ipv4+tcp on), collections create on, custom message buffer size, custom message buffer pool size, custom app data buffer size, custom app data buffer pool size
- args: "-DOC_CLOUD_ENABLED=ON -DOC_COLLECTIONS_IF_CREATE_ENABLED=ON -DOC_INOUT_BUFFER_SIZE=2048 -DOC_INOUT_BUFFER_POOL=4 -DOC_APP_DATA_BUFFER_SIZE=2048 -DOC_APP_DATA_BUFFER_POOL=4"
# debug on
- args: "-DOC_DEBUG_ENABLED=ON"
# debug on, cloud on (ipv4+tcp on)
- args: "-DOC_CLOUD_ENABLED=ON -DOC_DEBUG_ENABLED=ON"
# secure off, tcp on
- args: "-DOC_SECURITY_ENABLED=OFF -DOC_TCP_ENABLED=ON"
# secure off, ipv4 on, tcp on
- args: "-DOC_SECURITY_ENABLED=OFF -DOC_TCP_ENABLED=ON -DOC_IPV4_ENABLED=ON"
# rep realloc on, ocf 1.1 on
- args: "-DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_VERSION_1_1_0_ENABLED=ON"
# everything off (dynamic allocation off, secure off, pki off, idd off, oscore off, well-known core resource off, software update off, maintenance resource off, /oic/res observable off, push notifications off, plgd-time off, introspection off, etag off)
- args: "-DOC_DYNAMIC_ALLOCATION_ENABLED=OFF -DOC_SECURITY_ENABLED=OFF -DOC_PKI_ENABLED=OFF -DOC_IDD_API_ENABLED=OFF -DOC_OSCORE_ENABLED=OFF -DOC_WKCORE_ENABLED=OFF -DOC_SOFTWARE_UPDATE_ENABLED=OFF -DOC_MNT_ENABLED=OFF -DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=OFF -DOC_PUSH_ENABLED=OFF -DPLGD_DEV_TIME_ENABLED=OFF -DOC_INTROSPECTION_ENABLED=OFF -DOC_ETAG_ENABLED=OFF"
uses: ./.github/workflows/unit-test-with-cfg.yml
with:
build_args: -DOC_LOG_MAXIMUM_LOG_LEVEL=INFO -DOC_WKCORE_ENABLED=ON -DOC_SOFTWARE_UPDATE_ENABLED=ON -DOC_MNT_ENABLED=ON -DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_PUSH_ENABLED=ON -DPLGD_DEV_TIME_ENABLED=ON -DOC_ETAG_ENABLED=ON ${{ matrix.args }}
build_type: ${{ (github.event_name == 'workflow_dispatch' && inputs.build_type) || 'Debug' }}
clang: ${{ github.event_name == 'workflow_dispatch' && inputs.clang }}
coverage: false
install_mbedtls: ${{ github.event_name == 'workflow_dispatch' && inputs.install_mbedtls }}
install_tinycbor: ${{ github.event_name == 'workflow_dispatch' && inputs.install_tinycbor }}
cmake_linux_mbedtls3_5_0:
strategy:
fail-fast: false
matrix:
include:
# debug on, cloud on (ipv4+tcp on), collections create on
- args: "-DOC_DEBUG_ENABLED=ON -DOC_CLOUD_ENABLED=ON -DOC_COLLECTIONS_IF_CREATE_ENABLED=ON"
uses: ./.github/workflows/unit-test-with-cfg.yml
with:
build_args: -DOC_LOG_MAXIMUM_LOG_LEVEL=INFO -DOC_WKCORE_ENABLED=ON -DOC_SOFTWARE_UPDATE_ENABLED=ON -DOC_MNT_ENABLED=ON -DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_PUSH_ENABLED=ON -DPLGD_DEV_TIME_ENABLED=ON -DOC_ETAG_ENABLED=ON -DBUILD_MBEDTLS_FORCE_3_5_0=ON ${{ matrix.args }}
build_type: ${{ (github.event_name == 'workflow_dispatch' && inputs.build_type) || 'Debug' }}
clang: ${{ github.event_name == 'workflow_dispatch' && inputs.clang }}
coverage: false
install_mbedtls: ${{ github.event_name == 'workflow_dispatch' && inputs.install_mbedtls }}
install_tinycbor: ${{ github.event_name == 'workflow_dispatch' && inputs.install_tinycbor }}
cmake_linux_preinstalled:
uses: ./.github/workflows/unit-test-with-cfg.yml
with:
# cloud on (ipv4+tcp on), collections create on, maintenance resource on, well-known core resource on, software update on, /oic/res observable on, push notification on, plgd-time on, etag on
build_args: -DOC_LOG_MAXIMUM_LOG_LEVEL=INFO -DOC_CLOUD_ENABLED=ON -DOC_COLLECTIONS_IF_CREATE_ENABLED=ON -DOC_MNT_ENABLED=ON -DOC_WKCORE_ENABLED=ON -DOC_SOFTWARE_UPDATE_ENABLED=ON -DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_PUSH_ENABLED=ON -DPLGD_DEV_TIME_ENABLED=ON -DOC_ETAG_ENABLED=ON
build_type: ${{ (github.event_name == 'workflow_dispatch' && inputs.build_type) || 'Debug' }}
clang: ${{ github.event_name == 'workflow_dispatch' && inputs.clang }}
coverage: false
install_mbedtls: ${{ github.event_name != 'workflow_dispatch' }}
install_tinycbor: ${{ github.event_name != 'workflow_dispatch' }}
cmake_linux_sanitized:
strategy:
fail-fast: false
matrix:
include:
# address sanitizer
- args: -DOC_ASAN_ENABLED=ON
install_faketime: true
# leak sanitizer
- args: -DOC_LSAN_ENABLED=ON
# there is some linker issue when LSAN and faketime are used together
install_faketime: false
# thread sanitizer
- args: -DOC_TSAN_ENABLED=ON
# GCC thread-sanitizer keeps reporting false positives, so we use clang instead for tests with thread-sanitizer
clang: true
install_faketime: false
# static allocation requires additional thread synchronization
- args: -DOC_TSAN_ENABLED=ON -DOC_DYNAMIC_ALLOCATION_ENABLED=OFF
# GCC thread-sanitizer keeps reporting false positives, so we use clang instead for tests with thread-sanitizer
clang: true
install_faketime: false
# undefined behaviour sanitizer
- args: -DOC_UBSAN_ENABLED=ON
install_faketime: true
# TODO: update gtest
# - args: -DOC_MSAN_ENABLED=ON
# install_faketime: true
uses: ./.github/workflows/unit-test-with-cfg.yml
with:
build_args: -DOC_LOG_MAXIMUM_LOG_LEVEL=INFO -DOC_CLOUD_ENABLED=ON -DOC_COLLECTIONS_IF_CREATE_ENABLED=ON -DOC_MNT_ENABLED=ON -DOC_WKCORE_ENABLED=ON -DOC_SOFTWARE_UPDATE_ENABLED=ON -DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_PUSH_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON -DPLGD_DEV_TIME_ENABLED=ON -DOC_ETAG_ENABLED=ON ${{ matrix.args }}
build_type: ${{ (github.event_name == 'workflow_dispatch' && inputs.build_type) || 'Debug' }}
clang: ${{ ((github.event_name == 'workflow_dispatch' && inputs.clang) || matrix.clang) || false }}
coverage: false
install_mbedtls: ${{ github.event_name == 'workflow_dispatch' && inputs.install_mbedtls }}
install_tinycbor: ${{ github.event_name == 'workflow_dispatch' && inputs.install_tinycbor }}
install_faketime: ${{ matrix.install_faketime }}