Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis-CI build & nmake batch file updates #464

Merged
merged 1 commit into from
Jun 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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