From adae075fcffe0b5d1a790c41c083b78db27ba80b Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Feb 2023 09:27:51 +0100 Subject: ci: remove unnecessary variables and functions (#22150) --- ci/before_script.sh | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'ci/before_script.sh') diff --git a/ci/before_script.sh b/ci/before_script.sh index 066789af36..4a95e5a60f 100755 --- a/ci/before_script.sh +++ b/ci/before_script.sh @@ -3,22 +3,34 @@ set -e set -o pipefail -CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -# shellcheck source-path=SCRIPTDIR -source "${CI_DIR}/common/build.sh" - # Test some of the configuration variables. if [[ -n "${GCOV}" ]] && [[ ! $(type -P "${GCOV}") ]]; then echo "\$GCOV: '${GCOV}' is not executable." exit 1 fi -if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; then - echo "\$LLVM_SYMBOLIZER: '${LLVM_SYMBOLIZER}' is not executable." - exit 1 + +if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then + DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" +fi + +mkdir -p "${DEPS_BUILD_DIR}" + +# Use cached dependencies if $CACHE_MARKER exists. +if test -f "${CACHE_MARKER}"; then + echo "Using third-party dependencies from cache." + cp -a "${CACHE_NVIM_DEPS_DIR}"/. "${DEPS_BUILD_DIR}" fi -# Compile dependencies. -build_deps +# Even if we're using cached dependencies, run CMake and make to +# update CMake configuration and update to newer deps versions. +cd "${DEPS_BUILD_DIR}" +echo "Configuring with '${DEPS_CMAKE_FLAGS}'." +# shellcheck disable=SC2086 +cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${CI_BUILD_DIR}/cmake.deps/" + +ninja || exit 1 + +cd "${CI_BUILD_DIR}" # Install cluacov for Lua coverage. if [[ "$USE_LUACOV" == 1 ]]; then -- cgit From c1d76363ac72a7a17b657eaa99df4533d169a40b Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 7 Feb 2023 14:43:45 +0100 Subject: ci: simplify how environment variables are used (#22067) Having a clear separation between when we manipulate variables and when we export them to GITHUB_ENV makes it less error-prone. --- ci/before_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ci/before_script.sh') diff --git a/ci/before_script.sh b/ci/before_script.sh index 4a95e5a60f..3e8adcfb15 100755 --- a/ci/before_script.sh +++ b/ci/before_script.sh @@ -10,7 +10,7 @@ if [[ -n "${GCOV}" ]] && [[ ! $(type -P "${GCOV}") ]]; then fi if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then - DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -DUSE_BUNDLED_LUA=ON" + DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -D USE_BUNDLED_LUA=ON" fi mkdir -p "${DEPS_BUILD_DIR}" -- cgit From ec932961cc5596009f3179edd620bc778a1503d7 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 9 Feb 2023 21:13:03 +0100 Subject: ci: inline internal caching script to Github actions (#22192) I don't think it's possible to meaningfully abstract away caching on multiple providers, as each provider has different mechanisms on how they work. --- ci/before_script.sh | 9 --------- 1 file changed, 9 deletions(-) (limited to 'ci/before_script.sh') diff --git a/ci/before_script.sh b/ci/before_script.sh index 3e8adcfb15..9797d3ae30 100755 --- a/ci/before_script.sh +++ b/ci/before_script.sh @@ -14,15 +14,6 @@ if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then fi mkdir -p "${DEPS_BUILD_DIR}" - -# Use cached dependencies if $CACHE_MARKER exists. -if test -f "${CACHE_MARKER}"; then - echo "Using third-party dependencies from cache." - cp -a "${CACHE_NVIM_DEPS_DIR}"/. "${DEPS_BUILD_DIR}" -fi - -# Even if we're using cached dependencies, run CMake and make to -# update CMake configuration and update to newer deps versions. cd "${DEPS_BUILD_DIR}" echo "Configuring with '${DEPS_CMAKE_FLAGS}'." # shellcheck disable=SC2086 -- cgit From 883ec20d9f91bde9c348bfcc0e1fcc3e3533cd89 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 11 Feb 2023 13:27:43 +0100 Subject: ci: inline build commands and remove before_script.sh (#22202) Abstracting the build commands to a separate script makes it more difficult to reason about it and more error-prone. --- ci/before_script.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 ci/before_script.sh (limited to 'ci/before_script.sh') diff --git a/ci/before_script.sh b/ci/before_script.sh deleted file mode 100755 index 9797d3ae30..0000000000 --- a/ci/before_script.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -o pipefail - -# Test some of the configuration variables. -if [[ -n "${GCOV}" ]] && [[ ! $(type -P "${GCOV}") ]]; then - echo "\$GCOV: '${GCOV}' is not executable." - exit 1 -fi - -if test "${FUNCTIONALTEST}" = "functionaltest-lua" ; then - DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} -D USE_BUNDLED_LUA=ON" -fi - -mkdir -p "${DEPS_BUILD_DIR}" -cd "${DEPS_BUILD_DIR}" -echo "Configuring with '${DEPS_CMAKE_FLAGS}'." -# shellcheck disable=SC2086 -cmake -G Ninja ${DEPS_CMAKE_FLAGS} "${CI_BUILD_DIR}/cmake.deps/" - -ninja || exit 1 - -cd "${CI_BUILD_DIR}" - -# Install cluacov for Lua coverage. -if [[ "$USE_LUACOV" == 1 ]]; then - "${DEPS_BUILD_DIR}/usr/bin/luarocks" install cluacov -fi - -rm -rf "${LOG_DIR}" -mkdir -p "${LOG_DIR}" -- cgit