diff options
author | James McCoy <jamessan@jamessan.com> | 2022-01-02 14:07:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-02 14:07:01 -0500 |
commit | b0993bdc45cad621976b9cc2c6ce7ee29dbeb93d (patch) | |
tree | f52add11f0e799a582429a08e8f39cc76fada8ac | |
parent | b823ff9a604fdb38f1460ffa0734e864514a17d9 (diff) | |
parent | 35034da779c54304dfb6aac2b6f080e23ad81fd9 (diff) | |
download | rneovim-b0993bdc45cad621976b9cc2c6ce7ee29dbeb93d.tar.gz rneovim-b0993bdc45cad621976b9cc2c6ce7ee29dbeb93d.tar.bz2 rneovim-b0993bdc45cad621976b9cc2c6ce7ee29dbeb93d.zip |
Merge pull request #16853 from jamessan/clint-master-only
ci: run lint only on master branch
-rw-r--r-- | .github/workflows/ci.yml | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fef198934..c01980083a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,45 @@ concurrency: cancel-in-progress: true jobs: + lint: + if: (github.event_name == 'pull_request' && github.base_ref == 'master' && !github.event.pull_request.draft) || (github.event_name == 'push' && github.ref == 'refs/heads/master') + runs-on: ubuntu-20.04 + env: + CC: gcc + steps: + - uses: actions/checkout@v2 + + - name: Setup common environment variables + run: ./.github/workflows/env.sh lint + + - name: Install apt packages + run: | + sudo apt-get update + sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip + + - name: Setup interpreter packages + run: | + ./ci/before_install.sh + ./ci/install.sh + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ${{ env.CACHE_NVIM_DEPS_DIR }} + ~/.ccache + key: ${{ matrix.runner }}-lint-${{ matrix.cc }}-${{ hashFiles('cmake/*', 'third-party/**', '**/CMakeLists.txt') }}-${{ github.base_ref }} + + - name: Build third-party + run: ./ci/before_script.sh + + - name: Run lint + run: ./ci/script.sh + + - name: Cache dependencies + if: ${{ success() }} + run: ./ci/before_cache.sh + unixish: name: ${{ matrix.runner }} ${{ matrix.flavor }} (cc=${{ matrix.cc }}) strategy: @@ -26,10 +65,6 @@ jobs: cc: clang-13 runner: ubuntu-20.04 os: linux - - flavor: lint - cc: gcc - runner: ubuntu-20.04 - os: linux - flavor: tsan cc: clang-13 runner: ubuntu-20.04 |