Skip to content

Commit

Permalink
iox-#692 Move tsan jobs into build-test.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Ibrahim Kuru <[email protected]>
  • Loading branch information
ibrhmkuru committed Feb 16, 2023
1 parent 2f87030 commit fced2e4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 26 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,19 @@ jobs:
- name: Run Address Sanitizer
run: ./tools/ci/build-test-macos-with-sanitizers.sh asan

build-test-ubuntu-with-thread-sanitizer-clang-latest:
# prevent stuck jobs consuming runners for 3 hours
timeout-minutes: 180
runs-on: ubuntu-latest
needs: pre-flight-check
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install iceoryx dependencies and clang-tidy
uses: ./.github/actions/install-iceoryx-deps-and-clang
- name: Run Thread Sanitizer
run: ./tools/ci/build-test-ubuntu-with-sanitizers.sh clang tsan

# gcc 5.4 is compiler used in QNX 7.0
build-test-ubuntu-with-gcc5:
# prevent stuck jobs consuming runners for 6 hours
Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/lint_master.yml

This file was deleted.

42 changes: 34 additions & 8 deletions tools/ci/build-test-ubuntu-with-sanitizers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,35 @@

set -e

COMPILER=${1:-gcc}
SANITIZER=${2:-asan}
COMPILER=gcc
SANITIZER=asan
SKIP_TEST=false

while (( "$#" )); do
case "$1" in
"gcc"|"clang")
COMPILER=$1
shift 1
;;
"asan"|"tsan")
SANITIZER=$1
shift 1
;;
"skip-tests")
SKIP_TEST=true
shift 1
;;
esac
done

msg() {
printf "\033[1;32m%s: %s\033[0m\n" ${FUNCNAME[1]} "$1"
}

msg "COMPILER : $COMPILER "
msg "SANITIZER : $SANITIZER "
msg "SKIP_TEST : $SKIP_TEST "

WORKSPACE=$(git rev-parse --show-toplevel)
cd "${WORKSPACE}"

Expand All @@ -49,11 +71,15 @@ if [ "$COMPILER" == "clang" ]; then
./tools/iceoryx_build_test.sh clean build-strict build-shared build-all clang debug $SANITIZER test-add-user out-of-tree
fi

msg "running all tests"
cd ./build
if [ "$SANITIZER" == "tsan" ]; then
./tools/run_tests.sh all continue-on-error
if [ "$SKIP_TEST" == "true" ]; then
msg "tests are skipped"
else
./tools/run_tests.sh all
msg "running all tests"
cd ./build
if [ "$SANITIZER" == "tsan" ]; then
./tools/run_tests.sh all continue-on-error
else
./tools/run_tests.sh all
fi
cd -
fi
cd -

0 comments on commit fced2e4

Please sign in to comment.