summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild/ci/github_actions/ci.cmd42
1 files changed, 34 insertions, 8 deletions
diff --git a/build/ci/github_actions/ci.cmd b/build/ci/github_actions/ci.cmd
index 9c80951b..d5e625ef 100755
--- a/build/ci/github_actions/ci.cmd
+++ b/build/ci/github_actions/ci.cmd
@@ -1,5 +1,6 @@
@ECHO OFF
SET ZLIB_VERSION=1.2.11
+SET BZIP2_VERSION=b7a672291188a6469f71dd13ad14f2f9a7344fc8
IF NOT "%BE%"=="mingw-gcc" (
IF NOT "%BE%"=="msvc" (
ECHO Environment variable BE must be mingw-gcc or msvc
@@ -7,6 +8,11 @@ IF NOT "%BE%"=="mingw-gcc" (
)
)
+SET ORIGPATH=%PATH%
+IF "%BE%"=="mingw-gcc" (
+ SET MINGWPATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+)
+
IF "%1"=="deplibs" (
IF NOT EXIST build_ci\libs (
MKDIR build_ci\libs
@@ -18,9 +24,15 @@ IF "%1"=="deplibs" (
IF NOT EXIST zlib-%ZLIB_VERSION% (
tar -x -z -f zlib-%ZLIB_VERSION%.tar.gz
)
+ IF NOT EXIST bzip2-%BZIP2_VERSION%.zip (
+ curl -L -o bzip2-%BZIP2_VERSION%.zip https://gitlab.com/federicomenaquintero/bzip2/-/archive/%BZIP2_VERSION%/bzip2-%BZIP2_VERSION%.zip
+ )
+ IF NOT EXIST bzip2-%BZIP2_VERSION% (
+ tar -x -z -f bzip2-%BZIP2_VERSION%.zip
+ )
CD zlib-%ZLIB_VERSION%
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+ SET PATH=%MINGWPATH%
cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" . || EXIT /b 1
mingw32-make || EXIT /b 1
mingw32-make test || EXIT /b 1
@@ -31,20 +43,35 @@ IF "%1"=="deplibs" (
cmake --build . --target RUN_TESTS --config Release || EXIT /b 1
cmake --build . --target INSTALL --config Release || EXIT /b 1
)
+ CD ..
+ CD bzip2-%BZIP2_VERSION%
+ IF "%BE%"=="mingw-gcc" (
+ SET PATH=%MINGWPATH%
+ cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" -D ENABLE_LIB_ONLY=ON -D ENABLE_SHARED_LIB=OFF -D ENABLE_STATIC_LIB=ON . || EXIT /b 1
+ mingw32-make || EXIT /b 1
+ REM mingw32-make test || EXIT /b 1
+ mingw32-make install || EXIT /b 1
+ ) ELSE IF "%BE%"=="msvc" (
+ cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" -D ENABLE_LIB_ONLY=ON -D ENABLE_SHARED_LIB=OFF -D ENABLE_STATIC_LIB=ON . || EXIT /b 1
+ cmake --build . --target ALL_BUILD --config Release || EXIT /b 1
+ REM cmake --build . --target RUN_TESTS --config Release || EXIT /b 1
+ cmake --build . --target INSTALL --config Release || EXIT /b 1
+ )
+ CD ..
) ELSE IF "%1%"=="configure" (
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+ SET PATH=%MINGWPATH%
MKDIR build_ci\cmake
CD build_ci\cmake
- cmake -G "MinGW Makefiles" ..\.. || EXIT /b 1
+ cmake -G "MinGW Makefiles" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/libzlibstatic.a" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/libbz2.a" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" ..\.. || EXIT /b 1
) ELSE IF "%BE%"=="msvc" (
MKDIR build_ci\cmake
CD build_ci\cmake
- cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" ..\.. || EXIT /b 1
+ cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" -D ZLIB_LIBRARY="C:/Program Files (x86)/zlib/lib/zlibstatic.lib" -D ZLIB_INCLUDE_DIR="C:/Program Files (x86)/zlib/include" -D BZIP2_LIBRARIES="C:/Program Files (x86)/bzip2/lib/bz2.lib" -D BZIP2_INCLUDE_DIR="C:/Program Files (x86)/bzip2/include" ..\.. || EXIT /b 1
)
) ELSE IF "%1%"=="build" (
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+ SET PATH=%MINGWPATH%
CD build_ci\cmake
mingw32-make VERBOSE=1 || EXIT /b 1
) ELSE IF "%BE%"=="msvc" (
@@ -53,8 +80,7 @@ IF "%1"=="deplibs" (
)
) ELSE IF "%1%"=="test" (
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
- COPY "C:\Program Files (x86)\zlib\bin\libzlib.dll" build_ci\cmake\bin\
+ SET PATH=%MINGWPATH%
CD build_ci\cmake
SET SKIP_TEST_SPARSE=1
mingw32-make test VERBOSE=1 || EXIT /b 1
@@ -66,7 +92,7 @@ IF "%1"=="deplibs" (
)
) ELSE IF "%1%"=="install" (
IF "%BE%"=="mingw-gcc" (
- SET PATH=C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
+ SET PATH=%MINGWPATH%
CD build_ci\cmake
mingw32-make install DESTDIR=%cd%\destdir || EXIT /b 1
) ELSE IF "%BE%"=="msvc" (