add windows32

This commit is contained in:
2021-07-15 11:50:37 +03:00
parent a45762afb7
commit 0df27b567b
2 changed files with 41 additions and 20 deletions

40
Jenkinsfile vendored
View File

@@ -1,40 +1,40 @@
def build_docker(name) { def build_docker(name) {
def image = "${name}-shstk" def image = "${name}-shstk"
echo "Build image ${image}" echo "Build image ${image}"
def pref = "" def pref = ""
if (env.DOCKER_PREFIX) { if (env.DOCKER_PREFIX) {
pref = "--build-arg DOCKER_PREFIX=${env.DOCKER_PREFIX}/" pref = "--build-arg DOCKER_PREFIX=${env.DOCKER_PREFIX}/"
} }
def jobs = 4 def jobs = 4
if (env.JOBS_COUNT) { if (env.JOBS_COUNT) {
jobs = "${env.JOBS_COUNT}" jobs = "${env.JOBS_COUNT}"
} }
def args = "${pref} --build-arg LIBS_BUILD_NUMBER=${env.BUILD_NUMBER} --build-arg JOBS_COUNT=${jobs}" def args = "${pref} --build-arg LIBS_BUILD_NUMBER=${env.BUILD_NUMBER} --build-arg JOBS_COUNT=${jobs}"
dir ("docker/${image}") { dir ("docker/${image}") {
sh "docker build ${args} --no-cache -t ${image} ." sh "docker build ${args} --no-cache -t ${image} ."
} }
return "\n - ${image}" return "\n - ${image}"
} }
node { node {
stage("checkout") { stage("checkout") {
checkout scm checkout scm
} }
def _envmap = [:] def _envmap = [:]
def _env = sh(script: "env", returnStdout: true).trim().split("\n") def _env = sh(script: "env", returnStdout: true).trim().split("\n")
_env.each{ l -> _env.each{ l ->
def _ind = l.indexOf('='); def _ind = l.indexOf('=');
def _n = l.substring(0, _ind); def _n = l.substring(0, _ind);
def _v = l.substring(_ind + 1); def _v = l.substring(_ind + 1);
_envmap["${_n}"] = "${_v}"; _envmap["${_n}"] = "${_v}";
} }
def _msg = "Built images:" def _msg = "Built images:"
def platforms = ['debian', 'osx', 'windows', 'android', 'pi', 'ubuntu'] def platforms = ['debian', 'osx', 'windows', 'windows32', 'android', 'pi', 'ubuntu']
for (int i = 0; i < platforms.size(); ++i) { for (int i = 0; i < platforms.size(); ++i) {
if (_envmap["BUILD_${platforms[i]}"] == "1") { if (_envmap["BUILD_${platforms[i]}"] == "1") {
stage("${platforms[i]}-shstk") { stage("${platforms[i]}-shstk") {
_msg += build_docker("${platforms[i]}") _msg += build_docker("${platforms[i]}")
} }
} }
} }
sh "docker system prune -f" sh "docker system prune -f"
echo "${_msg}" echo "${_msg}"
@@ -46,7 +46,7 @@ pipeline {
options { options {
copyArtifactPermission('*'); copyArtifactPermission('*');
} }
stages { stages {
stage("PIP doc") { stage("PIP doc") {
steps { steps {
checkout scm checkout scm

View File

@@ -0,0 +1,21 @@
ARG DOCKER_PREFIX=wapmobil/
FROM ${DOCKER_PREFIX}windows32
ARG LIBS_BUILD_NUMBER=9999
ARG JOBS_COUNT=4
ENV PATH=/opt/cmake/bin:$PATH
WORKDIR /soft
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/shstk.git
WORKDIR /soft/shstk_build_host
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \
&& make install -j${JOBS_COUNT} \
&& rm -rf * \
&& ldconfig
WORKDIR /soft/shstk_build_windows32
RUN cmake -DCMAKE_INSTALL_PREFIX=/soft/windows32 -DICU=0 -DLOCAL=1 -DQGLENGINE=1 -DQGLVIEW=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} -DCMAKE_TOOLCHAIN_FILE=/soft/toolchain-Windows32.cmake ../shstk/ \
&& make install -j${JOBS_COUNT} && rm -rf *
WORKDIR /soft/src