Skip to content

Commit ee1b8b1

Browse files
Add installation steps for new version of cmake
The Travis-preinstalled CMake is unfortunately not installed via apt, so we can't replace it with an apt-supplied version very easily. Additionally, we can't permit the Travis-preinstalled copy to survive, as the Travis default path lists the Travis CMake install location ahead of any place where apt would install CMake to. Instead of apt removing or upgrading to a new CMake version, we must instead delete the Travis copy of CMake and install a newer version via apt.
1 parent a63903a commit ee1b8b1

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.travis.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ before_install:
3535

3636
addons:
3737
apt:
38+
sources:
39+
- sourceline: 'deb https://apt.kitware.com/ubuntu/ xenial main'
40+
key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
41+
- sourceline: 'deb https://apt.kitware.com/ubuntu/ xenial-rc main'
3842
packages:
39-
- ninja-build
43+
- cmake
44+
- ninja-build
4045

4146
matrix:
4247
include:
@@ -270,6 +275,14 @@ matrix:
270275
language: python
271276
python: 3.7
272277
install:
278+
# Hide Travis-preinstalled CMake
279+
# The Travis-preinstalled CMake is unfortunately not installed via apt, so we
280+
# can't replace it with an apt-supplied version very easily. Additionally, we
281+
# can't permit the Travis-preinstalled copy to survive, as the Travis default
282+
# path lists the Travis CMake install location ahead of any place where apt
283+
# would install CMake to. Instead of apt removing or upgrading to a new CMake
284+
# version, we must instead delete the Travis copy of CMake.
285+
- sudo rm -rf /usr/local/cmake*
273286
# Install gcc
274287
- source_pkg gcc
275288
- arm-none-eabi-gcc --version
@@ -347,8 +360,10 @@ matrix:
347360
name: "cmakecheck"
348361
env: NAME=cmakecheck
349362
language: python
350-
python: 3.7
363+
python: 3.8
351364
install:
365+
# Hide Travis-preinstalled CMake
366+
- sudo rm -rf /usr/local/cmake*
352367
# Install python modules
353368
- python -m pip install --upgrade pip==18.1
354369
- python -m pip install --upgrade setuptools==40.4.3

0 commit comments

Comments
 (0)