From 96a549c559401dd2890970d7017b7d0c86a1462a Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Sat, 9 Jan 2021 03:12:38 -0800 Subject: [PATCH] feat(CI/Ubuntu): use acore.sh to install deps (#4042) --- .github/workflows/core_build.yml | 4 +++- apps/ci/{ci-install.sh => ci-conf.sh} | 5 ----- apps/installer/includes/os_configs/ubuntu.sh | 23 ++++++++------------ 3 files changed, 12 insertions(+), 20 deletions(-) rename apps/ci/{ci-install.sh => ci-conf.sh} (93%) mode change 100755 => 100644 diff --git a/.github/workflows/core_build.yml b/.github/workflows/core_build.yml index d559ea301..dffb30bd2 100644 --- a/.github/workflows/core_build.yml +++ b/.github/workflows/core_build.yml @@ -51,9 +51,11 @@ jobs: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }} ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules - name: Configure OS - run: source ./apps/ci/ci-install.sh + run: source ./acore.sh install-deps env: CONTINUOUS_INTEGRATION: true + - name: Create conf/config.sh + run: source ./apps/ci/ci-conf.sh - name: Import db run: source ./apps/ci/ci-import-db.sh - name: Build diff --git a/apps/ci/ci-install.sh b/apps/ci/ci-conf.sh old mode 100755 new mode 100644 similarity index 93% rename from apps/ci/ci-install.sh rename to apps/ci/ci-conf.sh index 99f267c50..42f9674b8 --- a/apps/ci/ci-install.sh +++ b/apps/ci/ci-conf.sh @@ -19,11 +19,6 @@ DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';" DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';" CONFIG_SH -time sudo apt-get update -y -# time sudo apt-get upgrade -y -time sudo apt-get install -y git lsb-release sudo ccache -time ./acore.sh install-deps - case $COMPILER in # this is in order to use the "default" gcc version of the OS, without forcing a specific version diff --git a/apps/installer/includes/os_configs/ubuntu.sh b/apps/installer/includes/os_configs/ubuntu.sh index 463a9eb5d..6edaad51d 100644 --- a/apps/installer/includes/os_configs/ubuntu.sh +++ b/apps/installer/includes/os_configs/ubuntu.sh @@ -1,24 +1,19 @@ +if ! command -v lsb_release &>/dev/null ; then + sudo apt-get install -y lsb-release +fi + UBUNTU_VERSION=$(lsb_release -sr); -sudo apt-get update +sudo apt-get update -y if [[ $CONTINUOUS_INTEGRATION ]]; then sudo apt-get -y install build-essential libtool make cmake cmake-data clang openssl libgoogle-perftools-dev \ libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libace-dev mysql-client \ - libncurses5-dev + libncurses5-dev ccache else - case $UBUNTU_VERSION in - "14.04") - sudo apt-get -y install build-essential libtool make cmake cmake-data gcc g++ clang openssl libgoogle-perftools-dev \ - libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libace-dev mysql-server libncurses-dev \ - curl unzip - ;; - *) - sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \ - libssl-dev libbz2-dev libreadline-dev libncurses-dev \ - mysql-server libace-6.* libace-dev curl unzip - ;; - esac + sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \ + libssl-dev libbz2-dev libreadline-dev libncurses-dev \ + mysql-server libace-6.* libace-dev curl unzip fi