From 5d589a6662b67d3bb8f7c16f3e8db1bcb3f8d37a Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Sun, 19 Jul 2015 23:30:05 +0100 Subject: [PATCH] Move Travis install step into shell script. So that the masterlist repositories can call it when building the metadata editor, reducing duplication. --- .travis.yml | 32 +++----------------------------- install-step.travis.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 29 deletions(-) create mode 100644 install-step.travis.sh diff --git a/.travis.yml b/.travis.yml index 1241f760..7703ff91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,35 +23,9 @@ addons: install: # Use GCC 5. - if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi - # Currently inside the cloned repo path. - # Get the 3rd-party CMake modules. - - wget -P build https://raw.githubusercontent.com/rpavlik/cmake-modules/master/GetGitRevisionDescription.cmake - - wget -P build https://raw.githubusercontent.com/rpavlik/cmake-modules/master/GetGitRevisionDescription.cmake.in - - cd ../.. - # Install libespm. - - wget https://github.com/WrinklyNinja/libespm/archive/master.tar.gz -O - | tar -xz - - mv libespm-master libespm - # Build yaml-cpp - - wget https://github.com/WrinklyNinja/yaml-cpp/archive/patched-for-loot.tar.gz -O - | tar -xz - - mv yaml-cpp-patched-for-loot yaml-cpp - - mkdir yaml-cpp/build && cd yaml-cpp/build - - cmake .. - - make yaml-cpp - - cd ../.. - # Build libgit2 - - wget https://github.com/libgit2/libgit2/archive/v0.23.0.tar.gz -O - | tar -xz - - mv libgit2-0.23.0 libgit2 - - mkdir libgit2/build && cd libgit2/build - - cmake .. - - make git2 - - cd ../.. - # Build libloadorder - - wget https://github.com/WrinklyNinja/libloadorder/archive/master.tar.gz -O - | tar -xz - - mv libloadorder-master libloadorder - - mkdir libloadorder/build && cd libloadorder/build - - cmake .. -DPROJECT_ARCH=64 -DPROJECT_STATIC_RUNTIME=OFF -DGTEST_ROOT=../gtest-1.7.0 - - make loadorder64 - - cd ../.. + # Run install step script. + - chmod +x install-step.travis.sh + - ./install-step.travis.sh before_script: # Build Google Test diff --git a/install-step.travis.sh b/install-step.travis.sh new file mode 100644 index 00000000..967163a8 --- /dev/null +++ b/install-step.travis.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -ev + +# Currently inside the cloned repo path. +# Get the 3rd-party CMake modules. +wget -P build https://raw.githubusercontent.com/rpavlik/cmake-modules/master/GetGitRevisionDescription.cmake +wget -P build https://raw.githubusercontent.com/rpavlik/cmake-modules/master/GetGitRevisionDescription.cmake.in +cd ../.. + +# Install libespm. +wget https://github.com/WrinklyNinja/libespm/archive/master.tar.gz -O - | tar -xz +mv libespm-master libespm + +# Build yaml-cpp +wget https://github.com/WrinklyNinja/yaml-cpp/archive/patched-for-loot.tar.gz -O - | tar -xz +mv yaml-cpp-patched-for-loot yaml-cpp +mkdir yaml-cpp/build && cd yaml-cpp/build +cmake .. +make yaml-cpp +cd ../.. + +# Build libgit2 +wget https://github.com/libgit2/libgit2/archive/v0.23.0.tar.gz -O - | tar -xz +mv libgit2-0.23.0 libgit2 +mkdir libgit2/build && cd libgit2/build +cmake .. +make git2 +cd ../.. + +# Build libloadorder +wget https://github.com/WrinklyNinja/libloadorder/archive/master.tar.gz -O - | tar -xz +mv libloadorder-master libloadorder +mkdir libloadorder/build && cd libloadorder/build +cmake .. -DPROJECT_ARCH=64 -DPROJECT_STATIC_RUNTIME=OFF -DGTEST_ROOT=../gtest-1.7.0 +make loadorder64 +cd ../..