diff options
author | Martin Matuska <martin@matuska.org> | 2019-04-07 11:10:56 +0200 |
---|---|---|
committer | Martin Matuska <martin@matuska.org> | 2019-04-08 18:45:03 +0200 |
commit | b9d2dd513c61f4ce71e5d26c1788add341fd7480 (patch) | |
tree | 7acbc74485ec323b80ee0fedd8d6a3b57fbfd749 | |
parent | 586ef094ef1cb8ef97169c5e94fb19b65cb0827e (diff) | |
download | libarchive-b9d2dd513c61f4ce71e5d26c1788add341fd7480.tar.gz |
Multiple Windows-related CI changes
Add MSVC and Cygwin builds with Cirrus CI (no tests yet)
Remove Travis CI build
TODO: failing UTF8 tests with MSVC still need fixing
-rw-r--r-- | .cirrus.yml | 54 | ||||
-rw-r--r-- | .travis.yml | 9 | ||||
-rwxr-xr-x | build/ci/cirrus_ci.cmd | 109 |
3 files changed, 123 insertions, 49 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index bfb20d6e..4906508d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -30,50 +30,24 @@ main_task: - ./build/ci/build.sh -a test - ./build/ci/cirrus_ci.sh test -Windows_Cygwin_task: - windows_container: - image: cirrusci/windowsservercore:2019 - os_version: 2019 - prepare_script: - - choco install -y --no-progress cygwin - - C:\tools\cygwin\cygwinsetup.exe -q -P make,autoconf,automake,cmake,gcc-core,binutils,libtool,pkg-config,bison,sharutils,zlib-devel,libbz2-devel,liblzma-devel,liblz4-devel,libiconv-devel,libxml2-devel,libzstd-devel,libssl-devel - configure_script: - - set BS=cmake - - C:\tools\cygwin\bin\bash.exe --login -c "cd '%cd%'; ./build/ci/build.sh -a configure" - build_script: - - set BS=cmake - - C:\tools\cygwin\bin\bash.exe --login -c "cd '%cd%'; ./build/ci/build.sh -a build" - -Windows_MinGW_task: +Windows_task: windows_container: image: cirrusci/windowsservercore:2019 os_version: 2019 + matrix: + env: + BE: mingw-gcc + env: + BE: cygwin-gcc + env: + BE: msvc prepare_script: - - choco install -y --no-progress mingw - - choco install -y --no-progress --installargs 'ADD_CMAKE_TO_PATH=User' cmake - - refreshenv - - mkdir build_ci\mingw - zlib_script: - - refreshenv - - mkdir build_ci\libs - - cd build_ci\libs - - curl -o zlib-1.2.11.tar.gz "https://www.zlib.net/zlib-1.2.11.tar.gz" - - tar -x -z -f zlib-1.2.11.tar.gz - - cd zlib-1.2.11 - - cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" . - - mingw32-make - - mingw32-make install + - build\ci\cirrus_ci.cmd prepare + deplibs_script: + - build\ci\cirrus_ci.cmd deplibs configure_script: - - refreshenv - - cd build_ci\mingw - - cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" ..\.. + - build\ci\cirrus_ci.cmd configure build_script: - - refreshenv - - cd build_ci\mingw - - mingw32-make + - build\ci\cirrus_ci.cmd build test_script: - - refreshenv - - copy build_ci\libs\zlib-1.2.11\libzlib.dll build_ci\mingw\bin\ - - cd build_ci\mingw - - set SKIP_TEST_SPARSE=1 - - mingw32-make test + - build\ci\cirrus_ci.cmd test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 12ed598f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: C -matrix: - include: - - os: windows - env: BS=msbuild - - os: windows - env: BS=mingw -script: - - build/ci/travis_ci.sh diff --git a/build/ci/cirrus_ci.cmd b/build/ci/cirrus_ci.cmd new file mode 100755 index 00000000..429fbc2f --- /dev/null +++ b/build/ci/cirrus_ci.cmd @@ -0,0 +1,109 @@ +@ECHO OFF +SET ZLIB_VERSION=1.2.11 +IF NOT "%BE%"=="cygwin-gcc" ( + IF NOT "%BE%"=="mingw-gcc" ( + IF NOT "%BE%"=="msvc" ( + ECHO Environment variable BE must be cygwin-gcc, mingw-gcc or msvc + EXIT /b 1 + ) + ) +) + +IF "%1%"=="prepare" ( + IF "%BE%"=="cygwin-gcc" ( + @ECHO ON + choco install -y --no-progress cygwin || EXIT /b 1 + C:\tools\cygwin\cygwinsetup.exe -q -P make,autoconf,automake,cmake,gcc-core,binutils,libtool,pkg-config,bison,sharutils,zlib-devel,libbz2-devel,liblzma-devel,liblz4-devel,libiconv-devel,libxml2-devel,libzstd-devel,libssl-devel || EXIT /b 1 + @EXIT /b 0 + ) ELSE IF "%BE%"=="mingw-gcc" ( + @ECHO ON + choco install -y --no-progress mingw || EXIT /b 1 + choco install -y --no-progress --installargs 'ADD_CMAKE_TO_PATH=User' cmake || EXIT /b 1 + MKDIR build_ci\cmake || EXIT /b 1 + @EXIT /b 0 + ) ELSE IF "%BE%"=="msvc" ( + @ECHO ON + choco install -y --no-progress visualstudio2017community || EXIT /b 1 + choco install -y --no-progress visualstudio2017-workload-vctools || EXIT /b 1 + choco install -y --no-progress --installargs 'ADD_CMAKE_TO_PATH=User' cmake || EXIT /b 1 + MKDIR build_ci\cmake || EXIT /b 1 + ) +) ELSE IF "%1"=="deplibs" ( + IF "%BE%"=="cygwin-gcc" ( + ECHO Skipping on this platform + EXIT /b 0 + ) + REFRESHENV + IF NOT EXIST build_ci\libs ( + MKDIR build_ci\libs + ) + CD build_ci\libs + IF NOT EXIST zlib-%ZLIB_VERSION%.tar.gz ( + curl -o zlib-%ZLIB_VERSION%.tar.gz https://www.zlib.net/zlib-%ZLIB_VERSION%.tar.gz + ) + IF NOT EXIST zlib-%ZLIB_VERSION% ( + tar -x -z -f zlib-%ZLIB_VERSION%.tar.gz + ) + CD zlib-%ZLIB_VERSION% + IF "%BE%"=="mingw-gcc" ( + cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" . || EXIT /b 1 + mingw32-make || EXIT /b 1 + mingw32-make test || EXIT /b 1 + mingw32-make install || EXIT /b 1 + ) ELSE IF "%BE%"=="msvc" ( + cmake -G "Visual Studio 15 2017" . || EXIT /b 1 + cmake --build . --target ALL_BUILD --config Release || EXIT /b 1 + cmake --build . --target RUN_TESTS --config Release || EXIT /b 1 + cmake --build . --target INSTALL --config Release || EXIT /b 1 + ) +) ELSE IF "%1%"=="configure" ( + IF "%BE%"=="cygwin-gcc" ( + SET BS=cmake + SET CONFIGURE_ARGS=-DENABLE_ACL=OFF + C:\tools\cygwin\bin\bash.exe --login -c "cd '%cd%'; ./build/ci/build.sh -a configure" || EXIT /b 1 + ) ELSE IF "%BE%"=="mingw-gcc" ( + REFRESHENV + CD build_ci\cmake + cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" ..\.. || EXIT /b 1 + ) ELSE IF "%BE%"=="msvc" ( + REFRESHENV + CD build_ci\cmake + cmake -G "Visual Studio 15 2017" -D CMAKE_BUILD_TYPE="Release" ..\.. || EXIT /b 1 + ) +) ELSE IF "%1%"=="build" ( + IF "%BE%"=="cygwin-gcc" ( + SET BS=cmake + C:\tools\cygwin\bin\bash.exe --login -c "cd '%cd%'; ./build/ci/build.sh -a build" + ) ELSE IF "%BE%"=="mingw-gcc" ( + REFRESHENV + CD build_ci\cmake + mingw32-make || EXIT /b 1 + ) ELSE IF "%BE%"=="msvc" ( + REFRESHENV + CD build_ci\cmake + cmake --build . --target ALL_BUILD --config Release + ) +) ELSE IF "%1%"=="test" ( + IF "%BE%"=="cygwin-gcc" ( + ECHO "Skipping tests on this platform" + EXIT /b 0 + REM SET BS=cmake + REM SET SKIP_TEST_SPARSE=1 + REM C:\tools\cygwin\bin\bash.exe --login -c "cd '%cd%'; ./build/ci/build.sh -a test" + ) ELSE IF "%BE%"=="mingw-gcc" ( + REFRESHENV + COPY build_ci\libs\zlib-1.2.11\libzlib.dll build_ci\cmake\bin\ + CD build_ci\cmake + SET SKIP_TEST_SPARSE=1 + mingw32-make test + ) ELSE IF "%BE%"=="msvc" ( + ECHO "Skipping tests on this platform" + EXIT /b 0 + REM CD build_ci\cmake + REM cmake --build . --target RUN_TESTS --config Release + ) +) ELSE ( + ECHO "Usage: %0% prepare|deplibs|configure|build|test" + @EXIT /b 0 +) +@EXIT /b 0 |