ci: use shell script to deduplicate workflow (#21079)

This commit is contained in:
dundargoc 2022-12-05 11:58:13 +01:00 committed by GitHub
parent 9d8dbd9846
commit 5c52971f60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 29 deletions

19
.github/scripts/install_deps_ubuntu.sh vendored Executable file
View File

@ -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[@]}"

View File

@ -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'

View File

@ -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