Skip to content

Add OC_API annotations to oc_buffer_settings.h #2377

Add OC_API annotations to oc_buffer_settings.h

Add OC_API annotations to oc_buffer_settings.h #2377

# 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
- name: cloud-server-discovery-resource-observable-access-in-RFOTM-rep-realloc-concurrent-requests-1
# same configuration as "cloud-server-discovery-resource-observable-access-in-RFOTM-rep-realloc-concurrent-requests-1" 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 -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_DEVICE_MAX_NUM_CONCURRENT_REQUESTS=1"
- name: cloud-server-discovery-resource-observable-access-in-RFOTM-rep-realloc-concurrent-requests-1-tsan
build_args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_DEVICE_MAX_NUM_CONCURRENT_REQUESTS=1 -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' }}