Skip to content

Commit

Permalink
[CI][NFC] Fix shellcheck warnings in CI scripts (#86877)
Browse files Browse the repository at this point in the history
This fixes all shellcheck warnings we have in `monolithic-linux.sh` and
`monolithic-windows.sh`.
All of them have to do with
[SC2086](https://www.shellcheck.net/wiki/SC2086) - Double quote to
prevent globbing and word splitting.
  • Loading branch information
marcauberer committed Mar 27, 2024
1 parent d8fe2e4 commit 0a17eed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .ci/monolithic-linux.sh
Expand Up @@ -18,7 +18,7 @@ set -o pipefail

MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
rm -rf ${BUILD_DIR}
rm -rf "${BUILD_DIR}"

ccache --zero-stats

Expand All @@ -37,8 +37,8 @@ projects="${1}"
targets="${2}"

echo "--- cmake"
pip install -q -r ${MONOREPO_ROOT}/mlir/python/requirements.txt
cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LLVM_ENABLE_PROJECTS="${projects}" \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
Expand All @@ -54,4 +54,4 @@ cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \

echo "--- ninja"
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets}
ninja -C "${BUILD_DIR}" -k 0 "${targets}"
8 changes: 4 additions & 4 deletions .ci/monolithic-windows.sh
Expand Up @@ -19,7 +19,7 @@ set -o pipefail
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"

rm -rf ${BUILD_DIR}
rm -rf "${BUILD_DIR}"

if [[ -n "${CLEAR_CACHE:-}" ]]; then
echo "clearing sccache"
Expand All @@ -37,14 +37,14 @@ projects="${1}"
targets="${2}"

echo "--- cmake"
pip install -q -r ${MONOREPO_ROOT}/mlir/python/requirements.txt
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt

# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
# on fixing a build reliability issue on the build server, please
# see https://github.com/llvm/llvm-project/pull/82393 and
# https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840/40
# for further information.
cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
-D LLVM_ENABLE_PROJECTS="${projects}" \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
Expand All @@ -62,4 +62,4 @@ cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \

echo "--- ninja"
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" -k 0 ${targets}
ninja -C "${BUILD_DIR}" -k 0 "${targets}"

0 comments on commit 0a17eed

Please sign in to comment.