Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alberto Mardegan
Imaginario
Commits
694d4a9a
Commit
694d4a9a
authored
Jan 06, 2019
by
Alberto Mardegan
Browse files
CI: Build exiv2
parent
7e79f207
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
694d4a9a
...
...
@@ -5,19 +5,58 @@ cache:
paths
:
-
apt-cache/
stages
:
-
deps
-
build
-
test
-
deploy
before_script
:
-
export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
-
apt-get update -yq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y pkg-config
libexiv2-dev
libopencv-imgproc-dev libopencv-objdetect-dev
-
apt-get update -yq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y pkg-config libopencv-imgproc-dev libopencv-objdetect-dev
-
apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y sqlite3 lcov gcovr
-
apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y wget
build_dependencies
:
stage
:
deps
cache
:
paths
:
-
apt-cache/
-
exiv2
artifacts
:
paths
:
-
staging
script
:
-
STAGING="$PWD/staging"
-
EXIV2_VERSION="0.27"
-
EXIV2_ARCHIVE="${EXIV2_VERSION}.tar.gz"
-
mkdir -p exiv2 && cd exiv2
-
if [ ! -d "exiv2-${EXIV2_VERSION}" ]; then
-
if [ ! -f "$EXIV2_ARCHIVE" ]; then
-
wget -c -nv "https://github.com/Exiv2/exiv2/archive/$EXIV2_ARCHIVE"
-
tar xzf "$EXIV2_ARCHIVE"
-
fi
-
fi
-
cd "exiv2-${EXIV2_VERSION}"
-
mkdir -p build ; cd build
-
cmake -DCMAKE_INSTALL_PREFIX=$STAGING ..
-
make install
-
'
#
Workaround
for
https://github.com/Exiv2/exiv2/issues/636'
-
echo '#include "exiv2lib_export.h"' > tmp_header
-
cat $STAGING/include/exiv2/convert.hpp >> tmp_header
-
mv tmp_header $STAGING/include/exiv2/convert.hpp
build_desktop
:
stage
:
build
script
:
-
export QT_SELECT=qt5
-
STAGING="$PWD/staging"
-
export PKG_CONFIG_PATH="$STAGING/lib/pkgconfig:$PKG_CONFIG_PATH"
-
mkdir build
-
cd build
-
PREFIX=/opt/imaginario qmake CONFIG+=debug CONFIG+=coverage CONFIG+=desktop ..
-
make -j
4
dependencies
:
-
build_dependencies
artifacts
:
paths
:
-
build/
...
...
@@ -25,8 +64,10 @@ build_desktop:
test_desktop
:
stage
:
test
script
:
-
STAGING="$PWD/staging"
-
find build | xargs touch
# Avoid rebuilding
-
cd build
-
make coverage-html
-
LD_LIBRARY_PATH="$STAGING/lib:$LD_LIBRARY_PATH"
make coverage-html
dependencies
:
-
build_dependencies
-
build_desktop
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment