From 2b09b39aec43c33a6db3801aea69380683e39a26 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Thu, 9 Feb 2023 22:25:44 +0100 Subject: ci: remove base branch from cache key (#22195) Using the base branch as cache means that pull requests won't be able to use the cache from the master branch, since the master branch cache doesn't have a base_ref as it's generated from a push. Removing base_ref makes the cache key from master and PR branch the same, provided the any build files don't change. --- .github/actions/cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 858045c02a..d6a5d1e43f 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -3,7 +3,7 @@ description: "This action caches neovim dependencies" runs: using: "composite" steps: - - run: echo "CACHE_KEY=${{ github.job }}-${{ github.base_ref }}" >> $GITHUB_ENV + - run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV shell: bash - if: ${{ matrix }} -- cgit From d5b1712dc4ced82e15a9a736626d4e2e3370c9b4 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 10 Feb 2023 13:56:07 +0100 Subject: ci: remove unnecessary environment variables (#22175) --- .github/actions/cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index d6a5d1e43f..819380f351 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -16,7 +16,7 @@ runs: # files to search through. - uses: actions/cache@v3 with: - path: ${{ env.CACHE_NVIM_DEPS_DIR }} + path: ${{ env.DEPS_BUILD_DIR }} key: ${{ env.CACHE_KEY }}-${{ hashFiles('cmake**', 'ci/**', '.github/workflows/ci.yml', 'CMakeLists.txt', 'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }} -- cgit From fc8c77a69f01eb1eac0a1b4373ae1bb7f81d1629 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 18 Feb 2023 10:47:22 +0100 Subject: ci: split ci.yml into a test workflow and a build test workflow (#22302) Having a workflow that only builds neovim without running all of the tests is a cheap way to test the build still works without burning too much CI time. --- .github/actions/cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 819380f351..da36c71a1d 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -18,5 +18,5 @@ runs: with: path: ${{ env.DEPS_BUILD_DIR }} key: ${{ env.CACHE_KEY }}-${{ hashFiles('cmake**', 'ci/**', - '.github/workflows/ci.yml', 'CMakeLists.txt', + '.github/workflows/test.yml', 'CMakeLists.txt', 'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }} -- cgit From 6cd7b5eeef6728a66b73865f39e29688920a5960 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 9 Mar 2023 12:27:20 +0100 Subject: ci: remove environment variable DEPS_BUILD_DIR from CI If one uses .deps when DEPS_BUILD_DIR is defined in another location it leads to very surprising behaviors, as it looks for libraries in other places other than .deps. --- .github/actions/cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index da36c71a1d..07f8feaa84 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -16,7 +16,7 @@ runs: # files to search through. - uses: actions/cache@v3 with: - path: ${{ env.DEPS_BUILD_DIR }} + path: .deps key: ${{ env.CACHE_KEY }}-${{ hashFiles('cmake**', 'ci/**', '.github/workflows/test.yml', 'CMakeLists.txt', 'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }} -- cgit From 80814d1535812ce2f0f667a73dfd6032cd63402b Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 2 Jun 2023 17:38:42 +0800 Subject: ci: remove ci/ from cache key (#23878) The ci/ directory is now only used for Cirrus, not for GitHub Actions. --- .github/actions/cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 07f8feaa84..9ad14b8c27 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -17,6 +17,6 @@ runs: - uses: actions/cache@v3 with: path: .deps - key: ${{ env.CACHE_KEY }}-${{ hashFiles('cmake**', 'ci/**', + key: ${{ env.CACHE_KEY }}-${{ hashFiles('cmake**', '.github/workflows/test.yml', 'CMakeLists.txt', 'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }} -- cgit From c53953b400ed0dbde410dc321c0a1f95c7090aa3 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 10 Jun 2023 16:36:37 +0200 Subject: ci: add runner image version to cache key This will ensure the cache isn't used when an image upgrade changes the compiler version, causing the build to fail. --- .github/actions/cache/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 9ad14b8c27..e7ffdd66b6 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -10,6 +10,10 @@ runs: run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.*, '-') }}" >> $GITHUB_ENV shell: bash + - id: image + run: echo "version=$ImageVersion" >> $GITHUB_OUTPUT + shell: bash + # Avoid using '**/CMakeLists.txt' (or any pattern starting with '**/') even # if it makes the expression below simpler. hashFiles() has a timer that # will fail the job if it times out, which can happen if there are too many @@ -17,6 +21,6 @@ runs: - uses: actions/cache@v3 with: path: .deps - key: ${{ env.CACHE_KEY }}-${{ hashFiles('cmake**', + key: ${{ env.CACHE_KEY }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**', '.github/workflows/test.yml', 'CMakeLists.txt', 'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }} -- cgit From 9eb5d9f13fb24594007f5b0728826b1f9b694e3c Mon Sep 17 00:00:00 2001 From: dundargoc Date: Wed, 27 Sep 2023 17:53:06 +0200 Subject: ci: various cleanups - add reviewers - correct cache key --- .github/actions/cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index e7ffdd66b6..698dfa3b3a 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -22,5 +22,5 @@ runs: with: path: .deps key: ${{ env.CACHE_KEY }}-${{ steps.image.outputs.version }}-${{ hashFiles('cmake**', - '.github/workflows/test.yml', 'CMakeLists.txt', + '.github/**', 'CMakeLists.txt', 'runtime/CMakeLists.txt', 'src/nvim/**/CMakeLists.txt') }} -- cgit From bc850ba2a090a9a4733a82a7555a5a70264ce1ac Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 20 Oct 2023 15:12:37 +0200 Subject: ci: run tests in parallel This will run the three test suites (unit, functional and old) in parallel, meaning that neovim is built for each test and run separately. This has a slight increase in total CI usage, but it allows rerunning only the specific test suite that failed for flaky tests, which will save some time. Ideally we'd remove any drawbacks by building neovim once and reusing it for each test suite, but that is not currently possible due to poor upload/download speeds of the upload-artifact and download-artifact actions. This has been addressed in https://github.com/actions/toolkit/pull/1488, but will only be made available in upload-artifact@v4 and download-artifact@v4. --- .github/actions/cache/action.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 698dfa3b3a..c019ac52ac 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -10,6 +10,10 @@ runs: run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.*, '-') }}" >> $GITHUB_ENV shell: bash + - if: ${{ matrix.build }} + run: echo "CACHE_KEY=$CACHE_KEY-${{ join(matrix.build.*, '-') }}" >> $GITHUB_ENV + shell: bash + - id: image run: echo "version=$ImageVersion" >> $GITHUB_OUTPUT shell: bash -- cgit From 9ad239690fe6b151afe2f43c2858d68a2b877e1d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 22 Oct 2023 13:30:32 +0200 Subject: ci: various fixes - adjust reviewers - add workflow as cache key - install attr only when tesitng - fix s390x workflow by checking out the merge PR instead of master --- .github/actions/cache/action.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/actions/cache') diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index c019ac52ac..d668c7a7cc 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -3,6 +3,9 @@ description: "This action caches neovim dependencies" runs: using: "composite" steps: + - run: echo "CACHE_KEY=${{ github.workflow }}" >> $GITHUB_ENV + shell: bash + - run: echo "CACHE_KEY=${{ github.job }}" >> $GITHUB_ENV shell: bash -- cgit