Skip to content

Commit ca72aef

Browse files
author
pradeep
committed
Change github ci to xenial image for cmake 3.5.1
xenial however won't build/test CPU backend using ATLAS. There is a known issue with atlas+lapacke on Ubuntu 16.04 as lapacke is broken. OSX runner uses whatever the image provides.
1 parent f51a1ee commit ca72aef

1 file changed

Lines changed: 27 additions & 6 deletions

File tree

.github/workflows/cpu_build.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ on:
22
push:
33
branches:
44
- master
5+
- cmake_3.5_fixes
56
pull_request:
67
branches:
78
- master
@@ -14,12 +15,15 @@ jobs:
1415
runs-on: ${{ matrix.os }}
1516
env:
1617
NINJA_VER: 1.9.0
18+
CMAKE_VER: 3.5.1
1719
strategy:
1820
fail-fast: false
1921
matrix:
2022
blas_backend: [Atlas, MKL, OpenBLAS]
21-
os: [ubuntu-18.04, macos-latest]
23+
os: [ubuntu-16.04, ubuntu-18.04, macos-latest]
2224
exclude:
25+
- os: ubuntu-16.04
26+
blas_backend: Atlas
2327
- os: macos-latest
2428
blas_backend: Atlas
2529
- os: macos-latest
@@ -42,13 +46,30 @@ jobs:
4246
chmod +x ninja
4347
${GITHUB_WORKSPACE}/ninja --version
4448
45-
- name: Install Common Dependencies for Macos
49+
- name: Download CMake 3.5.1 for Linux
50+
if: matrix.os != 'macos-latest'
51+
env:
52+
OS_NAME: ${{ matrix.os }}
53+
run: |
54+
cmake_suffix=$(if [ $OS_NAME == 'macos-latest' ]; then echo "Darwin-x86_64"; else echo "Linux-x86_64"; fi)
55+
cmake_url=$(echo "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VER}/cmake-${CMAKE_VER}-${cmake_suffix}.tar.gz")
56+
wget --quiet "${cmake_url}"
57+
tar -xf ./cmake-${CMAKE_VER}-${cmake_suffix}.tar.gz
58+
cmake_install_dir=$(echo "cmake-${CMAKE_VER}-x86_64")
59+
mv cmake-${CMAKE_VER}-${cmake_suffix} ${cmake_install_dir}
60+
cmake_lnx_dir=$(echo "${cmake_install_dir}/bin")
61+
cmake_osx_dir=$(echo "${cmake_install_dir}/CMake.app/Contents/bin")
62+
cmake_dir=$(if [ $OS_NAME == 'macos-latest' ]; then echo "${cmake_osx_dir}"; else echo "${cmake_lnx_dir}"; fi)
63+
echo "::set-env name=CMAKE_PROGRAM::$(pwd)/${cmake_dir}/cmake"
64+
65+
- name: Install Dependencies for Macos
4666
if: matrix.os == 'macos-latest'
4767
run: |
4868
brew install fontconfig glfw freeimage boost fftw lapack openblas
69+
echo "::set-env name=CMAKE_PROGRAM::cmake"
4970
5071
- name: Install Common Dependencies for Ubuntu
51-
if: matrix.os == 'ubuntu-18.04'
72+
if: matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04'
5273
run: |
5374
sudo apt-get -qq update
5475
sudo apt-get install -y libfreeimage-dev \
@@ -62,7 +83,7 @@ jobs:
6283
run: sudo apt-get install -y libatlas-base-dev
6384

6485
- name: Install MKL for Ubuntu
65-
if: matrix.os == 'ubuntu-18.04' && matrix.blas_backend == 'MKL'
86+
if: (matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04') && matrix.blas_backend == 'MKL'
6687
run: |
6788
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
6889
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
@@ -71,7 +92,7 @@ jobs:
7192
sudo apt-get install -y intel-mkl-64bit-2020.0-088
7293
7394
- name: Install OpenBLAS for Ubuntu
74-
if: matrix.os == 'ubuntu-18.04' && matrix.blas_backend == 'OpenBLAS'
95+
if: (matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04') && matrix.blas_backend == 'OpenBLAS'
7596
run: sudo apt-get install -y libopenblas-dev
7697

7798
- name: CMake Configure
@@ -86,7 +107,7 @@ jobs:
86107
dashboard=$(if [ -z "$prnum" ]; then echo "Continuous"; else echo "Experimental"; fi)
87108
buildname="$buildname-cpu-$BLAS_BACKEND"
88109
mkdir build && cd build
89-
cmake -G Ninja \
110+
${CMAKE_PROGRAM} -G Ninja \
90111
-DCMAKE_MAKE_PROGRAM:FILEPATH=${GITHUB_WORKSPACE}/ninja \
91112
-DAF_BUILD_CUDA:BOOL=OFF -DAF_BUILD_OPENCL:BOOL=OFF \
92113
-DAF_BUILD_UNIFIED:BOOL=OFF -DAF_BUILD_EXAMPLES:BOOL=ON \

0 commit comments

Comments
 (0)