Skip to content

Commit

Permalink
B
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielius1922 committed Sep 4, 2023
1 parent 3a9f0a4 commit 6ad0131
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/plgd-device-test-with-cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ on:
type: string
required: false
default: P256
clang:
description: Use clang instead of gcc to build cloud server
type: boolean
required: false
default: false
coverage:
type: boolean
required: false
Expand All @@ -42,6 +47,7 @@ env:
CERT_TOOL_IMAGE: ghcr.io/plgd-dev/hub/cert-tool:vnext
CERT_PATH: .tmp/pki_certs
CLOUD_SERVER_DOCKER_FILE: docker/apps/Dockerfile.cloud-server-debug
CLOUD_SERVER_DOCKER_FILE_CLANG: docker/apps/Dockerfile.cloud-server-debug-clang
CLOUD_SERVER_DOCKER_TAG: dbg

jobs:
Expand All @@ -60,7 +66,7 @@ jobs:
with:
context: .
push: false
file: ${{ env.CLOUD_SERVER_DOCKER_FILE }}
file: ${{ (inputs.clang && env.CLOUD_SERVER_DOCKER_FILE_CLANG) || env.CLOUD_SERVER_DOCKER_FILE }}
tags: ${{ env.CLOUD_SERVER_DOCKER_TAG }}
build-args: |
BUILD_ARGS=${{ inputs.build_args }}
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/plgd-device-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'master' }}

env:
CLOUD_SERVER_DOCKER_FILE: docker/apps/Dockerfile.cloud-server-debug
CLOUD_SERVER_DOCKER_FILE_CLANG: docker/apps/Dockerfile.cloud-server-debug-clang

on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
Expand Down Expand Up @@ -43,16 +47,22 @@ jobs:
include:
- name: cloud-server-tsan
args: "-DOC_TSAN_ENABLED=ON"
clang: true
- name: cloud-server-tsan-access-in-RFOTM
args: "-DOC_TSAN_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
clang: true
- name: cloud-server-discovery-resource-observable-tsan
args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_TSAN_ENABLED=ON"
clang: true
- name: cloud-server-discovery-resource-observable-tsan-access-in-RFOTM
args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_TSAN_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON"
clang: true
- name: cloud-server-rep-realloc-tsan
args: "-DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_TSAN_ENABLED=ON"
clang: true
- name: cloud-server-discovery-resource-observable-access-in-RFOTM-rep-realloc-tsan
args: "-DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON -DOC_RESOURCE_ACCESS_IN_RFOTM_ENABLED=ON -DOC_REPRESENTATION_REALLOC_ENCODING_ENABLED=ON -DOC_TSAN_ENABLED=ON"
clang: true

uses: ./.github/workflows/plgd-device-test-with-cfg.yml
with:
Expand All @@ -61,4 +71,5 @@ jobs:
build_type: Debug
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' }}
clang: ${{ matrix.clang || false }}
skip: ${{ matrix.skip || false }}
4 changes: 2 additions & 2 deletions docker/apps/Dockerfile.cloud-server-debug
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ARG BUILD_ARGS
RUN apt-get update -y && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y bash ca-certificates cmake curl gdb git-core gcovr g++ make patch python3 --no-install-recommends
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y clang-15
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 200 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 200
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 100 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 100
COPY ./ /iotivity-lite/
RUN cd /iotivity-lite/ && git submodule update --recursive
RUN mkdir /iotivity-lite/build && \
Expand Down
2 changes: 1 addition & 1 deletion docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pids=()
echo "called_from_lib:libfaketimeMT.so.1" > /tmp/tsan.suppressions
# gcc-11 on ubuntu 22.04 with thread sanitizer enabled reports a double lock when
# pthread_cond_signal is called under a locked mutex
echo "mutex:signal_event_loop" >> /tmp/tsan.suppressions
# echo "mutex:signal_event_loop" >> /tmp/tsan.suppressions
for ((i=0;i<$NUM_DEVICES;i++)); do
export ASAN_OPTIONS="atexit=1:log_path=/tmp/${i}.asan.log:verify_asan_link_order=0"
# abort on first tsan problem found
Expand Down

0 comments on commit 6ad0131

Please sign in to comment.