Travis-CI Migration (#1230)

* Travis-CI Migration

* allow_failures for osx
This commit is contained in:
chfl4gs 2020-04-21 00:47:08 +08:00 committed by GitHub
parent dc8e237ea2
commit 80f043f8d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 154 additions and 6 deletions

View File

@ -1,18 +1,27 @@
language: c
sudo: false
env:
- PATH=$PATH:/usr/local/opt/binutils/bin
script:
- make && make -C bindings/go && make -C bindings/go test && make test
- |
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
choco install cygwin cyg-get && \
cyg-get.bat default autoconf automake make gcc-core clang pkg-config libpcre-devel cmake python27-setuptools ruby wget && \
export SHELLOPTS && set -o igncr \
cmd.exe //C "C:\\tools\\cygwin\\bin\\bash.exe -lc 'cd /cygdrive/$TRAVIS_BUILD_DIR; make; ./install-cmocka-linux.sh; export PATH="$PATH":/cygdrive/$TRAVIS_BUILD_DIR:/cygdrive/$TRAVIS_BUILD_DIR/cmocka/src; make test'"
else
make && make -C bindings/go && make -C bindings/go test && make test
fi
compiler:
- clang
- gcc
os:
- linux
- osx
- windows
matrix:
fast_finish: true
include:
- name: 32bit
- name: "Linux 32bit"
os: linux
compiler: gcc
env: CFLAGS="-m32" LDFLAGS="-m32" LDFLAGS_STATIC="-m32" UNICORN_QEMU_FLAGS="--cpu=i386"
@ -27,10 +36,148 @@ matrix:
- libc6-dev-i386
- gcc-multilib
- libcmocka-dev:i386
- if: branch = master
name: brew HEAD
- name: "MacOSX brew"
os: osx
script: brew install --HEAD unicorn && brew test unicorn
osx_image: xcode10.1
python: 3.7
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 install --HEAD unicorn
- brew test unicorn
- 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.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.bat'
- name: "Windows MSVC 32bit"
os: windows
language: shell
env:
- MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
script:
- PATH=$MSBUILD_PATH:$PATH
- cmd.exe //C 'msbuild.exe msvc/unicorn.sln /m:2 /nologo /p:Configuration=Release /p:Platform=Win32'
- name: "Windows MSVC 64bit"
os: windows
language: shell
env:
- MSBUILD_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
script:
- PATH=$MSBUILD_PATH:$PATH
- cmd.exe //C 'msbuild.exe msvc/unicorn.sln /m:2 /nologo /p:Configuration=Release /p:Platform=x64'
- name: "Windows MSYS2/MinGW32"
os: windows
language: shell
env:
- PATH=/C/tools/msys64/mingw32/bin:$PATH
before_install:
- |
if [[ ! -f /C/tools/msys64/msys2_shell.cmd ]]; then
rm -rf /C/tools/msys64
fi
- choco uninstall -y mingw
- choco upgrade --no-progress -y msys2
- export msys2='cmd //C RefreshEnv.cmd '
- export msys2+='& set MSYS=winsymlinks:nativestrict '
- export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
- export shell="$msys2 -mingw32 -full-path -here -c \$\* --"
- export msys2+=" -msys2 -c \$\* --"
- $msys2 pacman --sync --noconfirm --needed \
autoconf \
automake \
make \
perl \
python \
mingw-w64-i686-libtool \
mingw-w64-i686-toolchain \
mingw-w64-i686-gcc \
mingw-w64-i686-cmake \
mingw-w64-i686-cmocka \
mingw-w64-i686-python3-setuptools \
unzip
- export CPPFLAGS=-D__USE_MINGW_ANSI_STDIO=1
- export CC=i686-w64-mingw32-gcc
- export AR=gcc-ar
- export RANLIB=gcc-ranlib
- export CFLAGS="-m32"
- export LDFLAGS="-m32"
- export LDFLAGS_STATIC="-m32"
- export UNICORN_QEMU_FLAGS="--cpu=i386"
before_cache:
- $msys2 pacman --sync --clean --noconfirm
cache:
directories:
- $HOME/AppData/Local/Temp/chocolatey
- /C/tools/msys64
script:
- $shell make; cp unicorn.dll /C/Windows/SysWOW64/; $shell make test
- name: "Windows MSYS2/MinGW64"
os: windows
language: shell
env:
- PATH=/C/tools/msys64/mingw64/bin:$PATH
before_install:
- |
if [[ ! -f /C/tools/msys64/msys2_shell.cmd ]]; then
rm -rf /C/tools/msys64
fi
- choco uninstall -y mingw
- choco upgrade --no-progress -y msys2
- export msys2='cmd //C RefreshEnv.cmd '
- export msys2+='& set MSYS=winsymlinks:nativestrict '
- export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
- export shell="$msys2 -mingw64 -full-path -here -c \$\* --"
- export msys2+=" -msys2 -c \$\* --"
- $msys2 pacman --sync --noconfirm --needed \
autoconf \
automake \
make \
perl \
python \
mingw-w64-x86_64-libtool \
mingw-w64-x86_64-toolchain \
mingw-w64-x86_64-cmake \
mingw-w64-x86_64-cmocka \
mingw-w64-x86_64-python3-setuptools
unzip
- export CPPFLAGS=-D__USE_MINGW_ANSI_STDIO=1
- export CC=x86_64-w64-mingw32-gcc
- export AR=gcc-ar
- export RANLIB=gcc-ranlib
before_cache:
- $msys2 pacman --sync --clean --noconfirm
cache:
directories:
- $HOME/AppData/Local/Temp/chocolatey
- /C/tools/msys64
script:
- $shell make; cp unicorn.dll /C/Windows/System32/; $shell make test
allow_failures:
- os: osx
addons:
apt:
packages:

View File

@ -71,3 +71,4 @@ Mohamed Osama: FreePascal/Delphi binding.
Philippe Antoine (Catena cyber): fuzzing
Huitao Chen (chenhuitao) & KaiJern Lau (xwings): Cmake support
Huitao Chen (chenhuitao) & KaiJern Lau (xwings): Python3 support for building
Kevin Foo (chfl4gs): Travis-CI migration