[Groonga-commit] groonga/groonga at aa426d3 [master] travis: add Windows build with MinGW

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jul 24 10:08:52 JST 2018


Kouhei Sutou	2018-07-24 10:08:52 +0900 (Tue, 24 Jul 2018)

  New Revision: aa426d3a1411e4b6b671a2cb4f7607fc7cdc3b4b
  https://github.com/groonga/groonga/commit/aa426d3a1411e4b6b671a2cb4f7607fc7cdc3b4b

  Message:
    travis: add Windows build with MinGW

  Modified files:
    .travis.yml
    travis/before-script.sh
    travis/install.sh
    travis/script.sh

  Modified: .travis.yml (+4 -0)
===================================================================
--- .travis.yml    2018-07-24 01:13:18 +0900 (8495c6032)
+++ .travis.yml    2018-07-24 10:08:52 +0900 (9a33bac9c)
@@ -51,6 +51,10 @@ matrix:
       env: DOCKER=ubuntu-16.04
     - os: linux
       env: DOCKER=ubuntu-18.04
+    - os: linux
+      env: TARGET=windows ARCHITECTURES=x86
+    - os: linux
+      env: TARGET=windows ARCHITECTURES=x64
   allow_failures:
   #   - os: osx
   #     compiler: clang

  Modified: travis/before-script.sh (+23 -3)
===================================================================
--- travis/before-script.sh    2018-07-24 01:13:18 +0900 (07d8ae448)
+++ travis/before-script.sh    2018-07-24 10:08:52 +0900 (b04f36956)
@@ -4,6 +4,7 @@ set -e
 set -u
 
 : ${DOCKER:=}
+: ${TARGET:=}
 
 touch lib/grn_ecmascript.c
 
@@ -14,10 +15,19 @@ if [ -n "${DOCKER}" ]; then
          -t groonga/groonga-${DOCKER} \
          -f travis/Dockerfile.${DOCKER} \
          .
-  exit 0
+  exit $?
+fi
+
+if [ -n "${TARGET}" ]; then
+  BUILD_TOOL=autotools
+  ENABLE_MRUBY=yes
+  ENABLE_DOCUMENT=yes
+  ENABLE_MAINTAINER_MODE=yes
 fi
 
 : ${ENABLE_MRUBY:=no}
+: ${ENABLE_DOCUMENT:=no}
+: ${ENABLE_MAINTAINER_MODE:=no}
 
 prefix=/tmp/local
 
@@ -36,6 +46,12 @@ case "${BUILD_TOOL}" in
     if [ "${ENABLE_MRUBY}" = "yes" ]; then
       configure_args="${configure_args} --with-ruby --enable-mruby"
     fi
+    if [ "${ENABLE_DOCUMENT}" = "yes" ]; then
+      configure_args="${configure_args} --enable-document"
+    fi
+    if [ "${ENABLE_MAINTAINER_MODE}" = "yes" ]; then
+      configure_args="${configure_args} --enable-maintainer-mode"
+    fi
 
     ./configure --prefix=${prefix} --with-ruby ${configure_args}
     ;;
@@ -52,7 +68,7 @@ esac
 
 case "$(uname)" in
   Linux)
-    n_processors="$(grep '^processor' /proc/cpuinfo | wc -l)"
+    n_processors="$(nproc)"
     ;;
   Darwin)
     n_processors="$(/usr/sbin/sysctl -n hw.ncpu)"
@@ -62,4 +78,8 @@ case "$(uname)" in
     ;;
 esac
 
-make -j${n_processors} > /dev/null
+if [ -n "${TARGET}" ]; then
+  make dist -j${n_processors} > /dev/null
+else
+  make -j${n_processors} > /dev/null
+fi

  Modified: travis/install.sh (+8 -2)
===================================================================
--- travis/install.sh    2018-07-24 01:13:18 +0900 (43dffa856)
+++ travis/install.sh    2018-07-24 10:08:52 +0900 (5a58db3f5)
@@ -4,7 +4,7 @@ set -e
 set -u
 
 : ${DOCKER:=}
-: ${ENABLE_MRUBY:=no}
+: ${TARGET:=}
 
 git submodule update --init --depth 1
 
@@ -16,9 +16,15 @@ if [ -n "${DOCKER}" ]; then
   sudo apt-get install -qq -y \
        autotools-dev \
        autoconf-archive
-  exit 0
+  exit $?
+fi
+
+if [ -n "${TARGET}" ]; then
+  ENABLE_MRUBY=yes
 fi
 
+: ${ENABLE_MRUBY:=no}
+
 case "${TRAVIS_OS_NAME}" in
   linux)
     curl \

  Modified: travis/script.sh (+14 -3)
===================================================================
--- travis/script.sh    2018-07-24 01:13:18 +0900 (99ed469b8)
+++ travis/script.sh    2018-07-24 10:08:52 +0900 (2be16bbc4)
@@ -4,17 +4,28 @@ set -e
 set -u
 
 : ${DOCKER:=}
-: ${ENABLE_MRUBY:=no}
-: ${TEST_TARGET:=all}
+: ${TARGET:=}
 
 if [ -n "${DOCKER}" ]; then
   docker run \
          --interactive \
          --tty \
           groonga/groonga-${DOCKER}
-  exit 0
+  exit $?
+fi
+
+if [ -n "${TARGET}" ]; then
+  make \
+    -C packages/${TARGET} \
+    build \
+    DEBUG_BUILD=yes \
+    ARCHITECTURES=${ARCHITECTURES}
+  exit $?
 fi
 
+: ${ENABLE_MRUBY:=no}
+: ${TEST_TARGET:=all}
+
 prefix=/tmp/local
 
 command_test_options="--reporter=mark --timeout=60"
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180724/e6226b81/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index