mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 14:10:30 +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 ||
|
||||
curl -fsS -A "$CURL_USER_AGENT" --max-time 5 https://nightlies.dlang.org/install.sh -O ; then
|
||||
break
|
||||
elif [ $i -ge 4 ]; then
|
||||
sleep $((1 << $i))
|
||||
elif [ "$i" -ge 4 ]; then
|
||||
sleep $((1 << i))
|
||||
else
|
||||
echo 'Failed to download install script' 1>&2
|
||||
exit 1
|
||||
|
@ -48,8 +48,8 @@ clone() {
|
|||
for i in {0..4}; do
|
||||
if git clone --branch "$branch" "$url" "$path" "${@:4}"; then
|
||||
break
|
||||
elif [ $i -lt 4 ]; then
|
||||
sleep $((1 << $i))
|
||||
elif [ "$i" -lt 4 ]; then
|
||||
sleep $((1 << i))
|
||||
else
|
||||
echo "Failed to clone: ${url}"
|
||||
exit 1
|
||||
|
@ -77,12 +77,12 @@ setup_repos()
|
|||
fi
|
||||
|
||||
for proj in dmd druntime tools ; do
|
||||
if [ $base_branch != master ] && [ $base_branch != stable ] &&
|
||||
! git ls-remote --exit-code --heads https://github.com/dlang/$proj.git $base_branch > /dev/null; then
|
||||
if [ "$base_branch" != master ] && [ "$base_branch" != stable ] &&
|
||||
! 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
|
||||
clone https://github.com/dlang/$proj.git ../$proj master --depth 1
|
||||
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
|
||||
done
|
||||
|
||||
|
@ -90,8 +90,8 @@ setup_repos()
|
|||
source "$(CURL_USER_AGENT=\"$CURL_USER_AGENT\" bash ~/dlang/install.sh dmd-$HOST_DMD_VER --activate)"
|
||||
|
||||
# build dmd and druntime
|
||||
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
|
||||
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
|
||||
}
|
||||
|
||||
# run unittest with coverage
|
||||
|
@ -103,11 +103,11 @@ coverage()
|
|||
|
||||
# Coverage information of the test runner can be missing for some template instatiations.
|
||||
# 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).
|
||||
# -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.
|
||||
# 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)"
|
||||
|
||||
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
|
||||
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
|
||||
|
@ -135,7 +135,7 @@ dub_package()
|
|||
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
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue