Commit 96422bac authored by Mateusz Gniewkowski's avatar Mateusz Gniewkowski

Resolved merge conflict

parents 42fec729 75598909
stages:
- check_style
- build
build_image:
stage: build
image: docker:18.09.7
only:
- deb-pack
services:
- docker:18.09.7-dind
script:
- APT_USERNAME=aptuser
- docker build . -t corpus2 --build-arg APT_USERNAME --build-arg APT_PASSWORD
FROM clarinpl/python:3.6
ARG APT_USERNAME
ARG APT_PASSWORD
RUN test -n "$APT_USERNAME"
RUN test -n "$APT_PASSWORD"
RUN apt-get update && apt-get install -y apt-transport-https \
cmake \
antlr \
libantlr-dev \
default-jdk
RUN bash -c "wget -q -O - http://apt.clarin-pl.eu/KEY.gpg | apt-key add -"
RUN bash -c "echo 'deb https://apt.clarin-pl.eu/ /' > /etc/apt/sources.list.d/clarin.list"
# Install corpus2
RUN apt-get update && apt-get install -y \
corpus2-python3.6
RUN mkdir -p /home/install
WORKDIR /home/install
COPY ./src ./wccl
RUN mkdir wccl/build && \
cd wccl/build && \
cmake .. && \
cmake --build . && \
cpack
RUN apt-get install -y curl
WORKDIR /home/install/wccl/build
COPY ./uploaddeb.sh ./
RUN bash uploaddeb.sh $APT_USERNAME $APT_PASSWORD https://apt.clarin-pl.eu
PROJECT(WCCL)
PROJECT(wccl)
cmake_minimum_required(VERSION 2.8.0)
set(wccl_ver_major "0")
set(wccl_ver_minor "3")
set(wccl_ver_patch "2")
set(wccl_ver_patch "3")
set(LIBWCCL_VERSION "${wccl_ver_major}.${wccl_ver_minor}.${wccl_ver_patch}")
set(CMAKE_INSTALL_PREFIX /usr)
# use some of our own Find* scripts
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMakeScripts)
......@@ -54,7 +56,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_COMPILER_IS_GNUCXX)
set(LIBS "")
include_directories(${WCCL_SOURCE_DIR})
include_directories(${wccl_SOURCE_DIR})
find_package(Boost 1.41 REQUIRED COMPONENTS program_options system filesystem regex)
......@@ -86,3 +88,32 @@ else()
message(STATUS "Not building SWIG Python wrappers")
endif(WCCL_BUILD_SWIG)
# Sets a default install location for packages installed from deb - we use
# the same location as it's used when we build projects directly from source
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Detect python version descriptor
if(WCCL_BUILD_SWIG)
find_package(PythonLibs)
find_package(PythonInterp)
set(PYTHON_VERSION "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
endif(WCCL_BUILD_SWIG)
# Requires to install dependencies
set(CPACK_DEBIAN_PACKAGE_DEPENDS "antlr, libantlr-dev, default-jdk")
# Set *.deb package name and version
if(PYTHON_VERSION)
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}-${PYTHON_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${LIBWCCL_VERSION}-all")
else()
SET(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
SET(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${LIBWCCL_VERSION}-all")
endif(PYTHON_VERSION)
SET(CPACK_PACKAGE_VERSION "${LIBWCCL_VERSION}")
# Include CPack
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "g419")
INCLUDE(CPack)
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