diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-12-05 11:58:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 11:58:13 +0100 |
commit | 5c52971f603d35aa689022eb0a0bc670ab6788e6 (patch) | |
tree | 8a4e70fea61baab2785ebd2ec6f03f450e672bc4 | |
parent | 9d8dbd9846e79c110481847dcd98c94fb2d2d3dd (diff) | |
download | rneovim-5c52971f603d35aa689022eb0a0bc670ab6788e6.tar.gz rneovim-5c52971f603d35aa689022eb0a0bc670ab6788e6.tar.bz2 rneovim-5c52971f603d35aa689022eb0a0bc670ab6788e6.zip |
ci: use shell script to deduplicate workflow (#21079)
-rwxr-xr-x | .github/scripts/install_deps_ubuntu.sh | 19 | ||||
-rw-r--r-- | .github/workflows/ci.yml | 31 | ||||
-rw-r--r-- | .github/workflows/codeql.yml | 4 |
3 files changed, 25 insertions, 29 deletions
diff --git a/.github/scripts/install_deps_ubuntu.sh b/.github/scripts/install_deps_ubuntu.sh new file mode 100755 index 0000000000..012409ba4a --- /dev/null +++ b/.github/scripts/install_deps_ubuntu.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +PACKAGES=( + autoconf + automake + build-essential + cmake + cpanminus + curl + gettext + libtool-bin + locales-all + ninja-build + pkg-config + unzip +) + +sudo apt-get update +sudo apt-get install -y "${PACKAGES[@]}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00ba55d578..423760fc79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,18 +31,8 @@ jobs: - name: Install apt packages run: | - sudo apt-get update - sudo apt-get install -y \ - autoconf \ - automake \ - build-essential \ - cmake \ - gettext \ - libtool-bin \ - locales \ - lua-check \ - ninja-build \ - pkg-config + ./.github/scripts/install_deps_ubuntu.sh + sudo apt-get install -y lua-check - name: Cache uncrustify id: cache-uncrustify @@ -136,31 +126,22 @@ jobs: - name: Install apt packages run: | sudo add-apt-repository ppa:neovim-ppa/stable - sudo apt-get update + ./.github/scripts/install_deps_ubuntu.sh sudo apt-get install -y \ - autoconf \ - automake \ - build-essential \ - cmake \ - gettext \ libluajit-5.1-dev \ libmsgpack-dev \ libtermkey-dev \ - libtool-bin \ libtree-sitter-dev \ libunibilium-dev \ libuv1-dev \ libvterm-dev \ - locales \ lua-busted \ lua-filesystem \ lua-inspect \ lua-lpeg \ lua-luv-dev \ lua-nvim \ - luajit \ - ninja-build \ - pkg-config + luajit - uses: ./.github/actions/cache @@ -232,9 +213,7 @@ jobs: - name: Install apt packages if: matrix.os == 'linux' - run: | - sudo apt-get update - sudo apt-get install -y autoconf automake build-essential cmake cpanminus gcc-multilib gdb gettext language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip + run: ./.github/scripts/install_deps_ubuntu.sh - name: Install minimum required version of cmake if: matrix.cmake == 'minimum_required' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6ba0d43fe0..a11a87f93a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,9 +26,7 @@ jobs: run: ./.github/workflows/env.sh - name: Install apt packages - run: | - sudo apt-get update - sudo apt-get install -y autoconf automake build-essential cmake cpanminus gcc-multilib gdb gettext language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip + run: ./.github/scripts/install_deps_ubuntu.sh - name: Initialize CodeQL uses: github/codeql-action/init@v2 |