Skip to content

Commit

Permalink
Travis-CI build & nmake batch file updates (keystone-engine#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
chfl4gs authored Jun 9, 2020
1 parent 23b54ce commit 53239e1
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 9 deletions.
39 changes: 39 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,51 @@ os:
- osx

matrix:
fast_finish: true
include:
- if: branch = master
os: osx
osx_image: xcode10.1
compiler: clang
before_cache:
- brew cleanup
- find /usr/local/Homebrew \! -regex ".+\.git.+" -delete;
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
before_install:
- cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git stash && git clean -d -f
script: brew update && brew install --HEAD keystone

- if: branch = master
os: osx
osx_image: xcode10.1
compiler: gcc
before_cache:
- brew cleanup
- find /usr/local/Homebrew \! -regex ".+\.git.+" -delete;
cache:
directories:
- $HOME/Library/Caches/Homebrew
- /usr/local/Homebrew
before_install:
- cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git stash && git clean -d -f
script: brew update && brew install --HEAD keystone

- name: "Windows nmake 32bit"
os: windows
language: shell
script:
- mkdir build
- cd build
- cmd.exe //C 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' x86 '&' cmd.exe //C '..\nmake-dll.bat' X86 '&' cmd.exe //c '..\nmake-lib.bat' X86

- name: "Windows nmake 64bit"
os: windows
language: shell
script:
- mkdir build
- cd build
- cmd.exe //C 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' amd64 '&' cmd.exe //C '..\nmake-dll.bat' '&' cmd.exe //c '..\nmake-lib.bat'

7 changes: 0 additions & 7 deletions nmake-dll-x86.bat

This file was deleted.

36 changes: 35 additions & 1 deletion nmake-dll.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,41 @@
:: By Nguyen Anh Quynh, 2016

:: This generates .\llvm\bin\keystone.dll
:: Usage: nmake-dll.bat [x86 arm aarch64 m68k mips sparc], default build all.

@echo off

set flags="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON"

set allparams=

:loop
set str=%1
if "%str%"=="" (
goto end
)
set allparams=%allparams% %str%
shift /0
goto loop

:end
if "%allparams%"=="" (
goto eof
)
:: remove left, right blank
:intercept_left
if "%allparams:~0,1%"==" " set "allparams=%allparams:~1%" & goto intercept_left

:intercept_right
if "%allparams:~-1%"==" " set "allparams=%allparams:~0,-1%" & goto intercept_right

:eof

if "%allparams%"=="" (
cmake "%flags%" -DLLVM_TARGETS_TO_BUILD="all" -G "NMake Makefiles" ..
) else (
cmake "%flags%" "-DLLVM_TARGETS_TO_BUILD=%allparams%" -G "NMake Makefiles" ..
)

cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DLLVM_TARGETS_TO_BUILD="all" -G "NMake Makefiles" ..
nmake

36 changes: 35 additions & 1 deletion nmake-lib.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,41 @@
:: By Nguyen Anh Quynh, 2016

:: This generates .\llvm\lib\keystone.lib
:: Usage: nmake-dll.bat [x86 arm aarch64 m68k mips sparc], default build all.

@echo off

set flags="-DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF"

set allparams=

:loop
set str=%1
if "%str%"=="" (
goto end
)
set allparams=%allparams% %str%
shift /0
goto loop

:end
if "%allparams%"=="" (
goto eof
)
:: remove left, right blank
:intercept_left
if "%allparams:~0,1%"==" " set "allparams=%allparams:~1%" & goto intercept_left

:intercept_right
if "%allparams:~-1%"==" " set "allparams=%allparams:~0,-1%" & goto intercept_right

:eof

if "%allparams%"=="" (
cmake "%flags%" -DLLVM_TARGETS_TO_BUILD="all" -G "NMake Makefiles" ..
) else (
cmake "%flags%" "-DLLVM_TARGETS_TO_BUILD=%allparams%" -G "NMake Makefiles" ..
)

cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DLLVM_TARGETS_TO_BUILD="all" -G "NMake Makefiles" ..
nmake

0 comments on commit 53239e1

Please sign in to comment.