Enable cmake build in CI
This commit is contained in:
parent
2981eda00d
commit
72aefd2207
2 changed files with 20 additions and 0 deletions
15
.travis.yml
15
.travis.yml
|
|
@ -5,10 +5,18 @@ matrix:
|
|||
os: linux
|
||||
env: SWIGLANG=
|
||||
dist: xenial
|
||||
- compiler: clang
|
||||
os: linux
|
||||
env: SWIGLANG= BUILDSYSTEM=cmake
|
||||
dist: xenial
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG=
|
||||
dist: xenial
|
||||
- compiler: gcc
|
||||
os: linux
|
||||
env: SWIGLANG= BUILDSYSTEM=cmake
|
||||
dist: xenial
|
||||
- os: linux
|
||||
env: SWIGLANG= GCC=4.4
|
||||
dist: xenial
|
||||
|
|
@ -342,6 +350,12 @@ matrix:
|
|||
os: osx
|
||||
osx_image: xcode12.2
|
||||
env: SWIGLANG=
|
||||
- compiler: gcc
|
||||
os: osx
|
||||
env: SWIGLANG= BUILDSYSTEM=cmake
|
||||
- compiler: clang
|
||||
os: osx
|
||||
env: SWIGLANG= BUILDSYSTEM=cmake
|
||||
- compiler: clang
|
||||
os: osx
|
||||
osx_image: xcode12.2
|
||||
|
|
@ -439,6 +453,7 @@ install:
|
|||
- if test "$TRAVIS_OS_NAME" = "osx"; then source Tools/travis-osx-install.sh; fi
|
||||
- ls -la $(which $CC) $(which $CXX) && $CC --version && $CXX --version
|
||||
script:
|
||||
- if test "$BUILDSYSTEM" = "cmake"; then mkdir -p build/build && cd build/build && cmake -DCMAKE_INSTALL_PREFIX=~/.local ../.. && make install && ctest --output-on-failure -V && exit 0; fi
|
||||
- echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
|
||||
- if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++11 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++11; fi
|
||||
- if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++14 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++14; fi
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ environment:
|
|||
# WITHLANG: python
|
||||
# VER: 37
|
||||
# PY3: 3
|
||||
- BUILDSYSTEM: cmake
|
||||
VSVER: 14
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
|
|
@ -51,6 +53,7 @@ install:
|
|||
$env:MINGWBIN="C:\msys64\mingw32\bin"
|
||||
$env:MBITS="32"
|
||||
$env:MARCH="i686"
|
||||
$env:VSARCH=""
|
||||
} else {
|
||||
$env:PCRE_PLATFORM="x64"
|
||||
$env:JAVA_HOME="C:/Program Files/Java/jdk1.8.0"
|
||||
|
|
@ -62,6 +65,7 @@ install:
|
|||
$env:MINGWBIN="C:\msys64\mingw64\bin"
|
||||
$env:MBITS="64"
|
||||
$env:MARCH="x86_64"
|
||||
$env:VSARCH=" Win64"
|
||||
}
|
||||
- ps: >-
|
||||
if (!$env:OSVARIANT) {
|
||||
|
|
@ -114,6 +118,7 @@ build_script:
|
|||
- set CCCL_OPTIONS=--cccl-muffle /W3 /EHsc
|
||||
- set CHECK_OPTIONS=CSHARPOPTIONS=-platform:%Platform%
|
||||
# Open dummy file descriptor to fix error on cygwin: ./configure: line 560: 0: Bad file descriptor
|
||||
- if "%BUILDSYSTEM%"=="cmake" cmake -G "Visual Studio 14 2015%VSARCH%" -DCMAKE_INSTALL_PREFIX="%CD:\=/%/install2" -DCMAKE_C_FLAGS="/DPCRE_STATIC" -DPCRE_INCLUDE_DIR=%PCRE_ROOT%/include -DPCRE_LIBRARY=%PCRE_ROOT%/lib/v110/%PCRE_PLATFORM%/Release/static/utf8/pcre8.lib -DBISON_EXECUTABLE=C:/cygwin/bin/bison.exe . && cmake --build . --config Release --target install && ctest --output-on-failure -V -C Release && appveyor exit
|
||||
- if "%OSVARIANT%"=="" bash -c "exec 0</dev/null && ./autogen.sh && time ./configure --disable-dependency-tracking --disable-ccache CC=$CC CXX=$CXX CFLAGS='-O2' CXXFLAGS='-O2' LDFLAGS='--cccl-link /LTCG' PCRE_CFLAGS='-I%PCRE_ROOT%/include -DPCRE_STATIC' PCRE_LIBS='-L%PCRE_ROOT%/lib/v110/%PCRE_PLATFORM%/Release/static/utf8 -lpcre8' --without-perl5 --without-go --with-boost=C:/Libraries/boost_1_67_0 || cat config.log"
|
||||
- if not "%OSVARIANT%"=="" bash -c "exec 0</dev/null && ./autogen.sh && time ./configure CC=%CC% CXX=%CXX% --without-alllang --with-$SWIGLANG$PY3$SWIGWITHLANG --enable-cpp11-testing || cat config.log"
|
||||
- bash -c "time make -s -j%MAKEJOBS%"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue