[Groonga-mysql-commit] mroonga/mroonga [master] travis: extract before_script

Back to archive index

null+****@clear***** null+****@clear*****
2012年 8月 9日 (木) 20:40:53 JST


Kouhei Sutou	2012-08-09 20:40:53 +0900 (Thu, 09 Aug 2012)

  New Revision: ca6a90e770dcd31ce0f1498f9a79f626a01e5755
  https://github.com/mroonga/mroonga/commit/ca6a90e770dcd31ce0f1498f9a79f626a01e5755

  Log:
    travis: extract before_script

  Added files:
    tools/travis_before_script.sh
  Modified files:
    .travis.yml

  Modified: .travis.yml (+2 -20)
===================================================================
--- .travis.yml    2012-08-09 20:24:52 +0900 (a5c0bbb)
+++ .travis.yml    2012-08-09 20:40:53 +0900 (03ad4ca)
@@ -5,33 +5,15 @@ env:
   - MYSQL_VERSION=system
   - MYSQL_VERSION=5.5.25a
 install:
+  - sed -e 's/^deb/deb-src/' /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/source.list
   - echo "deb http://packages.groonga.org/ubuntu/ $(lsb_release --short --codename) universe" | sudo tee /etc/apt/sources.list.d/groonga.list
   - sudo apt-get update
   - sudo apt-get -y --allow-unauthenticated install groonga-keyring
   - sudo apt-get -y purge zeromq
   - sudo apt-get update
   - sudo apt-get -y install libgroonga-dev
-  - sudo apt-get -y build-dep mysql-server
-  - sudo apt-get -y install cmake
 before_script:
-  - |
-    if [ "$MYSQL_VERSION" = "system" ]; then
-      apt-get source mysql-server
-      ln -s $(find . -maxdepth 1 -type d | sort | tail -1) mysql
-      cd mysql
-      debuild -us -uc -Tconfigure
-      make -j$(grep '^processor' /proc/cpuinfo | wc -l) > /dev/null
-      cd ..
-    else
-      wget http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.5/mysql-${MYSQL_VERSION}.tar.gz
-      tar xvzf mysql-${MYSQL_VERSION}.tar.gz
-      ln -s mysql-${MYSQL_VERSION} mysql
-      cd mysql
-      BUILD/compile-amd64-debug-max
-      cd ..
-    fi
-  - ./autogen.sh
-  - ./configure --with-mysql-source=$PWD/mysql --with-mysql-config=$PWD/mysql_config
+  - tools/travis_before_script.sh
 script:
   - test/run-unit-test.sh
   - test/run-sql-test.sh

  Added: tools/travis_before_script.sh (+30 -0) 100755
===================================================================
--- /dev/null
+++ tools/travis_before_script.sh    2012-08-09 20:40:53 +0900 (360089c)
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -x
+set -e
+
+mkdir -p vendor
+cd vendor
+if [ "$MYSQL_VERSION" = "system" ]; then
+    sudo apt-get -y build-dep mysql-server
+    apt-get source mysql-server
+    ln -s $(find . -maxdepth 1 -type d | sort | tail -1) mysql
+    cd mysql
+    debuild -us -uc -Tconfigure
+    make -j$(grep '^processor' /proc/cpuinfo | wc -l) > /dev/null
+    cd ..
+else
+    sudo apt-get -y install cmake
+    wget http://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.5/mysql-${MYSQL_VERSION}.tar.gz
+    tar xvzf mysql-${MYSQL_VERSION}.tar.gz
+    ln -s mysql-${MYSQL_VERSION} mysql
+    cd mysql
+    BUILD/compile-amd64-debug-max
+    cd ..
+fi
+cd ..
+
+./autogen.sh
+./configure \
+    --with-mysql-source=$PWD/vendor/mysql \
+    --with-mysql-config=$PWD/vendor/mysql/mysql_config
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
下載 



Groonga-mysql-commit メーリングリストの案内
Back to archive index