我正在使用这个片段在travis虚拟机中预装所需的编译器版本
- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5']
packages: ['clang-3.5']
env: COMPILER=clang++-3.5
这具有在机器中运行构建而不使用sudo
的优点,这将导致更快的构建。
在使用travis时,如何在linux和osx上安装cmake 2.8.12 (或最近的)?我试过了
- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5', 'add-apt-repository']
packages: ['clang-3.5', 'ppa:kalakris/cmake']
env: COMPILER=clang++-3.5
未获成功
发布于 2015-10-18 21:18:49
要从kalakris安装cmake,请使用:
addons:
apt:
packages:
- cmake
sources:
- kalakris-cmake
关于最近的CMake (来自https://github.com/ldionne/hana/blob/master/.travis.yml)
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz"
mkdir cmake && travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
else
brew install cmake
fi
在您的案例中,一个完整的片段是:
- os: linux
compiler: clang
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7', 'kalakris-cmake']
packages: ['clang-3.7', 'cmake']
env: COMPILER=clang++-3.7
发布于 2022-07-02 08:27:02
一次非常糟糕的攻击( travis cmake不在/usr/bin )
before_install:
- wget -q -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | sudo apt-key add -
- sudo apt-add-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main'
- sudo apt-get update -y -qq
install:
- sudo apt-get install -y cmake
script:
- /usr/bin/cmake ..
- make
https://stackoverflow.com/questions/33196136
复制相似问题