aboutsummaryrefslogtreecommitdiffstats
path: root/build/ci/github_actions/ci.cmd
diff options
context:
space:
mode:
Diffstat (limited to 'build/ci/github_actions/ci.cmd')
-rwxr-xr-xbuild/ci/github_actions/ci.cmd38
1 files changed, 31 insertions, 7 deletions
diff --git a/build/ci/github_actions/ci.cmd b/build/ci/github_actions/ci.cmd
index 954d515c3b42..c3826ba08797 100755
--- a/build/ci/github_actions/ci.cmd
+++ b/build/ci/github_actions/ci.cmd
@@ -1,6 +1,7 @@
@ECHO OFF
SET ZLIB_VERSION=1.2.11
SET BZIP2_VERSION=b7a672291188a6469f71dd13ad14f2f9a7344fc8
+SET XZ_VERSION=292a5c0f9c9b3a66f5a5c652dc46381836d4537f
IF NOT "%BE%"=="mingw-gcc" (
IF NOT "%BE%"=="msvc" (
ECHO Environment variable BE must be mingw-gcc or msvc
@@ -19,16 +20,28 @@ IF "%1"=="deplibs" (
)
CD build_ci\libs
IF NOT EXIST zlib-%ZLIB_VERSION%.zip (
- curl -L -o zlib-%ZLIB_VERSION%.zip https://github.com/libarchive/zlib/archive/v%ZLIB_VERSION%.zip
+ ECHO Downloading https://github.com/libarchive/zlib/archive/v%ZLIB_VERSION%.zip
+ curl -L -o zlib-%ZLIB_VERSION%.zip https://github.com/libarchive/zlib/archive/v%ZLIB_VERSION%.zip || EXIT /b 1
)
IF NOT EXIST zlib-%ZLIB_VERSION% (
- tar -x -f zlib-%ZLIB_VERSION%.zip
+ ECHO Unpacking zlib-%ZLIB_VERSION%.zip
+ C:\windows\system32\tar.exe -x -f zlib-%ZLIB_VERSION%.zip || EXIT /b 1
)
IF NOT EXIST bzip2-%BZIP2_VERSION%.zip (
- curl -L -o bzip2-%BZIP2_VERSION%.zip https://github.com/libarchive/bzip2/archive/%BZIP2_VERSION%.zip
+ echo Downloading https://github.com/libarchive/bzip2/archive/%BZIP2_VERSION%.zip
+ curl -L -o bzip2-%BZIP2_VERSION%.zip https://github.com/libarchive/bzip2/archive/%BZIP2_VERSION%.zip || EXIT /b 1
)
IF NOT EXIST bzip2-%BZIP2_VERSION% (
- tar -x -f bzip2-%BZIP2_VERSION%.zip
+ echo Unpacking bzip2-%BZIP2_VERSION%.zip
+ C:\windows\system32\tar.exe -x -f bzip2-%BZIP2_VERSION%.zip || EXIT /b 1
+ )
+ IF NOT EXIST xz-%XZ_VERSION%.zip (
+ echo Downloading https://github.com/libarchive/xz/archive/%XZ_VERSION%.zip
+ curl -L -o xz-%XZ_VERSION%.zip https://github.com/libarchive/xz/archive/%XZ_VERSION%.zip || EXIT /b 1
+ )
+ IF NOT EXIST xz-%XZ_VERSION% (
+ echo Unpacking xz-%XZ_VERSION%.zip
+ C:\windows\system32\tar.exe -x -f xz-%XZ_VERSION%.zip || EXIT /b 1
)
CD zlib-%ZLIB_VERSION%
IF "%BE%"=="mingw-gcc" (
@@ -58,16 +71,27 @@ IF "%1"=="deplibs" (
cmake --build . --target INSTALL --config Release || EXIT /b 1
)
CD ..
+ CD xz-%XZ_VERSION%
+ IF "%BE%"=="mingw-gcc" (
+ SET PATH=%MINGWPATH%
+ cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" . || EXIT /b 1
+ mingw32-make || EXIT /b 1
+ mingw32-make install || EXIT /b 1
+ ) ELSE IF "%BE%"=="msvc" (
+ cmake -G "Visual Studio 16 2019" -D CMAKE_BUILD_TYPE="Release" . || EXIT /b 1
+ cmake --build . --target ALL_BUILD --config Release || EXIT /b 1
+ cmake --build . --target INSTALL --config Release || EXIT /b 1
+ )
) ELSE IF "%1%"=="configure" (
IF "%BE%"=="mingw-gcc" (
SET PATH=%MINGWPATH%
MKDIR build_ci\cmake
CD build_ci\cmake
- 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
+ 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" -D LIBLZMA_LIBRARY="C:/Program Files (x86)/xz/lib/liblzma.a" -D LIBLZMA_INCLUDE_DIR="C:/Program Files (x86)/xz/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" -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
+ 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" -D LIBLZMA_LIBRARY="C:/Program Files (x86)/xz/lib/liblzma.lib" -D LIBLZMA_INCLUDE_DIR="C:/Program Files (x86)/xz/include" ..\.. || EXIT /b 1
)
) ELSE IF "%1%"=="build" (
IF "%BE%"=="mingw-gcc" (
@@ -100,7 +124,7 @@ IF "%1"=="deplibs" (
cmake --build . --target INSTALL --config Release || EXIT /b 1
)
) ELSE IF "%1"=="artifact" (
- tar -c -C "C:\Program Files (x86)" --format=zip -f libarchive.zip libarchive
+ C:\windows\system32\tar.exe -c -C "C:\Program Files (x86)" --format=zip -f libarchive.zip libarchive
) ELSE (
ECHO "Usage: %0% deplibs|configure|build|test|install|artifact"
@EXIT /b 0