Skip to content

Implement ETag

Implement ETag #2476

Workflow file for this run

# 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:
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, dynamic allocation off
- args: "-DOC_IPV4_ENABLED=ON -DOC_TCP_ENABLED=ON -DOC_DYNAMIC_ALLOCATION_ENABLED=OFF"
# ipv4 on, tcp on, pki off
- args: "-DOC_IPV4_ENABLED=ON -DOC_TCP_ENABLED=ON -DOC_PKI_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, ipv4 on
- args: "-DOC_SECURITY_ENABLED=OFF -DOC_IPV4_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
- args: "-DOC_REPRESENTATION_REALLOC_ENCODING_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_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: 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_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: 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
install_faketime: true
# 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_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: 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 }}
install_faketime: ${{ matrix.install_faketime }}