Merge pull request 'master' (#172) from master into release
All checks were successful
SHS Gitea/shstk/pipeline/head This commit looks good

Reviewed-on: https://git.shs.tools/SHS/shstk/pulls/172
This commit was merged in pull request #172.
This commit is contained in:
2023-03-25 18:54:29 +03:00
5 changed files with 26 additions and 44 deletions

27
Jenkinsfile vendored
View File

@@ -1,4 +1,4 @@
def build_docker(name, release_dir) {
def build_docker(name, docker_dir, docker_image, release_dir) {
def image_name = "${name}-shstk"
echo "Build image ${image_name}"
def pref = ""
@@ -9,13 +9,17 @@ def build_docker(name, release_dir) {
if (env.JOBS_COUNT) {
jobs = "${env.JOBS_COUNT}"
}
def args = "${pref} --build-arg LIBS_BUILD_NUMBER=${env.BUILD_NUMBER} --build-arg JOBS_COUNT=${jobs}"
dir ("docker/${image_name}") {
def args = "${pref}"
args += " --build-arg IMAGE_FROM=${docker_image}"
args += " --build-arg LIBS_BUILD_NUMBER=${env.BUILD_NUMBER}"
args += " --build-arg JOBS_COUNT=${jobs}"
dir ("docker/${docker_dir}-shstk") {
sh "docker build ${args} --no-cache -t ${image_name} ."
def diargs = "-v " + release_dir + ":/soft/release"
docker.image(image_name).inside(diargs) {
sh 'cp -vf /soft/shstk/release/* /soft/release/ || true'
}
//print "docker build ${args} --no-cache -t ${image_name} ."
}
return "\n - ${image_name}"
}
@@ -38,14 +42,27 @@ node {
sh "rm -rvf ${rel_dir}"
sh "mkdir -p ${rel_dir}"
def _msg = "Built images:"
def platforms = ['debian', 'debian11', 'osx', 'windows', 'windows32', 'android', 'pi', 'ubuntu']
// individual platforms
def platforms = ['osx', 'android', 'windows', 'windows32', 'pi']
for (int i = 0; i < platforms.size(); ++i) {
if (_envmap["BUILD_${platforms[i]}"] == "1") {
stage("${platforms[i]}-shstk") {
_msg += build_docker("${platforms[i]}", rel_dir)
_msg += build_docker("${platforms[i]}", "${platforms[i]}", "", rel_dir)
}
}
}
// desktop linux set
sh 'wget https://shs.tools/files/linux.json'
def root = readJSON(file: 'linux.json')
for (dist in root.Linux) {
if (dist.off) continue
stage ("${dist.system}-shstk") {
_msg += build_docker(dist.docker_image, "linux_desktop", dist.docker_image, rel_dir)
}
}
sh "docker system prune -f"
archiveArtifacts 'release/*'
echo "${_msg}"

View File

@@ -1,18 +0,0 @@
ARG DOCKER_PREFIX=wapmobil/
FROM ${DOCKER_PREFIX}debian11
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_debian
RUN cmake -G Ninja -DICU=0 -DLOCAL=0 -DQGLENGINE=1 -DQGLVIEW=1 -DHAS_GL=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \
&& cmake --build ./ --target install -j${JOBS_COUNT} \
&& cmake --build ./ --target deploy -j${JOBS_COUNT} \
&& rm -rf * \
&& ldconfig
WORKDIR /soft/src

View File

@@ -1,5 +1,6 @@
ARG DOCKER_PREFIX=wapmobil/
FROM ${DOCKER_PREFIX}debian
ARG IMAGE_FROM
FROM ${DOCKER_PREFIX}${IMAGE_FROM}
ARG LIBS_BUILD_NUMBER=9999
ARG JOBS_COUNT=4
@@ -8,7 +9,7 @@ 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_debian
WORKDIR /soft/shstk_build_linux
RUN cmake -G Ninja -DICU=0 -DLOCAL=0 -DQGLENGINE=1 -DQGLVIEW=1 -DHAS_GL=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \
&& cmake --build ./ --target install -j${JOBS_COUNT} \
&& cmake --build ./ --target deploy -j${JOBS_COUNT} \

View File

@@ -1,18 +0,0 @@
ARG DOCKER_PREFIX=wapmobil/
FROM ${DOCKER_PREFIX}ubuntu
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_ubuntu
RUN cmake -G Ninja -DICU=0 -DLOCAL=0 -DQGLENGINE=1 -DQGLVIEW=1 -DHAS_GL=0 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../shstk \
&& cmake --build ./ --target install -j${JOBS_COUNT} \
&& cmake --build ./ --target deploy -j${JOBS_COUNT} \
&& rm -rf * \
&& ldconfig
WORKDIR /soft/src

2
pip

Submodule pip updated: d66f7efb3c...2d1c86bc83