]> granicus.if.org Git - jq/commitdiff
Build on windows (mingw) on appveyor
authorJan Schulz <jasc@gmx.net>
Sat, 16 Jan 2016 11:44:34 +0000 (12:44 +0100)
committerNicolas Williams <nico@cryptonector.com>
Sat, 16 Jan 2016 23:02:43 +0000 (17:02 -0600)
For this to work, one of the core commiter should do:

* enable appveyor in the github project (grant access)
* Make an appveyor account and add the github jq repo as a new project

inspirations from:

appveyor, msys2, use bash environment to build...
* https://github.com/ariscop/elemental-ircd/blob/appveyor/appveyor.yml
* https://github.com/khaledhosny/ots/pull/67/files
* https://github.com/universal-ctags/ctags/blob/master/appveyor.yml
* https://github.com/universal-ctags/ctags/blob/master/win32/appveyor.bat

and with mvsc
* https://github.com/khaledhosny/ots/blob/master/.appveyor.yml

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
appveyor.yml [new file with mode: 0644]

diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644 (file)
index 0000000..ee9c60c
--- /dev/null
@@ -0,0 +1,35 @@
+environment:
+  matrix:
+  - Compiler: mingw
+
+
+install:
+  - set "PATH=C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%"
+  - set MSYSTEM=MINGW64
+  # update mysy2
+  - C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy pacman-mirrors"
+  - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy"
+  # this crashes? 
+  #- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-toolchain" 
+  - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S autoconf automake bison flex"
+  # install oniguruma
+  - C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-i686-oniguruma mingw-w64-x86_64-oniguruma"
+
+
+build_script:
+  - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && autoreconf -i"
+  - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && ./configure --disable-shared --enable-static --enable-all-static"
+  - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && make LDFLAGS=-lshlwapi"
+  - 7z a jq-package.zip jq.1 jq.exe
+  - bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && pwd && ls -la"
+  
+test_script:
+  - echo not run?
+      
+artifacts:
+  - path: jq-package.zip
+    name: jq-package
+    
+  - path: jq.exe
+    name: jq-exe
+