Skip to content

Commit 3c649a2

Browse files
authored
[ci] remove old github actions related code (#58922)
and performing some styling cleanup Signed-off-by: Lonnie Liu <lonnie@anyscale.com>
1 parent 9f19049 commit 3c649a2

File tree

1 file changed

+5
-50
lines changed

1 file changed

+5
-50
lines changed

ci/ci.sh

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,6 @@ suppress_output() {
1313
"${WORKSPACE_DIR}"/ci/suppress_output "$@"
1414
}
1515

16-
# Calls the provided command with set -x temporarily suppressed
17-
suppress_xtrace() {
18-
{
19-
local restore_shell_state=""
20-
if [ -o xtrace ]; then set +x; restore_shell_state="set -x"; fi
21-
} 2> /dev/null
22-
local status=0
23-
"$@" || status=$?
24-
${restore_shell_state}
25-
{ return "${status}"; } 2> /dev/null
26-
}
27-
28-
# Idempotent environment loading
29-
reload_env() {
30-
# Try to only modify CI-specific environment variables here (TRAVIS_... or GITHUB_...),
31-
# e.g. for CI cross-compatibility.
32-
# Normal environment variables should be set up at software installation time, not here.
33-
34-
if [ -n "${GITHUB_PULL_REQUEST-}" ]; then
35-
case "${GITHUB_PULL_REQUEST}" in
36-
[1-9]*) TRAVIS_PULL_REQUEST="${GITHUB_PULL_REQUEST}";;
37-
*) TRAVIS_PULL_REQUEST=false;;
38-
esac
39-
export TRAVIS_PULL_REQUEST
40-
fi
41-
42-
if [ "${GITHUB_ACTIONS-}" = true ] && [ -z "${TRAVIS_BRANCH-}" ]; then
43-
# Define TRAVIS_BRANCH to make Travis scripts run on GitHub Actions.
44-
TRAVIS_BRANCH="${GITHUB_BASE_REF:-${GITHUB_REF}}" # For pull requests, the base branch name
45-
TRAVIS_BRANCH="${TRAVIS_BRANCH#refs/heads/}" # Remove refs/... prefix
46-
# TODO(mehrdadn): Make TRAVIS_BRANCH be a named ref (e.g. 'master') like it's supposed to be.
47-
# For now we use a hash because GitHub Actions doesn't clone refs the same way as Travis does.
48-
TRAVIS_BRANCH="${GITHUB_HEAD_SHA:-${TRAVIS_BRANCH}}"
49-
export TRAVIS_BRANCH
50-
fi
51-
}
52-
5316
compile_pip_dependencies() {
5417
# Compile boundaries
5518
TARGET="${1-requirements_compiled.txt}"
@@ -167,9 +130,9 @@ _install_npm_project() {
167130
}
168131

169132
build_dashboard_front_end() {
170-
if [ "${OSTYPE}" = msys ]; then
133+
if [[ "${OSTYPE}" == msys ]]; then
171134
{ echo "WARNING: Skipping dashboard due to NPM incompatibilities with Windows"; } 2> /dev/null
172-
elif [ "${NO_DASHBOARD-}" = "1" ]; then
135+
elif [[ "${NO_DASHBOARD-}" == "1" ]]; then
173136
echo "Skipping dashboard build"
174137
else
175138
(
@@ -196,7 +159,7 @@ build_sphinx_docs() {
196159

197160
(
198161
cd "${WORKSPACE_DIR}"/doc
199-
if [ "${OSTYPE}" = msys ]; then
162+
if [[ "${OSTYPE}" == msys ]]; then
200163
echo "WARNING: Documentation not built on Windows due to currently-unresolved issues"
201164
else
202165
make html
@@ -208,7 +171,7 @@ build_sphinx_docs() {
208171
check_sphinx_links() {
209172
(
210173
cd "${WORKSPACE_DIR}"/doc
211-
if [ "${OSTYPE}" = msys ]; then
174+
if [[ "${OSTYPE}" == msys ]]; then
212175
echo "WARNING: Documentation not built on Windows due to currently-unresolved issues"
213176
else
214177
make linkcheck
@@ -345,15 +308,7 @@ build() {
345308
install_ray
346309
}
347310

348-
_main() {
349-
if [ "${GITHUB_ACTIONS-}" = true ]; then
350-
exec 2>&1 # Merge stdout and stderr to prevent out-of-order buffering issues
351-
reload_env
352-
fi
353-
"$@"
354-
}
355-
356-
_main "$@"
311+
"$@"
357312

358313
# Pop caller's shell options (quietly)
359314
{ set -vx; eval "${SHELLOPTS_STACK##*|}"; SHELLOPTS_STACK="${SHELLOPTS_STACK%|*}"; } 2> /dev/null

0 commit comments

Comments
 (0)