Commit 3bb731eb authored by Mateusz Gniewkowski's avatar Mateusz Gniewkowski

Resolve "Create deb package and upload to our repo"

CI

CI

CI

CI

CI

CI

CI
parent 0464e59d
image: clarinpl/cpp:latest
stages:
- build
- deploy
build_deb:
stage: build
script:
- add-apt-repository -y ppa:deadsnakes/ppa
- apt-get update
- apt-get install -y
python3.6
python3.6-dev
corpus2-python3.6
toki
morfeusz
*morfeusz2*
- mkdir build && cd build
- cmake .. && cmake --build . && cpack
artifacts:
paths:
- build/MorphAnalyser*.deb
expire_in: 1h
push_deb:
stage: deploy
only:
- master
- develop # delete it after first merge to master
script:
- FILE=$(ls build/MorphAnalyser*.deb)
- curl --fail -i -X POST -F "file=@./${FILE}" -u "${APT_USERNAME}:${APT_PASSWORD}" https://apt.clarin-pl.eu/
dependencies:
......@@ -4,6 +4,7 @@ cmake_minimum_required(VERSION 2.8.0)
set(maca_ver_major "1")
set(maca_ver_minor "0")
set(maca_ver_patch "7")
set(MACA_VERSION "${maca_ver_major}.${maca_ver_minor}.${maca_ver_patch}")
set(BUILD_GPL_PLUGINS OFF CACHE BOOL "Include GPL plugins into installation")
......@@ -63,9 +64,6 @@ add_subdirectory(maca-analyse)
add_subdirectory(maca-reanalyse)
add_subdirectory(maca-convert)
# if(UNIX)
# add_subdirectory(tests)
# endif()
if(MACA_BUILD_SWIG)
FIND_PACKAGE(SWIG)
......@@ -98,3 +96,21 @@ endif(BUILD_GPL_PLUGINS)
message(STATUS "Use cmake wizard mode: -i; to manage build configuration.")
message(STATUS "*****************************************************")
# Requires to install dependencies
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libboost-all-dev, libicu-dev, corpus2-python3.6, toki, libloki-dev,
morfeusz2-gui, libmorfeusz2-dev, morfeusz2-dictionary-sgjp,
morfeusz2-dictionary-polimorf, python-morfeusz2,
python3-morfeusz2, libmorfeusz2, morfeusz2, morfeusz"
)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "")
# Set *.deb package name and version
SET(CPACK_PACKAGE_VERSION "${MACA_VERSION}")
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "g419")
set(CPACK_SYSTEM_NAME "all")
set(CPACK_TOPLEVEL_TAG "all")
INCLUDE(CPack)
FROM ubuntu:16.04
FROM clarinpl/cpp
RUN apt-get update && \
RUN add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y \
apt-utils iputils-ping \
git subversion \
vim ranger atool htop curl \
locales locales-all \
cmake g++ \
libboost-all-dev \
libicu-dev \
libloki-dev \
libxml++2.6-dev \
flex bison wget \
software-properties-common
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN wget -O - http://download.sgjp.pl/apt/sgjp.gpg.key|sudo apt-key add - && \
apt-add-repository http://download.sgjp.pl/apt/ubuntu && apt update && \
apt install -y *morfeusz2*
WORKDIR /home/install
RUN wget http://tools.clarin-pl.eu/share/morfeusz-SGJP-linux64-20130413.tar.bz2 && \
tar -jxvf morfeusz-SGJP-linux64-20130413.tar.bz2 && \
mv libmorfeusz* /usr/local/lib/ && \
mv morfeusz /usr/local/bin/ && \
mv morfeusz.h /usr/local/include/ && \
ldconfig && \
cd /home/install && \
rm -rf morfeusz-sgjp
WORKDIR /home/install
RUN git clone https://gitlab.clarin-pl.eu/analysers/corpus2.git && \
mkdir corpus2/bin && \
cd corpus2/bin && \
cmake .. && \
make && \
make install && \
ldconfig && \
cd /home/install && \
rm -rf corpus2
WORKDIR /home/install
RUN git clone https://gitlab.clarin-pl.eu/analysers/toki.git && \
mkdir toki/bin && \
cd toki/bin && \
cmake .. && \
make && \
make install && \
ldconfig && \
cd /home/install && \
rm -rf toki
python3.6 \
python3.6-dev \
corpus2-python3.6 \
toki \
morfeusz \
*morfeusz2*
WORKDIR /home/install
COPY . maca/
RUN mkdir maca/bin && \
cd maca/bin && \
cmake .. && \
make && \
make -j && \
make install && \
ldconfig && \
cd /home/install && \
rm -rf maca
rm -r maca
......@@ -6,6 +6,34 @@ tagset_to=morfeusz2
pre=adv
post=adv:pos
[tag]
pre=adjp:nom
post=adjp
[tag]
pre=adjp:gen
post=adjp
[tag]
pre=adjp:dat
post=adjp
[tag]
pre=adjp:acc
post=adjp
[tag]
pre=adjp:inst
post=adjp
[tag]
pre=adjp:loc
post=adjp
[tag]
pre=adjp:voc
post=adjp
[convert]
tagset_from=morfeusz2
tagset_to=nkjp
......@@ -20,6 +48,7 @@ override=pt
override=dig:num
override=romandig:num
override=emoticon:xxx
override=emo:interj
override=prefa:ign
override=prefppas:ign
override=prefs:ign
......
......@@ -27,16 +27,18 @@ INCLUDE(${SWIG_USE_FILE})
include_directories(${Libmaca_SOURCE_DIR} "../libmaca")
link_directories(${Libmaca_BINARY_DIR})
find_package(PythonLibs 2)
find_package(PythonInterp)
# Python 2 support ended on 1st January 2020.
find_package(PythonLibs 3.6)
find_package(PythonInterp 3.6)
# idea taken from pyplot build system
execute_process(
COMMAND
${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')"
OUTPUT_VARIABLE PYTHON_INSTDIR
OUTPUT_STRIP_TRAILING_WHITESPACE
)
#execute_process(
# COMMAND
# ${PYTHON_EXECUTABLE} -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='${CMAKE_INSTALL_EXEC_PREFIX}')"
# OUTPUT_VARIABLE PYTHON_INSTDIR
# OUTPUT_STRIP_TRAILING_WHITESPACE
#)
set(PYTHON_INSTDIR "lib/python3.6/dist-packages")
message(STATUS "INFO: " "python lib: ${PYTHON_INSTDIR}" )
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment