From 9de9bd4bedde734e6b795e899e78b5417bc82fe4 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 13 Feb 2023 18:26:01 +0100 Subject: 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. --- .github/scripts/install_dependencies.cmake | 27 --------------------------- .github/scripts/install_deps.sh | 10 ++++++++++ 2 files changed, 10 insertions(+), 27 deletions(-) delete mode 100644 .github/scripts/install_dependencies.cmake create mode 100755 .github/scripts/install_deps.sh (limited to '.github/scripts') 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 -- cgit