You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/07/06 19:55:18 UTC

[05/10] lucy git commit: Test more platforms with Appveyor

Test more platforms with Appveyor

- C build with MinGW32
- C build with MSYS2/MinGW64
- Perl build with ActivePerl


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/87c8b4d6
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/87c8b4d6
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/87c8b4d6

Branch: refs/heads/master
Commit: 87c8b4d60e8c8b42cc86a92e1a4cead5d7aebad6
Parents: b711313
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Jul 6 17:40:44 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Jul 6 18:19:53 2016 +0200

----------------------------------------------------------------------
 appveyor.yml                 |  9 ++++++-
 devel/bin/appveyor-build.bat | 49 +++++++++++++++++++++++++++++++++++----
 devel/bin/travis-test.sh     | 10 +++++---
 3 files changed, 59 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/87c8b4d6/appveyor.yml
----------------------------------------------------------------------
diff --git a/appveyor.yml b/appveyor.yml
index 69bebbb..eb0d9b0 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -18,10 +18,17 @@ environment:
     LUCY_DEBUG: 1
   matrix:
     - CLOWNFISH_HOST: c
+      BUILD_ENV: msys2
+      MSYSTEM: MINGW64
+    - CLOWNFISH_HOST: c
+      BUILD_ENV: mingw32
+    - CLOWNFISH_HOST: c
+      BUILD_ENV: msvc
       MSVC_VERSION: 10
     - CLOWNFISH_HOST: c
+      BUILD_ENV: msvc
       MSVC_VERSION: 12
-#    - CLOWNFISH_HOST: perl
+    - CLOWNFISH_HOST: perl
 
 build: off
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/87c8b4d6/devel/bin/appveyor-build.bat
----------------------------------------------------------------------
diff --git a/devel/bin/appveyor-build.bat b/devel/bin/appveyor-build.bat
index 7620f38..5798496 100644
--- a/devel/bin/appveyor-build.bat
+++ b/devel/bin/appveyor-build.bat
@@ -15,6 +15,11 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 rem See the License for the specific language governing permissions and
 rem limitations under the License.
 
+if "%BUILD_ENV%" == "msys2" goto test_msys2
+
+rem Install Clownfish.
+git clone -q --depth 1 https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
+
 if "%CLOWNFISH_HOST%" == "c" goto test_c
 if "%CLOWNFISH_HOST%" == "perl" goto test_perl
 
@@ -26,6 +31,14 @@ exit /b 1
 rem Needed to find DLL.
 path C:\install\bin;%path%
 
+if "%BUILD_ENV%" == "msvc" goto test_msvc
+if "%BUILD_ENV%" == "mingw32" goto test_mingw32
+
+echo unknown BUILD_ENV: %BUILD_ENV%
+exit /b 1
+
+:test_msvc
+
 if "%MSVC_VERSION%" == "10" goto msvc_10
 
 call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC_VERSION%.0\VC\vcvarsall.bat" amd64
@@ -36,23 +49,49 @@ call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
 
 :msvc_build
 
-rem Install Clownfish.
-cd \projects
-git clone -q --depth 1 https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
 cd lucy-clownfish\runtime\c
 call configure && nmake || exit /b
 call install --prefix C:\install
 
-cd \projects\lucy\c
+cd ..\..\..\c
 call configure --clownfish-prefix C:\install && nmake && nmake test
 
 exit /b
 
+:test_mingw32
+
+path C:\MinGW\bin;%path%
+
+cd lucy-clownfish\compiler\c
+call configure && mingw32-make || exit /b
+cd ..\..\runtime\c
+call configure && mingw32-make || exit /b
+call install --prefix C:\install
+
+cd ..\..\..\c
+call configure --clownfish-prefix C:\install && mingw32-make && mingw32-make test
+
+exit /b
+
+:test_msys2
+
+C:\msys64\usr\bin\sh -lc "cd /c/projects/lucy && devel/bin/travis-test.sh"
+
+exit /b
+
 :test_perl
 
+path C:\MinGW\bin;%path%
+call ppm install dmake
+
 perl -V
 
-cd perl
+cd lucy-clownfish\compiler\perl
+perl Build.PL && call Build install || exit /b
+cd ..\..\runtime\perl
+perl Build.PL && call Build install || exit /b
+
+cd ..\..\..\perl
 perl Build.PL && call Build && call Build test
 
 exit /b

http://git-wip-us.apache.org/repos/asf/lucy/blob/87c8b4d6/devel/bin/travis-test.sh
----------------------------------------------------------------------
diff --git a/devel/bin/travis-test.sh b/devel/bin/travis-test.sh
index 6e9c494..6f245d8 100755
--- a/devel/bin/travis-test.sh
+++ b/devel/bin/travis-test.sh
@@ -21,7 +21,8 @@ set -e
 # Print all commands before executing.
 set -x
 
-install_dir="$TRAVIS_BUILD_DIR/install"
+build_dir="$(pwd)"
+install_dir="$build_dir/install_dir"
 
 # Fetch Clownfish.
 git clone -q --depth 1 https://git-wip-us.apache.org/repos/asf/lucy-clownfish.git
@@ -33,6 +34,9 @@ test_c() {
     make -j
     ./install.sh --prefix "$install_dir"
 
+    # Needed to find DLL on Windows.
+    export PATH="$install_dir/bin:$PATH"
+
     cd ../../../c
     ./configure --clownfish-prefix "$install_dir"
     make -j test
@@ -59,9 +63,9 @@ test_perl() {
 test_go() {
     export GOPATH="$install_dir"
     mkdir -p "$install_dir/src/git-wip-us.apache.org/repos/asf"
-    ln -s "$TRAVIS_BUILD_DIR/lucy-clownfish" \
+    ln -s "$build_dir/lucy-clownfish" \
         "$install_dir/src/git-wip-us.apache.org/repos/asf/lucy-clownfish.git"
-    ln -s "$TRAVIS_BUILD_DIR" \
+    ln -s "$build_dir" \
         "$install_dir/src/git-wip-us.apache.org/repos/asf/lucy.git"
 
     # Install Clownfish.