Skip to content

Instantly share code, notes, and snippets.

@tibovanheule
Created October 23, 2018 16:27
Show Gist options
  • Save tibovanheule/928f226be7170cdb4e2d32737e7032d4 to your computer and use it in GitHub Desktop.
Save tibovanheule/928f226be7170cdb4e2d32737e7032d4 to your computer and use it in GitHub Desktop.
gcc-8 and g++-8 on ubuntu 14 for Travis CI
# -Just to install gcc-8 and g++-8 on ubuntu 14-
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt-get install gcc-8 g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60
# -Travis script-
language: c
sudo: enabled
before_install:
# Install gcc-! and g++-8
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt update
- sudo apt-get install gcc-8 g++-8
# To point to the new install
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 60
# Depencies I needed to compile
- sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libglew-dev libboost-test-dev
# Cmake: make the buildfiles
- cmake . -DCMAKE_BUILD_TYPE=Debug
# The tests Travis as to run
script:
# Try to compile main program
- make -j 2 puzzle_bots_part1
# Try to compile the tests
- make -j 2 puzzle_bots_part1_test
# Run the test
- ./puzzle_bots_part1_test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment