aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-12-05 11:57:52 +0100
committerGitHub <noreply@github.com>2022-12-05 11:57:52 +0100
commit9d8dbd9846e79c110481847dcd98c94fb2d2d3dd (patch)
tree9e7f898583ad89dfb733af60e2cfa5adedc96620 /.github/workflows
parent89374da798ff29e651c47ed4159aa89e3395af9f (diff)
downloadrneovim-9d8dbd9846e79c110481847dcd98c94fb2d2d3dd.tar.gz
rneovim-9d8dbd9846e79c110481847dcd98c94fb2d2d3dd.tar.bz2
rneovim-9d8dbd9846e79c110481847dcd98c94fb2d2d3dd.zip
ci: use local action to make make cache keys consistent (#20538)
The advantages of using an action is that it reduces boilerplate and repetition from the main ci.yml workflow.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml27
1 files changed, 5 insertions, 22 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9c9de055cf..00ba55d578 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -69,12 +69,7 @@ jobs:
mkdir -p $HOME/.cache
cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }}
- - name: Cache artifacts
- uses: actions/cache@v3
- with:
- path: |
- ${{ env.CACHE_NVIM_DEPS_DIR }}
- key: lint-${{ hashFiles('cmake/*', '**/CMakeLists.txt', '!cmake.deps/**CMakeLists.txt') }}-${{ github.base_ref }}
+ - uses: ./.github/actions/cache
- name: Build third-party deps
run: ./ci/before_script.sh
@@ -167,12 +162,7 @@ jobs:
ninja-build \
pkg-config
- - name: Cache artifacts
- uses: actions/cache@v3
- with:
- path: |
- ${{ env.CACHE_NVIM_DEPS_DIR }}
- key: lint-${{ hashFiles('cmake/*', '**/CMakeLists.txt', '!cmake.deps/**CMakeLists.txt') }}-${{ github.base_ref }}
+ - uses: ./.github/actions/cache
- name: Build third-party deps
run: ./ci/before_script.sh
@@ -273,12 +263,7 @@ jobs:
- name: Setup interpreter packages
run: ./ci/install.sh
- - name: Cache dependencies
- uses: actions/cache@v3
- with:
- path: |
- ${{ env.CACHE_NVIM_DEPS_DIR }}
- key: ${{ matrix.runner }}-${{ matrix.flavor }}-${{ matrix.cc }}-${{ hashFiles('cmake/*', 'cmake.deps/**', '**/CMakeLists.txt') }}-${{ github.base_ref }}
+ - uses: ./.github/actions/cache
- name: Build third-party deps
run: ./ci/before_script.sh
@@ -315,15 +300,13 @@ jobs:
timeout-minutes: 45
env:
DEPS_BUILD_DIR: ${{ github.workspace }}/nvim-deps
+ CACHE_NVIM_DEPS_DIR: ${{ github.workspace }}/nvim-deps
DEPS_PREFIX: ${{ github.workspace }}/nvim-deps/usr
name: windows (MSVC_64)
steps:
- uses: actions/checkout@v3
- - uses: actions/cache@v3
- with:
- path: ${{ env.DEPS_BUILD_DIR }}
- key: windows-${{ hashFiles('cmake.deps/**') }}
+ - uses: ./.github/actions/cache
- name: Set env
run: ./.github/workflows/env.ps1