[Groonga-commit] groonga/groonga at 6e5c03c [master] package windows: use Docker

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Mar 27 11:39:18 JST 2017


Kouhei Sutou	2017-03-27 11:39:18 +0900 (Mon, 27 Mar 2017)

  New Revision: 6e5c03c16bf0d79482a6cce383bb662fdefca276
  https://github.com/groonga/groonga/commit/6e5c03c16bf0d79482a6cce383bb662fdefca276

  Merged cb96390: Merge pull request #645 from groonga/package-windows-use-docker

  Message:
    package windows: use Docker
    
    It'll reduce build environment preparing time.

  Added files:
    packages/windows/Dockerfile
  Removed files:
    packages/windows/Vagrantfile
  Modified files:
    packages/windows/Makefile.am
    packages/windows/build.sh

  Added: packages/windows/Dockerfile (+20 -0) 100644
===================================================================
--- /dev/null
+++ packages/windows/Dockerfile    2017-03-27 11:39:18 +0900 (0eb1baa)
@@ -0,0 +1,20 @@
+FROM debian
+
+RUN dpkg --add-architecture i386
+RUN apt update
+RUN apt install -V -y \
+    build-essential \
+    devscripts \
+    autoconf \
+    libtool \
+    cmake \
+    pkg-config \
+    mingw-w64 \
+    wine \
+    wine-binfmt \
+    rsync \
+    ruby
+
+RUN gem install rake
+
+CMD ["/build/build.sh"]

  Modified: packages/windows/Makefile.am (+22 -4)
===================================================================
--- packages/windows/Makefile.am    2017-03-25 16:00:07 +0900 (ca60617)
+++ packages/windows/Makefile.am    2017-03-27 11:39:18 +0900 (3517e15)
@@ -30,8 +30,7 @@ upload-to-tmp:
 	    packages �� packages.groonga.org:public/tmp/;			\
 	done
 
-build: source
-	vagrant destroy --force
+prepare-build:
 	@(							\
 	  echo "VERSION='$(VERSION)'";				\
 	  echo "SOURCE='$(SOURCE)'";				\
@@ -39,8 +38,27 @@ build: source
 	  echo "MEMORY_DEBUG_BUILD='$(MEMORY_DEBUG_BUILD)'";	\
 	  echo "ARCHITECTURES='$(ARCHITECTURES)'";		\
 	) > tmp/env.sh
-	vagrant up
-	vagrant destroy --force
+	docker build				\
+	  --tag groonga/windows-build		\
+	  --force-rm				\
+	  $(srcdir)
+
+build: source
+	$(MAKE) prepare-build
+	docker run				\
+	  --rm					\
+	  --volume ${abs_builddir}:/build	\
+	  groonga/windows-build
+
+debug: source
+	$(MAKE) prepare-build
+	docker run				\
+	  --rm					\
+	  --interactive				\
+	  --tty					\
+	  --volume ${abs_builddir}:/build	\
+	  groonga/windows-build			\
+	  /bin/bash
 
 build-groonga: source
 	for architecture in $(ARCHITECTURES); do			\

  Deleted: packages/windows/Vagrantfile (+0 -13) 100644
===================================================================
--- packages/windows/Vagrantfile    2017-03-25 16:00:07 +0900 (3ca2fa9)
+++ /dev/null
@@ -1,13 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
-VAGRANTFILE_API_VERSION = "2"
-
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
-  config.vm.box = "bento/debian-8.7"
-  config.vm.provision(:shell, :privileged => false, :path => "build.sh")
-  config.vm.provider("virtualbox") do |virtual_box|
-    virtual_box.memory = (ENV["VM_MEMORY"] || 2048).to_i
-  end
-end

  Modified: packages/windows/build.sh (+1 -19)
===================================================================
--- packages/windows/build.sh    2017-03-25 16:00:07 +0900 (8b1a2b1)
+++ packages/windows/build.sh    2017-03-27 11:39:18 +0900 (5b19623)
@@ -11,26 +11,8 @@ run()
   fi
 }
 
-run sudo sed -i'' -e 's/httpredir/ftp.jp/g' /etc/apt/sources.list
+cd "$(dirname $0)"
 
-run sudo dpkg --add-architecture i386
-run sudo apt update
-run sudo apt install -V -y \
-    build-essential \
-    devscripts \
-    autoconf \
-    libtool \
-    cmake \
-    pkg-config \
-    mingw-w64 \
-    wine \
-    wine-binfmt \
-    rsync \
-    ruby
-
-run sudo gem install rake
-
-run cd /vagrant
 . tmp/env.sh
 
 for architecture in ${ARCHITECTURES}; do
-------------- next part --------------
HTML����������������������������...
Download 



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