aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-02-13 18:26:01 +0100
committerGitHub <noreply@github.com>2023-02-13 18:26:01 +0100
commit9de9bd4bedde734e6b795e899e78b5417bc82fe4 (patch)
treef486737a97d61ac1ea9a3332dfb15302318ef894
parentd359f7a533bdec9f9f4a51244fefc01064d8b9f9 (diff)
downloadrneovim-9de9bd4bedde734e6b795e899e78b5417bc82fe4.tar.gz
rneovim-9de9bd4bedde734e6b795e899e78b5417bc82fe4.tar.bz2
rneovim-9de9bd4bedde734e6b795e899e78b5417bc82fe4.zip
ci: replace cmake script with bash script (#22246)
Bash has better error handling than cmake, and seem overall slightly more suited to scripting than cmake.
-rw-r--r--.github/scripts/install_dependencies.cmake27
-rwxr-xr-x.github/scripts/install_deps.sh10
-rw-r--r--.github/workflows/ci.yml10
-rw-r--r--.github/workflows/codeql.yml2
-rw-r--r--.github/workflows/coverity.yml2
5 files changed, 16 insertions, 35 deletions
diff --git a/.github/scripts/install_dependencies.cmake b/.github/scripts/install_dependencies.cmake
deleted file mode 100644
index c2299614c0..0000000000
--- a/.github/scripts/install_dependencies.cmake
+++ /dev/null
@@ -1,27 +0,0 @@
-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()
diff --git a/.github/scripts/install_deps.sh b/.github/scripts/install_deps.sh
new file mode 100755
index 0000000000..4727b5d08d
--- /dev/null
+++ b/.github/scripts/install_deps.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+os=$(uname -s)
+if [[ $os == Linux ]]; then
+ sudo apt-get update
+ sudo apt-get install -y autoconf automake build-essential cmake curl gettext libtool-bin locales-all ninja-build pkg-config unzip "$@"
+elif [[ $os == Darwin ]]; then
+ brew update --quiet
+ brew install automake ninja "$@"
+fi
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 717362963c..da4bcc6ad4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -41,9 +41,7 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
- run: |
- cmake -P ./.github/scripts/install_dependencies.cmake
- sudo apt-get install -y lua-check
+ run: ./.github/scripts/install_deps.sh lua-check
- name: Cache uncrustify
id: cache-uncrustify
@@ -132,7 +130,7 @@ jobs:
- name: Install dependencies
run: |
sudo add-apt-repository ppa:neovim-ppa/stable
- cmake -P ./.github/scripts/install_dependencies.cmake
+ ./.github/scripts/install_deps.sh
sudo apt-get install -y \
libluajit-5.1-dev \
libmsgpack-dev \
@@ -225,7 +223,7 @@ jobs:
run: mkdir -p "$LOG_DIR"
- name: Install dependencies
- run: cmake -D TEST_DEPS=ON -P ./.github/scripts/install_dependencies.cmake
+ run: ./.github/scripts/install_deps.sh cpanminus
- name: Setup interpreter packages
run: |
@@ -364,7 +362,7 @@ jobs:
run: echo "$BIN_DIR" >> $GITHUB_PATH
- name: Install dependencies
- run: cmake -P ./.github/scripts/install_dependencies.cmake
+ run: ./.github/scripts/install_deps.sh
- name: Install minimum required version of cmake
run: |
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index c4f4346de1..497a79d2d1 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v3
- name: Install dependencies
- run: cmake -P ./.github/scripts/install_dependencies.cmake
+ run: ./.github/scripts/install_deps.sh
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml
index 15c494dc93..e63f119958 100644
--- a/.github/workflows/coverity.yml
+++ b/.github/workflows/coverity.yml
@@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
- run: cmake -P ./.github/scripts/install_dependencies.cmake
+ run: ./.github/scripts/install_deps.sh
- name: Download Coverity
run: |