From 4ea823625052493399546a5fddf32f87c72013e7 Mon Sep 17 00:00:00 2001 From: Zebedee Mason Date: Sat, 23 May 2020 09:39:40 +0100 Subject: [PATCH] Update CMake for the containers --- .github/workflows/linux_distribution_check.yml | 14 +++++++++++++- CMakeLists.txt | 2 +- ci/install_dependencies.sh | 14 +++++++------- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux_distribution_check.yml b/.github/workflows/linux_distribution_check.yml index a5ad6465f..f240f1ff9 100644 --- a/.github/workflows/linux_distribution_check.yml +++ b/.github/workflows/linux_distribution_check.yml @@ -35,11 +35,23 @@ jobs: - uses: actions/checkout@v1 - name: install dependencies run: ./ci/install_dependencies.sh - - name: build + - name: download cmake + run: | + wget https://cmake.org/files/v3.17/cmake-3.17.2-Linux-x86_64.tar.gz + tar xf cmake-3.17.2-Linux-x86_64.tar.gz + export PATH=$(pwd)/cmake-3.17.2-Linux-x86_64/bin:${PATH} + - name: build bionic + run: | + mkdir build && cd build + ../cmake-3.17.2-Linux-x86_64/bin/cmake .. + make + if: matrix.container_image == 'ubuntu:bionic' + - name: build others run: | mkdir build && cd build cmake .. make + if: matrix.container_image != 'ubuntu:bionic' - name: regression tests run: | make -Cbuild test ARGS="-V" diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c34c91e7..9dce1a480 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # CMakeLists.txt # CMake setup -cmake_minimum_required (VERSION 3.8) +cmake_minimum_required (VERSION 3.11) # Project initialisation project("CovidSim") diff --git a/ci/install_dependencies.sh b/ci/install_dependencies.sh index 2a085e119..1927bc66c 100755 --- a/ci/install_dependencies.sh +++ b/ci/install_dependencies.sh @@ -10,38 +10,38 @@ distro_id=$(grep '^ID=' /etc/os-release|awk -F = '{print $2}'|sed 's/\"//g') case "$distro_id" in 'fedora') - dnf -y --refresh install cmake make g++ diffutils + dnf -y --refresh install cmake make g++ diffutils wget git ;; 'debian') apt-get update - apt-get install -y cmake make g++ python3 + apt-get install -y cmake make g++ python3 wget git ;; 'arch') pacman --noconfirm -Syu - pacman --noconfirm -S cmake make gcc diffutils python3 + pacman --noconfirm -S cmake make gcc diffutils python3 wget git ;; 'ubuntu') apt-get update - apt-get install -y cmake make g++ python3 doxygen + apt-get install -y cmake make g++ python3 doxygen wget ;; 'centos'|'rhel') yum -y install epel-release - yum -y install cmake3 make gcc-c++ python3 + yum -y install cmake3 make gcc-c++ python3 wget git ln -s /bin/cmake3 /bin/cmake ;; 'opensuse'|'opensuse-tumbleweed') zypper --non-interactive refresh - zypper --non-interactive install cmake make gcc-c++ + zypper --non-interactive install cmake make gcc-c++ wget tar git gzip ;; 'alpine') apk update - apk add cmake make g++ bash python3 coreutils + apk add cmake make g++ bash python3 coreutils git ;; *) echo "Unsupported distribution: $distro_id"