10000 gitlab-ci: Add "dist" job to build distribution tarball · GNOME/libxslt@ae147fe · GitHub
[go: up one dir, main page]

Skip to content

Commit ae147fe

Browse files
committed
gitlab-ci: Add "dist" job to build distribution tarball
Prepare for GNOME Release Service.
1 parent 941b10f commit ae147fe

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.gitlab-ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
include:
2+
- project: 'Infrastructure/gnome-release-service-ci-templates'
3+
file: 'release-module.yml'
4+
15
.test:
26
# Reuse libxml2 image
37
image: registry.gitlab.gnome.org/gnome/libxml2
@@ -248,6 +252,24 @@ cmake:msvc:v141:x86:static:
248252
BUILD_SHARED_LIBS: "OFF"
249253
SUFFIX: static
250254

255+
dist:
256+
image: registry.gitlab.gnome.org/gnome/libxml2
257+
script:
258+
- sh .gitlab-ci/dist.sh
259+
artifacts:
260+
paths:
261+
- libxslt-dist/*.tar.xz
262+
263+
# TODO: Strip "v" from $CI_COMMIT_TAG
264+
265+
#release:
266+
# stage: release
267+
# variables:
268+
# TARBALL_ARTIFACT_PATH: libxslt-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz
269+
# extends: .release-module
270+
# rules:
271+
# - if: $CI_COMMIT_TAG
272+
251273
pages:
252274
script:
253275
- mkdir -p public/EXSLT

.gitlab-ci/dist.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
LIBXML2_PREFIX="$CI_PROJECT_DIR/libxml2/install"
6+
git clone --depth 1 https://gitlab.gnome.org/GNOME/libxml2.git
7+
cd libxml2
8+
sh autogen.sh --prefix="$LIBXML2_PREFIX"
9+
make -j$(nproc)
10+
make install
11+
cd ..
12+
13+
mkdir -p libxslt-dist
14+
cd libxslt-dist
15+
sh ../autogen.sh --with-libxml-prefix="$LIBXML2_PREFIX"
16+
export PYTHONPATH="$(echo $LIBXML2_PREFIX/lib/python*/site-packages):$PYTHONPATH"
17+
make distcheck V=1 DISTCHECK_CONFIGURE_FLAGS=" \
18+
--with-crypto \
19+
--with-plugins \
20+
--with-libxml-prefix=$LIBXML2_PREFIX \
21+
"
22+
if [ -z "$CI_COMMIT_TAG" ]; then
23+
mv libxslt-*.tar.xz libxslt-git-$CI_COMMIT_SHORT_SHA.tar.xz
24+
fi

0 commit comments

Comments
 (0)
0