mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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.
This commit is contained in:
parent
05d3bef836
commit
ec932961cc
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -110,9 +110,6 @@ jobs:
|
||||
run: |
|
||||
git diff --color --exit-code
|
||||
|
||||
- name: Cache dependencies
|
||||
run: ./ci/before_cache.sh
|
||||
|
||||
lintc:
|
||||
# This job tests two things: it lints the code but also builds neovim using
|
||||
# system dependencies instead of bundled dependencies. This is to make sure
|
||||
@ -173,9 +170,6 @@ jobs:
|
||||
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
|
||||
run: cmake --build build --target clang-tidy
|
||||
|
||||
- name: Cache dependencies
|
||||
run: ./ci/before_cache.sh
|
||||
|
||||
posix:
|
||||
name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }})
|
||||
strategy:
|
||||
@ -282,9 +276,6 @@ jobs:
|
||||
name: Install nvim
|
||||
run: ./ci/run_tests.sh install_nvim
|
||||
|
||||
- name: Cache dependencies
|
||||
run: ./ci/before_cache.sh
|
||||
|
||||
windows:
|
||||
runs-on: windows-2019
|
||||
timeout-minutes: 45
|
||||
|
2
.github/workflows/env.sh
vendored
2
.github/workflows/env.sh
vendored
@ -11,7 +11,7 @@ LOG_DIR=$BUILD_DIR/log
|
||||
NVIM_LOG_FILE=$BUILD_DIR/.nvimlog
|
||||
VALGRIND_LOG=$LOG_DIR/valgrind-%p.log
|
||||
CACHE_DIR=$HOME/.cache
|
||||
CACHE_NVIM_DEPS_DIR=$CACHE_DIR/nvim-deps
|
||||
CACHE_NVIM_DEPS_DIR=$DEPS_BUILD_DIR
|
||||
CACHE_MARKER=$CACHE_NVIM_DEPS_DIR/.ci_cache_marker
|
||||
CACHE_UNCRUSTIFY=$CACHE_DIR/uncrustify
|
||||
DEPS_CMAKE_FLAGS=
|
||||
|
@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
mkdir -p "$CACHE_DIR"
|
||||
|
||||
# Update the third-party dependency cache only if the build was successful.
|
||||
if [ -d "${DEPS_BUILD_DIR}" ]; then
|
||||
# Do not cache downloads. They should not be needed with up-to-date deps.
|
||||
rm -rf "${DEPS_BUILD_DIR}/build/downloads"
|
||||
rm -rf "${CACHE_NVIM_DEPS_DIR}"
|
||||
mv "${DEPS_BUILD_DIR}" "${CACHE_NVIM_DEPS_DIR}"
|
||||
|
||||
touch "${CACHE_MARKER}"
|
||||
echo "Updated third-party dependencies."
|
||||
fi
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user