Skip to content

Commit

Permalink
Add packaging of ubuntu binaries to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mdimura committed Mar 26, 2019
1 parent b582dc3 commit 61e0843
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 3 deletions.
15 changes: 14 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ build-ubuntu:
expire_in: 1 day
paths:
- ${CI_BUILD_NAME}/src/gui/Olga
- ${CI_BUILD_NAME}/src/irmsd/libirmsd.so
- ${CI_BUILD_NAME}/src/irmsd/libirmsd.so.1.0.0

build-win64:
stage: compile
Expand Down Expand Up @@ -54,6 +54,19 @@ build-win32:
- ${CI_BUILD_NAME}/src/gui/release/Olga.exe
- ${CI_BUILD_NAME}/src/irmsd/release/irmsd.dll

pack-ubuntu:
stage: package
image: burningdaylight/ubuntu-latest-devel
script:
- ./src/pack_ubuntu.sh build-ubuntu Olga
dependencies:
- build-ubuntu
artifacts:
expire_in: 1 week
name: "Olga_ubuntu18.04_${CI_BUILD_REF_NAME}-${CI_BUILD_REF:0:8}"
paths:
- Olga

pack-win64:
stage: package
image: burningdaylight/docker-mingw-qt5
Expand Down
2 changes: 2 additions & 0 deletions Olga.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ gui.depends = irmsd
DISTFILES += \
.gitignore \
.gitlab-ci.yml \
src/pack_mingw.sh \
src/pack_ubuntu.sh \
.clang-format \
src/vdWRadii.json \
src/weighting_function.csv \
Expand Down
4 changes: 2 additions & 2 deletions src/common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ QMAKE_CXXFLAGS -= -O2

QMAKE_CXXFLAGS_RELEASE -= -O
QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE *= -O2 -march=native -flto #-fwhole-program
QMAKE_CXXFLAGS_RELEASE *= -O2 -flto -ftree-vectorize -msse3 -mfpmath=sse #-fwhole-program

QMAKE_LFLAGS -= -O1
QMAKE_LFLAGS *= -O2 -flto #-fwhole-program
QMAKE_LFLAGS *= -O2 -flto -ftree-vectorize -msse3 -mfpmath=sse #-fwhole-program

COMMIT_DATE = $$system(git show -s --pretty='%ci')
COMMIT_DATE = $$first(COMMIT_DATE)
Expand Down
37 changes: 37 additions & 0 deletions src/pack_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh
BUILDDIR=$1
DESTDIR=$2


if [ -z "$BUILDDIR" ]
then
#BUILDDIR="./build-ubuntu"
echo ERROR: BUILDDIR is not set
exit 1
fi
if [ -z "$DESTDIR" ]
then
DESTDIR="./Olga-ubuntu"
fi

mkdir -p "${DESTDIR}"

cat << EOF > "${DESTDIR}"/Olga.sh
#!/bin/bash
export LD_LIBRARY_PATH=./
./Olga "$@"
EOF
chmod +x "${DESTDIR}"/Olga.sh

cp "${BUILDDIR}/src/gui/Olga" "${DESTDIR}"/
cp "${BUILDDIR}/src/irmsd/libirmsd.so.1.0.0" "${DESTDIR}"/libirmsd.so.1

cp /usr/lib/libsasa.so "${DESTDIR}"/
cp /usr/lib/libtng_io.so "${DESTDIR}"/
cp /usr/lib/libtng_io.so.1 "${DESTDIR}"/
cp /usr/lib/libasync++.so "${DESTDIR}"/
cp /usr/lib/libpteros.so "${DESTDIR}"/

cp src/*.json "${DESTDIR}"/
cp src/weighting_function.csv "${DESTDIR}"/
cp -r doc "${DESTDIR}"/

0 comments on commit 61e0843

Please sign in to comment.