forked from madler/zlib
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add continuous integration support for GitHub
pull requests through Travis CI and Appveyor. Fix cygwin build issues. This fixes madler#162
- Loading branch information
James E. King, III
committed
Nov 23, 2017
1 parent
cacf7f1
commit eef6ba6
Showing
9 changed files
with
227 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,5 @@ | |
/configure.log | ||
|
||
.DS_Store | ||
|
||
.vs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
sudo: false | ||
dist: trusty | ||
language: c | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
script: | ||
- ci/build.sh | ||
|
||
compiler: | ||
# - clang | ||
- gcc | ||
|
||
os: | ||
- linux | ||
# - osx | ||
|
||
env: | ||
- CMAKE_BUILD_TYPE=Debug | ||
- CMAKE_BUILD_TYPE=RelWithDebInfo | ||
- CMAKE_BUILD_TYPE=Release | ||
- CONFIGURE= | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
compiler: clang | ||
env: | ||
- CMAKE_BUILD_TYPE=debug | ||
- CTEST_DASHBOARD=ExperimentalMemCheck | ||
addons: | ||
apt: | ||
packages: | ||
- valgrind | ||
- os: linux | ||
compiler: gcc | ||
env: | ||
- COMMENT=UBSAN | ||
- CMAKE_BUILD_TYPE=debug | ||
- CMAKE_C_COMPILER=gcc-7 | ||
- CFLAGS='-fno-omit-frame-pointer -fsanitize=undefined' | ||
- LDFLAGS='-fsanitize=undefined' | ||
addons: | ||
apt: | ||
packages: | ||
- g++-7 | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
|
||
notifications: | ||
email: | ||
false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
version: 0.0.{build}-{branch} | ||
|
||
shallow_clone: true | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
matrix: | ||
allow_failures: | ||
- MAYFAIL: true | ||
|
||
environment: | ||
global: | ||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 | ||
CMAKE_BUILD_TYPE: Release | ||
|
||
matrix: | ||
# MinGW | ||
- ADDPATH: C:\mingw\bin; | ||
GENERATOR: MinGW Makefiles | ||
|
||
# MinGW-w64 | ||
- ADDPATH: C:\mingw64\bin; | ||
GENERATOR: MinGW Makefiles | ||
|
||
- GENERATOR: Visual Studio 10 2010 | ||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 | ||
|
||
# - GENERATOR: Visual Studio 11 2012 | ||
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 | ||
|
||
# - GENERATOR: Visual Studio 12 2013 | ||
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 | ||
|
||
- GENERATOR: Visual Studio 14 2015 Win64 | ||
|
||
- GENERATOR: Visual Studio 14 2015 Win64 | ||
CMAKE_BUILD_TYPE: RelWithDebInfo | ||
|
||
- GENERATOR: Visual Studio 14 2015 Win64 | ||
CMAKE_BUILD_TYPE: Debug | ||
|
||
# - GENERATOR: Visual Studio 15 2017 Win64 | ||
|
||
# Cygwin | ||
- ADDPATH: C:\cygwin\bin; | ||
MAYFAIL: true | ||
WHYFAIL: https://github.com/madler/zlib/issues/268 | ||
WRAPPER: cygwin | ||
|
||
# Cygwin64 | ||
- ADDPATH: C:\cygwin64\bin; | ||
MAYFAIL: true | ||
WHYFAIL: https://github.com/madler/zlib/issues/268 | ||
WRAPPER: cygwin64 | ||
|
||
# MSYS2 | ||
- ADDPATH: C:\msys64\usr\bin; | ||
GENERATOR: MSYS Makefiles | ||
MAYFAIL: true | ||
WHYFAIL: https://github.com/madler/zlib/issues/268 | ||
|
||
install: | ||
- ci\build.bat | ||
|
||
# Not a .NET project - we build in the install phase | ||
build: false | ||
|
||
test_script: | ||
- ci\test.bat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
:: | ||
:: Environment Variables | ||
:: | ||
:: CMAKE_BUILD_TYPE sets the build configuration | ||
:: | ||
|
||
@ECHO ON | ||
SETLOCAL EnableDelayedExpansion | ||
|
||
SET BUILDDIR=C:\TEMP\BUILD | ||
SET INSTDIR=C:\TEMP\INSTALL | ||
SET SRCDIR=%CD% | ||
|
||
SET PATH=%ADDPATH%%PATH% | ||
|
||
MKDIR %BUILDDIR% | ||
CD %BUILDDIR% | ||
|
||
IF DEFINED GENERATOR (SET DASHG=-G"%GENERATOR%") | ||
|
||
IF "%WRAPPER%" == "cygwin" ( | ||
c:\cygwin\setup-x86.exe -B -q -n -N -d -l C:/cygwin/var/cache/setup -R c:\cygwin -s http://cygwin.mirror.constant.com -P cmake make | ||
For /F "Tokens=1" %%I in (C:\cygwin\bin\cygpath -u "%SRCDIR%") Do Set UNIXSRCDIR=%%I | ||
For /F "Tokens=1" %%I in (C:\cygwin\bin\cygpath -u "%INSTDIR%") Do Set UNIXINSTDIR=%%I | ||
bash.exe -c "cmake --version && cmake !UNIXSRCDIR! %DASHG% -DCMAKE_INSTALL_PREFIX=!UNIXINSTDIR! && cmake --build . --target install --config %CMAKE_BUILD_TYPE%" || EXIT /B | ||
) ELSE IF "%WRAPPER%" == "cygwin64" ( | ||
c:\cygwin64\setup-x86_64.exe -B -q -n -N -d -l C:/cygwin64/var/cache/setup -R c:\cygwin64 -s http://cygwin.mirror.constant.com -P cmake make | ||
For /F "Tokens=1" %%I in (C:\cygwin64\bin\cygpath -u "%SRCDIR%") Do Set UNIXSRCDIR=%%I | ||
For /F "Tokens=1" %%I in (C:\cygwin64\bin\cygpath -u "%INSTDIR%") Do Set UNIXINSTDIR=%%I | ||
bash.exe -c "cmake --version && cmake !UNIXSRCDIR! %DASHG% -DCMAKE_INSTALL_PREFIX=!UNIXINSTDIR! && cmake --build . --target install --config %CMAKE_BUILD_TYPE%" || EXIT /B | ||
) ELSE ( | ||
cmake "%SRCDIR%" %DASHG% -DCMAKE_INSTALL_PREFIX=%INSTDIR% || EXIT /B | ||
cmake --build . --target install --config %CMAKE_BUILD_TYPE% || EXIT /B | ||
) | ||
|
||
DIR /S C:\TEMP\INSTALL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
# | ||
# Environment Variables | ||
# | ||
# CMAKE_BUILD_TYPE sets the cmake variable by that name (default if not set: use ./configure) | ||
# CMAKE_C_COMPILER sets the cmake variable by that name (default if not set: $CC) | ||
# CTEST_DASHBOARD sets the dashboard suite to run (default if not set: ExperimentalTest) | ||
# | ||
|
||
set -ex | ||
|
||
SRCDIR=`pwd` | ||
if [[ "${CTEST_BASHBOARD}" == "ExperimentalMemCheck" ]]; then | ||
RUNNER=valgrind | ||
fi | ||
mkdir /tmp/build | ||
cd /tmp/build | ||
|
||
if [[ ! -z "$CMAKE_BUILD_TYPE" ]]; then | ||
cmake $SRCDIR -DCMAKE_INSTALL_PREFIX=/tmp/install \ | ||
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \ | ||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER:-$CC} | ||
VERBOSE=1 cmake --build . --target install | ||
ctest -D ${CTEST_DASHBOARD:-ExperimentalTest} | ||
ls -lsR /tmp/install | ||
else | ||
$SRCDIR/configure $CONFIGURE --prefix=/tmp/install | ||
make -j2 install | ||
make test | ||
ls -lsR /tmp/install | ||
fi | ||
|
||
cp libz.a libz.a.orig | ||
$RUNNER ./minigzip64 -9 libz.a | ||
$RUNNER ./minigzip64 -d libz.a.gz | ||
cmp libz.a libz.a.orig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@ECHO ON | ||
SETLOCAL | ||
|
||
SET SRCDIR=%CD% | ||
SET PATH=%ADDPATH%%PATH% | ||
|
||
CD C:\TEMP\BUILD || EXIT /B | ||
ctest -D ExperimentalTest || EXIT /B | ||
|
||
CD %CMAKE_BUILD_TYPE% || EXIT /B | ||
COPY example.exe example.exe.orig || EXIT /B | ||
minigzip -3 example.exe || EXIT /B | ||
minigzip -9 example.exe.gz || EXIT /B | ||
minigzip -d example.exe.gz.gz || EXIT /B | ||
minigzip -d example.exe.gz || EXIT /B | ||
fc /B example.exe example.exe.orig > nul || EXIT /B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.