Skip to content

Commit

Permalink
Merge pull request #331 from zebmason/update_cmake
Browse files Browse the repository at this point in the history
Update CMake for the containers
  • Loading branch information
weshinsley authored Jun 12, 2020
2 parents 120cdfe + 4ea8236 commit 0ba349b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/linux_distribution_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CMakeLists.txt

# CMake setup
cmake_minimum_required (VERSION 3.8)
cmake_minimum_required (VERSION 3.11)

# Project initialisation
project("CovidSim")
Expand Down
14 changes: 7 additions & 7 deletions ci/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 0ba349b

Please sign in to comment.