From fad5dc1d27faecefa918595fe400ba77f2941e81 Mon Sep 17 00:00:00 2001 From: Aleksandr Ivanov Date: Wed, 29 Jan 2025 17:14:43 +0200 Subject: [PATCH] Fix review comments Signed-off-by: Aleksandr Ivanov --- .github/workflows/sanitize.yaml | 13 ++++++++----- docker/build_deps.sh | 8 ++++---- docker/sanitizers/Dockerfile | 2 -- docker/sanitizers/README.md | 2 +- docker/sanitizers/build_sanitizer.sh | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) mode change 100644 => 100755 docker/sanitizers/build_sanitizer.sh diff --git a/.github/workflows/sanitize.yaml b/.github/workflows/sanitize.yaml index a7a6fc83e..64bfea5b3 100644 --- a/.github/workflows/sanitize.yaml +++ b/.github/workflows/sanitize.yaml @@ -1,8 +1,10 @@ name: Sanitize on: - pull_request_review: - types: [submitted] + # pull_request_review: + # types: [submitted] + branches: + - sanitizers-in-docker concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -16,12 +18,13 @@ jobs: mode: ["asan", "msan", "tsan", "ubsan"] fail-fast: false runs-on: ubuntu-24.04 - if: github.event.review.state == 'APPROVED' + # if: github.event.review.state == 'APPROVED' steps: - uses: actions/checkout@v4 - - name : Strip ubuntu-24.04 to avoid space quota exceeding + - name : Purge runner + # Strip the runner to avoid space quota exceeding run: | - sudo apt-get purge \ + sudo apt-get purge -y \ azure-cli microsoft-edge-stable google-cloud-cli \ google-chrome-stable temurin-21-jdk temurin-17-jdk \ temurin-11-jdk dotnet-sdk-8.0 firefox temurin-8-jdk \ diff --git a/docker/build_deps.sh b/docker/build_deps.sh index f4d563526..bcf5601b7 100755 --- a/docker/build_deps.sh +++ b/docker/build_deps.sh @@ -2,16 +2,16 @@ # This script downloads, builds, and installs the required build dependencies of BMQ # from github.com/bloomberg. Software packages are installed to the /opt/bb prefix. -# If the optional argument 'only-download' is provided, the script will only download -# dependencies, build and install steps are skipped. +# If the optional argument '--only-download' is provided, the script will only download +# dependencies (build and install steps are skipped). set -euxo pipefail if [ $# == 1 ]; then - if [[ $1 == "only-download" ]]; then + if [[ $1 == "--only-download" ]]; then DO_BUILD=false else - echo "Unexpected optional argument, only 'only-download' is supported" + echo "Unexpected optional argument, only '--only-download' is supported" exit 1 fi else diff --git a/docker/sanitizers/Dockerfile b/docker/sanitizers/Dockerfile index 2f0014c41..b781481bc 100644 --- a/docker/sanitizers/Dockerfile +++ b/docker/sanitizers/Dockerfile @@ -17,8 +17,6 @@ COPY src src COPY CMakeLists.txt ./ # Build with sanitizer instrumentation -RUN chmod +x docker/build_deps.sh -RUN chmod +x docker/sanitizers/build_sanitizer.sh RUN docker/sanitizers/build_sanitizer.sh ${SANITIZER_NAME} # Run unit tests diff --git a/docker/sanitizers/README.md b/docker/sanitizers/README.md index 1fe57b5e6..7c871fb8d 100644 --- a/docker/sanitizers/README.md +++ b/docker/sanitizers/README.md @@ -1,5 +1,5 @@ # Purpose -This folder contains scripts to run BlazingMQ and it dependencies under sanitizer (asan, msan, tsan and ubsan) in Docker container. +This folder contains scripts to run BlazingMQ and its dependencies under sanitizer (asan, msan, tsan and ubsan) in Docker container. Usually sanitizers check is done on CI, but using Docker it is possible to run sanitizers check in both CI and local environment. diff --git a/docker/sanitizers/build_sanitizer.sh b/docker/sanitizers/build_sanitizer.sh old mode 100644 new mode 100755 index 9fed94719..08fdbcd7b --- a/docker/sanitizers/build_sanitizer.sh +++ b/docker/sanitizers/build_sanitizer.sh @@ -123,7 +123,7 @@ checkoutGitRepo "$(github_url madler/zlib)" "${ZLIB_TAG}" "zlib" # Download bde-tools, bde and ntf-core sources cd "${DIR_EXTERNAL}" -"${DIR_ROOT}"/docker/build_deps.sh "only-download" +"${DIR_ROOT}"/docker/build_deps.sh "--only-download" cd - # Build libc++ with required instrumentation