|
| 1 | +# Copyright (C) 2020 IBM Corp. |
| 2 | +# This program is Licensed under the Apache License, Version 2.0 |
| 3 | +# (the "License"); you may not use this file except in compliance |
| 4 | +# with the License. You may obtain a copy of the License at |
| 5 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | +# Unless required by applicable law or agreed to in writing, software |
| 7 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 8 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 9 | +# See the License for the specific language governing permissions and |
| 10 | +# limitations under the License. See accompanying LICENSE file. |
| 11 | + |
1 | 12 | language: cpp
|
2 | 13 | notifications:
|
3 | 14 | email: false
|
4 |
| -sudo: required |
5 | 15 |
|
6 | 16 | branches:
|
7 | 17 | only:
|
8 | 18 | - master
|
9 | 19 |
|
10 |
| -before_script: |
11 |
| - # |
12 |
| - - curl -O "https://www.shoup.net/ntl/ntl-11.4.3.tar.gz" |
13 |
| - - tar --no-same-owner -xf ntl-11.4.3.tar.gz |
14 |
| - - cd ntl-11.4.3/src |
15 |
| - - ./configure PREFIX=~/ntl SHARED=on NTL_GMP_LIP=on NTL_THREADS=on NTL_THREAD_BOOST=on |
16 |
| - - make -j4 |
17 |
| - - make install |
18 |
| - - cd ../.. |
19 |
| - |
20 |
| - # Build Folder |
21 |
| - # |
22 |
| - - mkdir build |
23 |
| - - cd build |
24 |
| - |
25 |
| -matrix: |
| 20 | +cache: ccache |
| 21 | + |
| 22 | +jobs: |
26 | 23 | include:
|
27 |
| - - os: linux |
28 |
| - dist: bionic |
29 |
| - env: |
30 |
| - - TEST="Build test" |
31 |
| - addons: |
32 |
| - apt: |
33 |
| - sources: |
34 |
| - - ubuntu-toolchain-r-test |
35 |
| - packages: |
36 |
| - - gcc |
37 |
| - - g++ |
38 |
| - - m4 |
39 |
| - - patchelf |
| 24 | + - name: "Ubuntu 18.04 lib build gcc" |
| 25 | + os: linux |
| 26 | + dist: bionic |
| 27 | + compiler: gcc |
| 28 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=OFF |
| 29 | + - name: "Ubuntu 20.04 lib build gcc" |
| 30 | + os: linux |
| 31 | + dist: focal |
| 32 | + compiler: gcc |
| 33 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=OFF |
| 34 | + - name: "Ubuntu 18.04 lib build clang" |
| 35 | + os: linux |
| 36 | + dist: bionic |
| 37 | + compiler: clang |
| 38 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=OFF |
| 39 | + - name: "Ubuntu 20.04 lib build clang" |
| 40 | + os: linux |
| 41 | + dist: focal |
| 42 | + compiler: clang |
| 43 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=OFF |
| 44 | + - name: "Ubuntu 18.04 package build gcc" |
| 45 | + os: linux |
| 46 | + dist: bionic |
| 47 | + compiler: gcc |
| 48 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=ON |
| 49 | + - name: "Ubuntu 20.04 package build gcc" |
| 50 | + os: linux |
| 51 | + dist: focal |
| 52 | + compiler: gcc |
| 53 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=ON |
| 54 | + - name: "Ubuntu 18.04 package build clang" |
| 55 | + os: linux |
| 56 | + dist: bionic |
| 57 | + compiler: clang |
| 58 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=ON |
| 59 | + - name: "Ubuntu 20.04 package build clang" |
| 60 | + os: linux |
| 61 | + dist: focal |
| 62 | + compiler: clang |
| 63 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=ON |
| 64 | + - name: "MacOS Mojave lib build" |
| 65 | + os: osx |
| 66 | + osx_image: xcode11.3 |
| 67 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=OFF |
| 68 | + - name: "MacOS Mojave package build" |
| 69 | + os: osx |
| 70 | + osx_image: xcode11.3 |
| 71 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=ON |
| 72 | + - name: "MacOS Catalina lib build" |
| 73 | + os: osx |
| 74 | + osx_image: xcode12 |
| 75 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=OFF |
| 76 | + - name: "MacOS Catalina package build" |
| 77 | + os: osx |
| 78 | + osx_image: xcode12 |
| 79 | + env: INSTALL_PREFIX="~/helib_install" PACKAGE_BUILD=ON |
| 80 | + |
| 81 | + |
| 82 | +addons: |
| 83 | + apt: |
| 84 | + packages: |
| 85 | + - g++ |
| 86 | + - clang |
| 87 | + - patchelf |
| 88 | + - cmake |
| 89 | + - bats |
| 90 | + update: true |
| 91 | + homebrew: |
| 92 | + packages: |
| 93 | + - cmake |
| 94 | + - bats-core |
| 95 | + - ccache |
| 96 | + update: true |
40 | 97 |
|
| 98 | +# activating ccache on MacOS. |
| 99 | +before_install: |
| 100 | + - if [ "${TRAVIS_OS_NAME}" == "osx" ]; then |
| 101 | + export PATH="/usr/local/opt/ccache/libexec:$PATH"; |
| 102 | + fi |
| 103 | + |
| 104 | +install: |
| 105 | + - ./ci/install_deps.sh |
41 | 106 |
|
42 | 107 | script:
|
43 |
| - - cmake -DPACKAGE_BUILD=OFF -DNTL_DIR="/home/travis/ntl/" -DENABLE_TEST=ON .. |
44 |
| - - make -j4 |
45 |
| - - ctest -j4 |
| 108 | + - ./ci/build_install_lib.sh "${PACKAGE_BUILD}" "${INSTALL_PREFIX}" |
| 109 | + - ./ci/test_lib.sh |
| 110 | + - ./ci/build_test_consumer.sh "examples" "${PACKAGE_BUILD}" "${INSTALL_PREFIX}" |
| 111 | + - ./ci/build_test_consumer.sh "utils" "${PACKAGE_BUILD}" "${INSTALL_PREFIX}" |
| 112 | + |
0 commit comments