mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ci: install dependencies with a single script (#22241)
It's easier if the os-specific installations are done by the script itself
This commit is contained in:
parent
5f72ab77bf
commit
5d3769ea23
27
.github/scripts/install_dependencies.cmake
vendored
Normal file
27
.github/scripts/install_dependencies.cmake
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
execute_process(COMMAND brew update --quiet)
|
||||||
|
execute_process(COMMAND brew install automake ninja)
|
||||||
|
if(TEST_DEPS)
|
||||||
|
execute_process(COMMAND brew install cpanminus)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
# Assuming ubuntu for now. May expand if required.
|
||||||
|
set(PACKAGES
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
build-essential
|
||||||
|
curl
|
||||||
|
gettext
|
||||||
|
libtool-bin
|
||||||
|
locales-all
|
||||||
|
ninja-build
|
||||||
|
pkg-config
|
||||||
|
unzip)
|
||||||
|
execute_process(COMMAND sudo apt-get update)
|
||||||
|
execute_process(COMMAND sudo apt-get install -y ${PACKAGES})
|
||||||
|
if(TEST_DEPS)
|
||||||
|
execute_process(COMMAND sudo apt-get install -y cpanminus)
|
||||||
|
endif()
|
||||||
|
endif()
|
19
.github/scripts/install_deps_ubuntu.sh
vendored
19
.github/scripts/install_deps_ubuntu.sh
vendored
@ -1,19 +0,0 @@
|
|||||||
#!/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[@]}"
|
|
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@ -40,9 +40,9 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install apt packages
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
./.github/scripts/install_deps_ubuntu.sh
|
cmake -P ./.github/scripts/install_dependencies.cmake
|
||||||
sudo apt-get install -y lua-check
|
sudo apt-get install -y lua-check
|
||||||
|
|
||||||
- name: Cache uncrustify
|
- name: Cache uncrustify
|
||||||
@ -129,10 +129,10 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install apt packages
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository ppa:neovim-ppa/stable
|
sudo add-apt-repository ppa:neovim-ppa/stable
|
||||||
./.github/scripts/install_deps_ubuntu.sh
|
cmake -P ./.github/scripts/install_dependencies.cmake
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
libluajit-5.1-dev \
|
libluajit-5.1-dev \
|
||||||
libmsgpack-dev \
|
libmsgpack-dev \
|
||||||
@ -224,15 +224,8 @@ jobs:
|
|||||||
- name: Create log dir
|
- name: Create log dir
|
||||||
run: mkdir -p "$LOG_DIR"
|
run: mkdir -p "$LOG_DIR"
|
||||||
|
|
||||||
- name: Install apt packages
|
- name: Install dependencies
|
||||||
if: runner.os == 'Linux'
|
run: cmake -D TEST_DEPS=ON -P ./.github/scripts/install_dependencies.cmake
|
||||||
run: ./.github/scripts/install_deps_ubuntu.sh
|
|
||||||
|
|
||||||
- name: Install brew packages
|
|
||||||
if: runner.os == 'macOS'
|
|
||||||
run: |
|
|
||||||
brew update --quiet
|
|
||||||
brew install automake cpanminus ninja
|
|
||||||
|
|
||||||
- name: Setup interpreter packages
|
- name: Setup interpreter packages
|
||||||
run: |
|
run: |
|
||||||
@ -370,8 +363,8 @@ jobs:
|
|||||||
- name: Set up environment
|
- name: Set up environment
|
||||||
run: echo "$BIN_DIR" >> $GITHUB_PATH
|
run: echo "$BIN_DIR" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Install apt packages
|
- name: Install dependencies
|
||||||
run: ./.github/scripts/install_deps_ubuntu.sh
|
run: cmake -P ./.github/scripts/install_dependencies.cmake
|
||||||
|
|
||||||
- name: Install minimum required version of cmake
|
- name: Install minimum required version of cmake
|
||||||
run: |
|
run: |
|
||||||
|
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
@ -17,8 +17,8 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install apt packages
|
- name: Install dependencies
|
||||||
run: ./.github/scripts/install_deps_ubuntu.sh
|
run: cmake -P ./.github/scripts/install_dependencies.cmake
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v2
|
||||||
|
4
.github/workflows/coverity.yml
vendored
4
.github/workflows/coverity.yml
vendored
@ -11,9 +11,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: cmake -P ./.github/scripts/install_dependencies.cmake
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y autoconf automake build-essential cmake gettext libtool-bin locales ninja-build pkg-config unzip
|
|
||||||
|
|
||||||
- name: Download Coverity
|
- name: Download Coverity
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user