2017-09-18 11:05:47 +00:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
|
2015-08-11 11:15:03 +00:00
|
|
|
environment:
|
|
|
|
matrix:
|
2017-09-14 14:14:05 +00:00
|
|
|
- BUILD_SYSTEM: CMake
|
|
|
|
GENERATOR: Visual Studio 14 2015 Win64
|
2016-07-29 18:52:15 +00:00
|
|
|
|
2017-09-14 14:14:05 +00:00
|
|
|
- BUILD_SYSTEM: CMake
|
|
|
|
GENERATOR: Visual Studio 14 2015
|
2016-07-29 18:52:15 +00:00
|
|
|
|
2017-09-14 14:14:05 +00:00
|
|
|
- BUILD_SYSTEM: Python
|
|
|
|
PYTHON: "C:\\Python27"
|
|
|
|
PYTHON_VERSION: "2.7.x"
|
|
|
|
PYTHON_ARCH: "32"
|
2016-07-29 18:52:15 +00:00
|
|
|
|
2017-09-14 14:14:05 +00:00
|
|
|
- BUILD_SYSTEM: Python
|
|
|
|
PYTHON: "C:\\Python36-x64"
|
|
|
|
PYTHON_VERSION: "3.6.x"
|
|
|
|
PYTHON_ARCH: "64"
|
2016-07-29 18:52:15 +00:00
|
|
|
|
2017-09-14 14:14:05 +00:00
|
|
|
- BUILD_SYSTEM: make
|
|
|
|
ARCH: "i686"
|
2015-08-11 11:15:03 +00:00
|
|
|
|
2017-09-14 14:14:05 +00:00
|
|
|
- BUILD_SYSTEM: make
|
|
|
|
ARCH: "x86_64"
|
2015-10-07 08:18:01 +00:00
|
|
|
|
2017-10-11 20:26:37 +00:00
|
|
|
- BUILD_SYSTEM: bazel
|
|
|
|
|
2015-08-11 11:15:03 +00:00
|
|
|
install:
|
2017-09-14 14:14:05 +00:00
|
|
|
- IF "%BUILD_SYSTEM%"=="Python" (
|
|
|
|
SET "PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%" &&
|
|
|
|
pip install --disable-pip-version-check --user --upgrade pip &&
|
|
|
|
pip install --upgrade setuptools
|
|
|
|
)
|
|
|
|
- IF "%BUILD_SYSTEM%"=="make" (
|
|
|
|
IF "%ARCH%"=="i686" (
|
|
|
|
SET "TOOLCHAIN=i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32"
|
|
|
|
) ELSE (
|
|
|
|
SET "TOOLCHAIN=x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64"
|
|
|
|
)
|
|
|
|
)
|
2017-10-11 20:26:37 +00:00
|
|
|
- IF "%BUILD_SYSTEM%"=="bazel" (
|
|
|
|
appveyor DownloadFile https://github.com/bazelbuild/bazel/releases/download/0.6.1/bazel-0.6.1-windows-x86_64.exe -FileName bazel.exe
|
|
|
|
)
|
2015-08-11 11:15:03 +00:00
|
|
|
|
2016-07-29 18:52:15 +00:00
|
|
|
before_build:
|
2017-10-11 20:26:37 +00:00
|
|
|
- FOR /f %%i in ('C:\cygwin64\bin\date.exe +%%Y-%%m-%%d') DO SET "RELEASE_DATE=%%i"
|
2017-09-14 14:14:05 +00:00
|
|
|
- IF "%BUILD_SYSTEM%"=="CMake" ( mkdir builddir && cd builddir && cmake -G "%GENERATOR%" .. )
|
|
|
|
- IF "%BUILD_SYSTEM%"=="make" (
|
|
|
|
SET "CC=gcc" &&
|
|
|
|
SET "PATH=C:\mingw-w64\%TOOLCHAIN%\bin;%PATH%" &&
|
2017-10-11 20:26:37 +00:00
|
|
|
COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\%TOOLCHAIN%\bin\make.exe
|
2017-09-14 14:14:05 +00:00
|
|
|
)
|
2015-08-11 11:15:03 +00:00
|
|
|
|
2016-07-29 18:52:15 +00:00
|
|
|
build_script:
|
2017-09-14 14:14:05 +00:00
|
|
|
- IF "%BUILD_SYSTEM%"=="CMake" ( cmake --build . --config Debug )
|
|
|
|
- IF "%BUILD_SYSTEM%"=="Python" ( python setup.py build_ext )
|
|
|
|
- IF "%BUILD_SYSTEM%"=="make" (
|
|
|
|
sh -c "make brotli" &&
|
2017-09-18 11:05:47 +00:00
|
|
|
cd bin && 7z a -tzip -mx9 brotli-win-%ARCH%-%RELEASE_DATE%.zip brotli.exe &&
|
|
|
|
appveyor PushArtifact brotli-win-%ARCH%-%RELEASE_DATE%.zip && cd ..
|
2017-09-14 14:14:05 +00:00
|
|
|
)
|
2017-10-11 20:26:37 +00:00
|
|
|
- IF "%BUILD_SYSTEM%"=="bazel" (
|
|
|
|
bazel --batch build -c opt java/org/brotli/wrapper/...:all &&
|
|
|
|
python scripts/fix-win-bazel-build.py &&
|
|
|
|
cd bazel-bin && 7z a -tzip -mx9 brotli-win-bazel-jni-%RELEASE_DATE%.zip brotli_jni.dll &&
|
|
|
|
appveyor PushArtifact brotli-win-bazel-jni-%RELEASE_DATE%.zip && cd ..
|
|
|
|
)
|
2015-08-11 11:15:03 +00:00
|
|
|
|
|
|
|
test_script:
|
2017-09-14 14:14:05 +00:00
|
|
|
- IF "%BUILD_SYSTEM%"=="CMake" ( ctest --output-on-failure --interactive-debug-mode 0 -C Debug )
|
|
|
|
- IF "%BUILD_SYSTEM%"=="Python" ( python setup.py test )
|
|
|
|
- IF "%BUILD_SYSTEM%"=="make" ( sh -c "make test" )
|
2017-10-11 20:26:37 +00:00
|
|
|
- IF "%BUILD_SYSTEM%"=="bazel" ( bazel --batch test -c opt --test_output streamed java/org/brotli/wrapper/...:all )
|
2017-09-18 11:05:47 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
- provider: BinTray
|
|
|
|
on:
|
|
|
|
branch: master
|
|
|
|
username: eustas
|
|
|
|
api_key:
|
|
|
|
secure: B3rM8JYeIHIw6BfOjHggAeyTmxEf8ZDYmyF9gCwqyWaxyxECD9BuN50SiV2KE/RI
|
|
|
|
subject: eustas
|
|
|
|
repo: brotli
|
|
|
|
package: bin
|
|
|
|
version: snapshot
|
|
|
|
publish: true
|
|
|
|
override: true
|