From 5d3769ea2343a30c60963011bef85346320bd97c Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:09:10 +0100 Subject: ci: install dependencies with a single script (#22241) It's easier if the os-specific installations are done by the script itself --- .github/scripts/install_dependencies.cmake | 27 +++++++++++++++++++++++++++ .github/scripts/install_deps_ubuntu.sh | 19 ------------------- 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 .github/scripts/install_dependencies.cmake delete mode 100755 .github/scripts/install_deps_ubuntu.sh (limited to '.github/scripts') diff --git a/.github/scripts/install_dependencies.cmake b/.github/scripts/install_dependencies.cmake new file mode 100644 index 0000000000..c2299614c0 --- /dev/null +++ b/.github/scripts/install_dependencies.cmake @@ -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() diff --git a/.github/scripts/install_deps_ubuntu.sh b/.github/scripts/install_deps_ubuntu.sh deleted file mode 100755 index 012409ba4a..0000000000 --- a/.github/scripts/install_deps_ubuntu.sh +++ /dev/null @@ -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[@]}" -- cgit