[ci] added job for swig compilation on Linux with artifacts (#2125)

* added job for swig compilation on Linux with artifacts

* hotfix

* test: SWIG with Clang compiler

* switch compiler back to gcc

* switch to main docker
This commit is contained in:
Nikita Titov 2019-04-30 07:26:16 +03:00 коммит произвёл Guolin Ke
Родитель 8d2ec69f4f
Коммит 739c2635f4
3 изменённых файлов: 36 добавлений и 1 удалений

Просмотреть файл

@ -41,6 +41,26 @@ RUN curl -sL https://cmake.org/files/v3.14/cmake-3.14.1-Linux-x86_64.sh -o cmake
&& ./cmake.sh --prefix=/usr/local --exclude-subdir \
&& rm cmake.sh
# Install Java
RUN add-apt-repository ppa:openjdk-r/ppa -y \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
openjdk-8-jdk \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
# Install SWIG
RUN curl -sL https://downloads.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz -o swig.tar.gz \
&& tar -xzf swig.tar.gz \
&& cd swig-3.0.12 \
&& ./configure --prefix=/usr/local --without-pcre \
&& make \
&& make install \
&& cd .. \
&& rm swig.tar.gz \
&& rm -rf swig-3.0.12
# Install Miniconda
RUN curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh \
&& chmod +x miniconda.sh \

Просмотреть файл

@ -18,6 +18,19 @@ else
CMAKE_OPTS=()
fi
if [[ $AZURE == "true" ]] && [[ $OS_NAME == "linux" ]] && [[ $TASK == "swig" ]]; then
mkdir $BUILD_DIRECTORY/build && cd $BUILD_DIRECTORY/build
cmake -DUSE_SWIG=ON "${CMAKE_OPTS[@]}" ..
make -j4 || exit -1
if [[ $COMPILER == "gcc" ]]; then
objdump -T $BUILD_DIRECTORY/lib_lightgbm.so > $BUILD_DIRECTORY/objdump.log || exit -1
objdump -T $BUILD_DIRECTORY/lib_lightgbm_swig.so >> $BUILD_DIRECTORY/objdump.log || exit -1
python $BUILD_DIRECTORY/helpers/check_dynamic_dependencies.py $BUILD_DIRECTORY/objdump.log || exit -1
fi
cp $BUILD_DIRECTORY/build/lightgbmlib.jar $BUILD_ARTIFACTSTAGINGDIRECTORY/lightgbmlib.jar
exit 0
fi
conda create -q -y -n $CONDA_ENV python=$PYTHON_VERSION
source activate $CONDA_ENV

Просмотреть файл

@ -15,7 +15,7 @@ jobs:
vmImage: 'ubuntu-16.04'
container: ubuntu1404
strategy:
maxParallel: 6
maxParallel: 7
matrix:
regular:
TASK: regular
@ -25,6 +25,8 @@ jobs:
bdist:
TASK: bdist
PYTHON_VERSION: 3.6
swig:
TASK: swig
inference:
TASK: if-else
mpi_source: