mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 15:40:36 +03:00
ci: circleci: add missing quotes to prevent word splitting and remove useless $ onarithmetic expansion
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
This commit is contained in:
parent
df90aa8267
commit
bcb7d94302
1 changed files with 14 additions and 14 deletions
|
@ -27,8 +27,8 @@ install_deps() {
|
||||||
if curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://dlang.org/install.sh -O ||
|
if curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://dlang.org/install.sh -O ||
|
||||||
curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://nightlies.dlang.org/install.sh -O ; then
|
curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://nightlies.dlang.org/install.sh -O ; then
|
||||||
break
|
break
|
||||||
elif [ $i -ge 4 ]; then
|
elif [ "$i" -ge 4 ]; then
|
||||||
sleep $((1 << $i))
|
sleep $((1 << i))
|
||||||
else
|
else
|
||||||
echo 'Failed to download install script' 1>&2
|
echo 'Failed to download install script' 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -48,8 +48,8 @@ clone() {
|
||||||
for i in {0..4}; do
|
for i in {0..4}; do
|
||||||
if git clone --branch "$branch" "$url" "$path" "${@:4}"; then
|
if git clone --branch "$branch" "$url" "$path" "${@:4}"; then
|
||||||
break
|
break
|
||||||
elif [ $i -lt 4 ]; then
|
elif [ "$i" -lt 4 ]; then
|
||||||
sleep $((1 << $i))
|
sleep $((1 << i))
|
||||||
else
|
else
|
||||||
echo "Failed to clone: ${url}"
|
echo "Failed to clone: ${url}"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -77,12 +77,12 @@ setup_repos()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for proj in dmd druntime tools ; do
|
for proj in dmd druntime tools ; do
|
||||||
if [ $base_branch != master ] && [ $base_branch != stable ] &&
|
if [ "$base_branch" != master ] && [ "$base_branch" != stable ] &&
|
||||||
! git ls-remote --exit-code --heads https://github.com/dlang/$proj.git $base_branch > /dev/null; then
|
! git ls-remote --exit-code --heads https://github.com/dlang/$proj.git "$base_branch" > /dev/null; then
|
||||||
# use master as fallback for other repos to test feature branches
|
# use master as fallback for other repos to test feature branches
|
||||||
clone https://github.com/dlang/$proj.git ../$proj master --depth 1
|
clone https://github.com/dlang/$proj.git ../$proj master --depth 1
|
||||||
else
|
else
|
||||||
clone https://github.com/dlang/$proj.git ../$proj $base_branch --depth 1
|
clone https://github.com/dlang/$proj.git ../$proj "$base_branch" --depth 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -90,8 +90,8 @@ setup_repos()
|
||||||
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
|
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
|
||||||
|
|
||||||
# build dmd and druntime
|
# build dmd and druntime
|
||||||
pushd ../dmd && ./src/build.d MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD PIC="$PIC" all && popd
|
pushd ../dmd && ./src/build.d MODEL=$MODEL HOST_DMD="$DMD" BUILD=$BUILD PIC="$PIC" all && popd
|
||||||
make -j$N -C ../druntime -f posix.mak MODEL=$MODEL HOST_DMD=$DMD BUILD=$BUILD
|
make -j"$N" -C ../druntime -f posix.mak MODEL=$MODEL HOST_DMD="$DMD" BUILD=$BUILD
|
||||||
}
|
}
|
||||||
|
|
||||||
# run unittest with coverage
|
# run unittest with coverage
|
||||||
|
@ -103,11 +103,11 @@ coverage()
|
||||||
|
|
||||||
# Coverage information of the test runner can be missing for some template instatiations.
|
# Coverage information of the test runner can be missing for some template instatiations.
|
||||||
# https://issues.dlang.org/show_bug.cgi?id=16397
|
# https://issues.dlang.org/show_bug.cgi?id=16397
|
||||||
# ENABLE_COVERAGE="1" make -j$N -f posix.mak MODEL=$MODEL unittest-debug
|
# ENABLE_COVERAGE="1" make -j"$N" -f posix.mak MODEL=$MODEL unittest-debug
|
||||||
|
|
||||||
# So instead we run all tests individually (hoping that that doesn't break any tests).
|
# So instead we run all tests individually (hoping that that doesn't break any tests).
|
||||||
# -cov is enabled by the %.test target itself
|
# -cov is enabled by the %.test target itself
|
||||||
make -j$N -f posix.mak BUILD=$BUILD $(find std etc -name "*.d" | sed "s/[.]d$/.test/")
|
make -j"$N" -f posix.mak BUILD=$BUILD $(find std etc -name "*.d" | sed "s/[.]d$/.test/")
|
||||||
|
|
||||||
# Remove coverage information from lines with non-deterministic coverage.
|
# Remove coverage information from lines with non-deterministic coverage.
|
||||||
# These lines are annotated with a comment containing "nocoverage".
|
# These lines are annotated with a comment containing "nocoverage".
|
||||||
|
@ -119,11 +119,11 @@ publictests()
|
||||||
{
|
{
|
||||||
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
|
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
|
||||||
|
|
||||||
make -f posix.mak -j$N publictests DUB=$DUB BUILD=$BUILD
|
make -f posix.mak -j"$N" publictests DUB="$DUB" BUILD=$BUILD
|
||||||
|
|
||||||
# run -betterC tests
|
# run -betterC tests
|
||||||
make -f posix.mak test_extractor # build in single-threaded mode
|
make -f posix.mak test_extractor # build in single-threaded mode
|
||||||
make -f posix.mak -j$N betterc
|
make -f posix.mak -j"$N" betterc
|
||||||
}
|
}
|
||||||
|
|
||||||
# test stdx dub package
|
# test stdx dub package
|
||||||
|
@ -135,7 +135,7 @@ dub_package()
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$#" -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
echo "Usage: $0 <cmd> (where cmd is one of install-deps, setup-repos, coverage, publictests, style-line)" >&2
|
echo "Usage: $0 <cmd> (where cmd is one of install-deps, setup-repos, coverage, publictests, style-line)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue