aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2020-11-13 14:13:42 -0500
committerGitHub <noreply@github.com>2020-11-13 14:13:42 -0500
commit7c4f349661bd7e66f22b3a0903ffb7b8db1222e7 (patch)
treee8227d5e2a30f9424a1c405a79766e5dc3779e6c /ci
parentaaca2c1c4d07d5bb9dd297b8e21e4a66acfb8ad3 (diff)
parent7ac3c39e39effcbf57f5622efde0fce20eac2fdd (diff)
downloadrneovim-7c4f349661bd7e66f22b3a0903ffb7b8db1222e7.tar.gz
rneovim-7c4f349661bd7e66f22b3a0903ffb7b8db1222e7.tar.bz2
rneovim-7c4f349661bd7e66f22b3a0903ffb7b8db1222e7.zip
Merge pull request #13287 from jamessan/github-actions
Diffstat (limited to 'ci')
-rwxr-xr-xci/before_script.sh4
-rw-r--r--ci/common/build.sh10
-rw-r--r--ci/common/suite.sh41
-rwxr-xr-xci/install.sh2
-rwxr-xr-xci/snap/script.sh2
5 files changed, 36 insertions, 23 deletions
diff --git a/ci/before_script.sh b/ci/before_script.sh
index 1759dbe942..8bab1c4e17 100755
--- a/ci/before_script.sh
+++ b/ci/before_script.sh
@@ -3,10 +3,6 @@
set -e
set -o pipefail
-if [[ "${CI_TARGET}" == lint ]]; then
- exit
-fi
-
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${CI_DIR}/common/build.sh"
diff --git a/ci/common/build.sh b/ci/common/build.sh
index 0024f2cbd5..f0bdec0a0e 100644
--- a/ci/common/build.sh
+++ b/ci/common/build.sh
@@ -29,7 +29,7 @@ build_deps() {
if test "${CACHE_ENABLE}" = "false" ; then
export CCACHE_RECACHE=1
elif test -f "${CACHE_MARKER}" ; then
- echo "Using third-party dependencies from Travis cache (last update: $(_stat "${CACHE_MARKER}"))."
+ echo "Using third-party dependencies from cache (last update: $(_stat "${CACHE_MARKER}"))."
cp -a "${CACHE_NVIM_DEPS_DIR}"/. "${DEPS_BUILD_DIR}"
fi
@@ -37,13 +37,13 @@ build_deps() {
# update CMake configuration and update to newer deps versions.
cd "${DEPS_BUILD_DIR}"
echo "Configuring with '${DEPS_CMAKE_FLAGS}'."
- CC= cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${TRAVIS_BUILD_DIR}/third-party/"
+ CC= cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${CI_BUILD_DIR}/third-party/"
if ! top_make; then
exit 1
fi
- cd "${TRAVIS_BUILD_DIR}"
+ cd "${CI_BUILD_DIR}"
}
prepare_build() {
@@ -54,7 +54,7 @@ prepare_build() {
mkdir -p "${BUILD_DIR}"
cd "${BUILD_DIR}"
echo "Configuring with '${CMAKE_FLAGS} $@'."
- cmake -G Ninja ${CMAKE_FLAGS} "$@" "${TRAVIS_BUILD_DIR}"
+ cmake -G Ninja ${CMAKE_FLAGS} "$@" "${CI_BUILD_DIR}"
}
build_nvim() {
@@ -84,5 +84,5 @@ build_nvim() {
fi
check_sanitizer "${LOG_DIR}"
- cd "${TRAVIS_BUILD_DIR}"
+ cd "${CI_BUILD_DIR}"
}
diff --git a/ci/common/suite.sh b/ci/common/suite.sh
index 4c42f06c60..038b116c5a 100644
--- a/ci/common/suite.sh
+++ b/ci/common/suite.sh
@@ -13,16 +13,33 @@ FAIL_SUMMARY_FILE="$BUILD_DIR/.test_errors"
ANSI_CLEAR="\033[0K"
-travis_fold() {
- local action="$1"
- local name="$2"
- name="$(echo -n "$name" | tr '\n\0' '--' | sed 's/[^A-Za-z0-9]\{1,\}/-/g')"
- name="$(echo -n "$name" | sed 's/-$//')"
- echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}"
-}
-
-if test "$TRAVIS" != "true" ; then
- travis_fold() {
+if test "$TRAVIS" = "true"; then
+ ci_fold() {
+ local action="$1"
+ local name="$2"
+ name="$(echo -n "$name" | tr '\n\0' '--' | sed 's/[^A-Za-z0-9]\{1,\}/-/g')"
+ name="$(echo -n "$name" | sed 's/-$//')"
+ echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}"
+ }
+elif test "$GITHUB_ACTIONS" = "true"; then
+ ci_fold() {
+ local action="$1"
+ local name="$2"
+ name="$(echo -n "$name" | tr '\n\0' '--' | sed 's/[^A-Za-z0-9]\{1,\}/-/g')"
+ name="$(echo -n "$name" | sed 's/-$//')"
+ case "$action" in
+ start)
+ echo "::group::${name}"
+ ;;
+ end)
+ echo "::endgroup::"
+ ;;
+ *)
+ :;;
+ esac
+ }
+else
+ ci_fold() {
return 0
}
fi
@@ -33,7 +50,7 @@ enter_suite() {
rm -f "${END_MARKER}"
local suite_name="$1"
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE}/$suite_name"
- travis_fold start "${NVIM_TEST_CURRENT_SUITE}"
+ ci_fold start "${NVIM_TEST_CURRENT_SUITE}"
set -x
}
@@ -43,7 +60,7 @@ exit_suite() {
echo "Suite ${NVIM_TEST_CURRENT_SUITE} failed, summary:"
echo "${FAIL_SUMMARY}"
else
- travis_fold end "${NVIM_TEST_CURRENT_SUITE}"
+ ci_fold end "${NVIM_TEST_CURRENT_SUITE}"
fi
export NVIM_TEST_CURRENT_SUITE="${NVIM_TEST_CURRENT_SUITE%/*}"
if test "$1" != "--continue" ; then
diff --git a/ci/install.sh b/ci/install.sh
index efb37cea4e..cd0d744361 100755
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -19,7 +19,7 @@ echo "Install neovim module for Python 2."
CC=cc python2 -m pip -q install --user --upgrade pynvim
echo "Install neovim RubyGem."
-gem install --no-document --pre neovim
+gem install --no-document --user-install --pre neovim
echo "Install neovim npm package"
source ~/.nvm/nvm.sh
diff --git a/ci/snap/script.sh b/ci/snap/script.sh
index f0d45fea00..21d3421044 100755
--- a/ci/snap/script.sh
+++ b/ci/snap/script.sh
@@ -3,6 +3,6 @@
set -e
set -o pipefail
-mkdir -p "$TRAVIS_BUILD_DIR/snaps-cache"
+mkdir -p "$CI_BUILD_DIR/snaps-cache"
sg lxd -c snapcraft