Skip to content

Commit

Permalink
Update CMake for the containers
Browse files Browse the repository at this point in the history
  • Loading branch information
zebmason committed May 23, 2020
1 parent a39e6cd commit e86694d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/linux_distribution_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,32 @@ jobs:
- uses: actions/checkout@v1
- name: install dependencies
run: ./ci/install_dependencies.sh
- 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
run: |
mkdir build && cd build
cmake ..
mkdir build && cd build
echo 1
echo $image
echo 2
echo $container_image
echo 3
echo $matrix.container_image
echo 4
echo "$image"
echo 2
echo "$container_image"
echo 3
echo "$matrix.container_image"
echo 4
if [ "$image" = "ubuntu:bionic"]; then \
../cmake-3.17.2-Linux-x86_64/bin/cmake ..; \
else \
cmake ..; \
fi
make
- name: regression tests
run: |
Expand Down
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
;;

'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 e86694d

Please sign in to comment.