From 092559f4d32c730beca17f903b7da193ba38c873 Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 12:06:06 +0100
Subject: [PATCH 01/12] Add travis.yml config
---
.gitignore | 1 +
.travis.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
create mode 100644 .travis.yml
diff --git a/.gitignore b/.gitignore
index ee21259..b0fb12f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@ bin/*
*.diff
!.gitignore
+!.travis.yml
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..f4f728c
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,44 @@
+# http://docs.travis-ci.com/user/build-configuration/
+language: cpp
+
+compiler:
+ - gcc
+ - clang
+
+matrix:
+ #include:
+ # - compiler: gcc
+ # - compiler: clang
+ allow_failures:
+ - compiler: clang
+
+#branches:
+# only:
+# - master
+
+before_install:
+ - sudo apt-get update -qq # UPDATE REPOS
+ - sudo apt-get install -y -qq
+
+script:
+# ALL THE BUILD COMMANDS HERE
+ - export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/usr/lib/x86_64-linux-gnu/"
+ - CMAKE_OPTIONS='-DCMAKE_PREFIX_PATH='"$CMAKE_PREFIX_PATH"' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DAQUARIA_INTERNAL_FREETYPE=OFF -DAQUARIA_INTERNAL_LUA=OFF -DAQUARIA_INTERNAL_OGGVORBIS=OFF -DAQUARIA_INTERNAL_OPENAL=OFF -DAQUARIA_INTERNAL_PNG=OFF -DAQUARIA_INTERNAL_SDL=OFF -DAQUARIA_INTERNAL_TINYXML2=OFF -DAQUARIA_INTERNAL_ZLIB=OFF'
+ - rm -rf cmake-build
+ - mkdir cmake-build
+ - cd cmake-build
+ - cmake $CMAKE_OPTIONS ..
+ - make -j 2
+
+#notifications:
+# irc:
+# channels:
+# - "irc.esper.net#bitblot"
+# skip_join: true
+# use_notice: true
+# template:
+# #- "[%{commit}: %{author}] %{message}"
+# #- "%{build_url}"
+# - "[%{repository}#%{branch} @%{commit}] %{author}): %{message}"
+# - "Diff: %{compare_url}"
+# - "Build: %{build_url}"
From 1ff004b33c9d927b5c9b086ae2df9779e0c1126a Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 12:09:39 +0100
Subject: [PATCH 02/12] nop, test travis
From 95e2d2f8d9ad452b06fe889d3422eaebdef07d94 Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 12:13:03 +0100
Subject: [PATCH 03/12] Install openal for travis
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index f4f728c..7705965 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,7 +18,7 @@ matrix:
before_install:
- sudo apt-get update -qq # UPDATE REPOS
- - sudo apt-get install -y -qq
+ - sudo apt-get install -y -qq libopenal-dev
script:
# ALL THE BUILD COMMANDS HERE
From 0f4c1208bafdaf7c00cad094b18e1d01978f1bdb Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 12:20:29 +0100
Subject: [PATCH 04/12] Install libsdl2 for travis
---
.travis.yml | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 7705965..73fa185 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,10 +6,8 @@ compiler:
- clang
matrix:
- #include:
- # - compiler: gcc
- # - compiler: clang
- allow_failures:
+ include:
+ - compiler: gcc
- compiler: clang
#branches:
@@ -18,7 +16,7 @@ matrix:
before_install:
- sudo apt-get update -qq # UPDATE REPOS
- - sudo apt-get install -y -qq libopenal-dev
+ - sudo apt-get install -y -qq libopenal-dev libsdl2-dev
script:
# ALL THE BUILD COMMANDS HERE
From 23e3904f24e0215e0d287b0a97bb59410c7fa15d Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 12:23:08 +0100
Subject: [PATCH 05/12] Changes for container-based infrastructure
---
.travis.yml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 73fa185..4d783b0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,8 @@
# http://docs.travis-ci.com/user/build-configuration/
language: cpp
+sudo: false
+
compiler:
- gcc
- clang
@@ -14,9 +16,11 @@ matrix:
# only:
# - master
-before_install:
- - sudo apt-get update -qq # UPDATE REPOS
- - sudo apt-get install -y -qq libopenal-dev libsdl2-dev
+addons:
+ apt:
+ packages:
+ - libopenal-dev
+ - libsdl2-dev
script:
# ALL THE BUILD COMMANDS HERE
From d9c418f292c81b40ee983f3e234ccad67da5cdcd Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 12:30:22 +0100
Subject: [PATCH 06/12] Switch to SDL 1 for container stuff
---
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 4d783b0..33ce56b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,7 +20,7 @@ addons:
apt:
packages:
- libopenal-dev
- - libsdl2-dev
+ - libsdl-dev
script:
# ALL THE BUILD COMMANDS HERE
From 7eb08bf2ce289f969c682e8f37384eb67902e95e Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 13:06:42 +0100
Subject: [PATCH 07/12] Try to find C++ standard
---
CMakeLists.txt | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 604fb24..62c5336 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -381,8 +381,19 @@ IF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ENDIF(CMAKE_COMPILER_IS_GNUCC)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall -pedantic")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Wall -pedantic")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -std=gnu99")
+
+CHECK_CXX_COMPILER_FLAG("-std=gnu++11" AQUARIA_CC_HAS_GNUXX11)
+CHECK_CXX_COMPILER_FLAG("-std=gnu++1x" AQUARIA_CC_HAS_GNUXX1X)
+CHECK_CXX_COMPILER_FLAG("-std=gnu++0x" AQUARIA_CC_HAS_GNUXX0X)
+IF(AQUARIA_CC_HAS_GNUXX11)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
+ELSEIF(AQUARIA_CC_HAS_GNUXX1X)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++1x")
+ELSEIF(AQUARIA_CC_HAS_GNUXX0X)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
+ENDIF(AQUARIA_CC_HAS_GNUXX11)
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
IF(HAVE_STRCASECMP)
From 3aff70d91e1e71f7e327be4d6fe194a9758855db Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 13:09:12 +0100
Subject: [PATCH 08/12] Add CheckCXXCompilerFlag
---
CMakeLists.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62c5336..0c46ba5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(Aquaria)
INCLUDE(CheckCCompilerFlag)
+INCLUDE(CheckCXXCompilerFlag)
INCLUDE(CheckFunctionExists)
IF(NOT CMAKE_BUILD_TYPE)
From f1218a8d7b07917e2e125caff2513437559ec60d Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 13:12:07 +0100
Subject: [PATCH 09/12] I don't know what I'm doing
---
.travis.yml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 33ce56b..0ed8c8f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,10 +7,7 @@ compiler:
- gcc
- clang
-matrix:
- include:
- - compiler: gcc
- - compiler: clang
+#matrix:
#branches:
# only:
From 267e2b5696013f7e496dd435f1703aa37c44336a Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 13:15:29 +0100
Subject: [PATCH 10/12] Can I do multiple OSs like this?
---
.travis.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 0ed8c8f..346e25d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,10 @@ compiler:
- gcc
- clang
+os:
+ - linux
+ - osx
+
#matrix:
#branches:
From 648b7acfaae4ceb997367ecef87bad62ecc5b3df Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 13:30:31 +0100
Subject: [PATCH 11/12] install sdl/openal on osx
---
.travis.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 346e25d..cb6ae7c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,6 +23,10 @@ addons:
- libopenal-dev
- libsdl-dev
+before_install:
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
+ - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl openal-soft; fi
+
script:
# ALL THE BUILD COMMANDS HERE
- export CMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH;/usr/lib/x86_64-linux-gnu/"
From 1e341052e0bc01f3eeeac261f04e55b6e990f9a6 Mon Sep 17 00:00:00 2001
From: Valentin Ochs
Date: Sat, 14 Jan 2017 14:11:38 +0100
Subject: [PATCH 12/12] enable IRC notifications
---
.travis.yml | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index cb6ae7c..48c02f7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -37,15 +37,15 @@ script:
- cmake $CMAKE_OPTIONS ..
- make -j 2
-#notifications:
-# irc:
-# channels:
-# - "irc.esper.net#bitblot"
-# skip_join: true
-# use_notice: true
-# template:
-# #- "[%{commit}: %{author}] %{message}"
-# #- "%{build_url}"
-# - "[%{repository}#%{branch} @%{commit}] %{author}): %{message}"
-# - "Diff: %{compare_url}"
-# - "Build: %{build_url}"
+notifications:
+ irc:
+ channels:
+ - "irc.esper.net#bitblot"
+ skip_join: true
+ use_notice: true
+ template:
+ #- "[%{commit}: %{author}] %{message}"
+ #- "%{build_url}"
+ - "[%{repository_slug}#%{branch} @%{commit}] (%{author}): %{message}"
+ - "Diff: %{compare_url}"
+ - "Build: %{build_url}"