Multiple jobs for appveyor and deploy (#62)

* Multiple jobs for appveyor and deploy
This commit is contained in:
xarkes 2017-10-15 22:53:09 +02:00 committed by GitHub
parent e3e070d094
commit e4214e89e2
2 changed files with 49 additions and 41 deletions

View File

@ -20,32 +20,34 @@ environment:
QT32PATH: 'C:\Qt\5.9.1\msvc2015' QT32PATH: 'C:\Qt\5.9.1\msvc2015'
QT64PATH: 'C:\Qt\5.9.1\msvc2015_64' QT64PATH: 'C:\Qt\5.9.1\msvc2015_64'
VSVARSALLPATH: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat' VSVARSALLPATH: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat'
matrix:
- BITS: 32
- BITS: 64
before_build: before_build:
- cmd: prepare_r2.bat - cmd: prepare_r2.bat
# Build config # Build config
build_script: build_script:
- cmd: build.bat 32 - cmd: build.bat %BITS%
- cmd: build.bat 64
# Tests # Tests
test: off test: off
# Artifacts # Artifacts
artifacts: artifacts:
- path: build32\cutter32 - path: build%BITS%\cutter%BITS%
- path: build64\cutter64 name: Cutter
#deploy: deploy:
# release: cutter-1.0-$(appveyor_build_version) release: cutter-1.0-$(appveyor_build_version)
# description: 'Cutter Windows' description: 'Cutter Windows'
# provider: GitHub provider: GitHub
# auth_token: auth_token:
# secure: 2SmsqS2RaX2N5c9UwUcfBwNmMX64FfPAZFShLyxIkZXiC8vLaYCHToWxBYEuWRSk secure: 2SmsqS2RaX2N5c9UwUcfBwNmMX64FfPAZFShLyxIkZXiC8vLaYCHToWxBYEuWRSk
# artifact: Cutter artifact: Cutter
# draft: true draft: true
# prerelease: true prerelease: true
# on: on:
# branch: master branch: master
# appveyor_repo_tag: false appveyor_repo_tag: false

View File

@ -14,41 +14,47 @@ echo Downloading meson and ninja
python -m pip install meson && COPY %PYTHON%\Scripts\meson.py meson.py python -m pip install meson && COPY %PYTHON%\Scripts\meson.py meson.py
if defined NINJA_URL ( powershell -Command wget %NINJA_URL% -OutFile ninja.zip && unzip -o ninja.zip -d .\ && del ninja.zip ) if defined NINJA_URL ( powershell -Command wget %NINJA_URL% -OutFile ninja.zip && unzip -o ninja.zip -d .\ && del ninja.zip )
IF NOT "%BITS%"=="32" (
set VARSALL=x64
set BI=64
call :BUILD
)
IF NOT "%BITS%"=="64" (
set VARSALL=x86
set BI=32
call :BUILD
)
GOTO :END
:BUILD
echo Building radare2 (%VARSALL%)
cd radare2 cd radare2
echo Building radare2 (x86)
git clean -xfd git clean -xfd
copy ..\ninja.exe .\ copy ..\ninja.exe .\
copy ..\meson.py .\ copy ..\meson.py .\
rmdir /s /q ..\dist32 rmdir /s /q ..\dist%BI%
call "%VSVARSALLPATH%" x86 call "%VSVARSALLPATH%" %VARSALL%
call meson.bat --release --shared call meson.bat --release --shared
if not %ERRORLEVEL%==0 exit if not %ERRORLEVEL%==0 exit
call sys\meson_install.bat --with-static ..\dist32 call sys\meson_install.bat --with-static ..\dist%BI%
copy /Y build\r_userconf.h ..\dist32\include\libr\ copy /Y build\r_userconf.h ..\dist%BI%\include\libr\
copy /Y build\r_version.h ..\dist32\include\libr\ copy /Y build\r_version.h ..\dist%BI%\include\libr\
copy /Y build\shlr\liblibr2sdb.a ..\dist32\r_sdb.lib copy /Y build\shlr\liblibr2sdb.a ..\dist%BI%\r_sdb.lib
echo Building radare2 (x64)
git clean -xfd
copy ..\ninja.exe .\
copy ..\meson.py .\
rmdir /s /q ..\dist64
call "%VSVARSALLPATH%" x64
call meson.bat --release --shared
if not %ERRORLEVEL%==0 exit
call sys\meson_install.bat --with-static ..\dist64
copy /Y build\shlr\liblibr2sdb.a ..\dist64\r_sdb.lib
cd .. cd ..
copy /Y dist%BI%\*.lib cutter_win32\radare2\lib%BI%\
EXIT /B 0
:END
echo Copying relevant files in cutter_win32 echo Copying relevant files in cutter_win32
xcopy /s /Y dist32\include\libr cutter_win32\radare2\include\libr\ IF "%BITS%"=="64" (
copy /Y dist32\*.lib cutter_win32\radare2\lib32\ xcopy /s /Y dist64\include\libr cutter_win32\radare2\include\libr\
copy /Y dist64\*.lib cutter_win32\radare2\lib64\ ) ELSE (
xcopy /s /Y dist32\include\libr cutter_win32\radare2\include\libr\
)
del ninja.exe del ninja.exe
del meson.py del meson.py
set PATH=%OLDPATH% set PATH=%OLDPATH%
set OLDPATH= set OLDPATH=