aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-04-29 13:39:36 +0200
committerGitHub <noreply@github.com>2023-04-29 13:39:36 +0200
commit9f2fd8994841f344cfc269d30a4542fcddaecc5f (patch)
tree0cb36710328d028627d2c2a08ea75cd9703cf19c
parent3287fc2ba9284d48e945ab0008b7844e1ec40eec (diff)
downloadrneovim-9f2fd8994841f344cfc269d30a4542fcddaecc5f.tar.gz
rneovim-9f2fd8994841f344cfc269d30a4542fcddaecc5f.tar.bz2
rneovim-9f2fd8994841f344cfc269d30a4542fcddaecc5f.zip
ci: install uncrustify through homebrew
It will result in less CI code, and the additional CI time is negligible.
-rw-r--r--.github/workflows/test.yml40
1 files changed, 4 insertions, 36 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0a44075f8e..5352d6a6d8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -33,46 +33,16 @@ jobs:
if: (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'push' && github.ref == 'refs/heads/master')
runs-on: ubuntu-22.04
timeout-minutes: 10
- env:
- CACHE_UNCRUSTIFY: ${{ github.workspace }}/.cache/uncrustify
- UNCRUSTIFY_VERSION: uncrustify-0.76.0
steps:
- uses: actions/checkout@v3
- - name: Install dependencies
- run: ./.github/scripts/install_deps.sh lua-check
-
- name: Set up Homebrew
- id: homebrew
uses: Homebrew/actions/setup-homebrew@master
- - run: |
- brew install stylua
-
- - name: Cache uncrustify
- id: cache-uncrustify
- uses: actions/cache@v3
- with:
- path: ${{ env.CACHE_UNCRUSTIFY }}
- key: ${{ env.UNCRUSTIFY_VERSION }}
-
- - name: Clone uncrustify
- if: steps.cache-uncrustify.outputs.cache-hit != 'true'
- uses: actions/checkout@v3
- with:
- repository: uncrustify/uncrustify
- ref: ${{ env.UNCRUSTIFY_VERSION }}
- path: uncrustify
-
- - name: Install uncrustify
- if: steps.cache-uncrustify.outputs.cache-hit != 'true'
+ - name: Install dependencies
run: |
- source_dir=uncrustify
- build_dir=uncrustify/build
- cmake -S $source_dir -B $build_dir -G Ninja -D CMAKE_BUILD_TYPE=Release
- cmake --build $build_dir
- mkdir -p .cache
- cp $build_dir/uncrustify ${{ env.CACHE_UNCRUSTIFY }}
+ ./.github/scripts/install_deps.sh lua-check
+ brew install stylua uncrustify
- uses: ./.github/actions/cache
@@ -82,7 +52,6 @@ jobs:
cmake --build .deps
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
- name: configure
run: cmake -B build -G Ninja
- if: "!cancelled()"
@@ -111,8 +80,7 @@ jobs:
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: uncrustify
- run: |
- ${{ env.CACHE_UNCRUSTIFY }} -c ./src/uncrustify.cfg -q --replace --no-backup $(find ./src/nvim -name "*.[ch]")
+ run: cmake --build build --target lintc-uncrustify
- if: success() || failure() && steps.abort_job.outputs.status == 'success'
name: suggester / uncrustify