gcc.sh 388 Bytes
Newer Older
rusty1s's avatar
rusty1s committed
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
  sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes
  sudo apt update
  sudo apt install gcc-7 g++-7 --yes
  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
                           --slave /usr/bin/g++ g++ /usr/bin/g++-7
  sudo update-alternatives --config gcc
  gcc --version
  g++ --version
fi