Skip to content

Commit f33b8b4

Browse files
committed
Install resources for unit test in all CI
1 parent e10038d commit f33b8b4

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

continuous_integration/Dockerfile-debian12

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,13 @@ ENV QT_VERSION_MAJOR="${QT_VERSION_MAJOR}"
7272
# Build
7373
#
7474
RUN cmake -G Ninja -DLIMA_RESOURCES:STRING=build -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:STRING=Release -DLIMA_VERSION_RELEASE:STRING="$(cat /src/lima/release)" -DSHORTEN_POR_CORPUS_FOR_SVMLEARN:BOOL=ON -DCTEST_OUTPUT_ON_FAILURE=ON -DTF_SOURCES_PATH:PATH="/usr" -DWITH_DEBUG_MESSAGES=ON -DWITH_ARCH=OFF -DWITH_ASAN=OFF -DWITH_GUI=ON -DCMAKE_PREFIX_PATH=$LIBTORCH_PATH -DQT_VERSION_MAJOR=${QT_VERSION_MAJOR} ..
75-
RUN ninja && ninja install && ninja test && ninja package
75+
RUN ninja && ninja install
76+
# Some models are necessary for unit tests to work, let's use a previous
77+
# version of lima-python to install them, then run tests and finally remove
78+
# old aymara/lima and downloaded models
79+
RUN wget -q https://github.com/aymara/lima-python/releases/download/continuous/aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl && pip install ./aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl && lima_models -i eng && && deeplima_models -i UD_English-EWT && pip uninstall -y aymara && (ctest || ctest --rerun-failed --output-on-failure) && rm -Rf $HOME/.local/share/lima
80+
81+
RUN ninja package
7682
RUN install -D -t /usr/share/apps/lima/packages /src/lima/build/*.deb
7783

7884
# WORKDIR /usr/share/apps/lima/tests

continuous_integration/Dockerfile-manylinux_2_28_with_qt6_lima-manylinux

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,6 @@ ENV NLTK_PTB_DP_FILE=/nltk_data/corpora/dependency_treebank/nltk-ptb.dp \
8888
Qt_INSTALL_DIR=/opt/qt6 \
8989
BOOST_ROOT=/opt/boost
9090

91-
# Some models are necessary for unit tests to work, let's use a previous
92-
# version of lima-python to install them
93-
RUN wget -q https://github.com/aymara/lima-python/releases/download/continuous/aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl
94-
RUN pip install ./aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl
95-
RUN lima_models -i eng
96-
RUN deeplima_models -i UD_English-EWT
97-
RUN pip uninstall -y aymara
98-
9991
# Build
10092
#
10193
# -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
@@ -115,7 +107,11 @@ RUN cmake -G Ninja \
115107
-DWITH_ASAN=OFF \
116108
-DWITH_GUI=ON ..
117109
RUN ninja && ninja install
118-
RUN ctest || ctest --rerun-failed --output-on-failure
110+
111+
# Some models are necessary for unit tests to work, let's use a previous
112+
# version of lima-python to install them, then run tests and finally remove
113+
# old aymara/lima and downloaded models
114+
RUN wget -q https://github.com/aymara/lima-python/releases/download/continuous/aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl && pip install ./aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl && lima_models -i eng && && deeplima_models -i UD_English-EWT && pip uninstall -y aymara && (ctest || ctest --rerun-failed --output-on-failure) && rm -Rf $HOME/.local/share/lima
119115

120116
#WORKDIR /opt/lima/share/apps/lima/tests
121117
#RUN /bin/bash -c "set -o pipefail && tva --language=eng test-eng.*.xml 2>&1 | tee tva-eng.log"

continuous_integration/Dockerfile-ubuntu22.04

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,13 @@ ENV CXXFLAGS=$CXXFLAGS
8888

8989

9090
RUN cmake -G Ninja -DWITH_LIMA_RESOURCES:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:STRING=Release -DLIMA_VERSION_RELEASE:STRING="$(cat /src/lima/release)" -DSHORTEN_POR_CORPUS_FOR_SVMLEARN:BOOL=ON -DCTEST_OUTPUT_ON_FAILURE=ON -DTF_SOURCES_PATH:PATH="/usr" -DTORCH_CUDA_ARCH_LIST=6.1 -DCMAKE_PREFIX_PATH=/src/lima/extern/libtorch -DWITH_DEBUG_MESSAGES=ON -DWITH_ARCH=OFF -DWITH_ASAN=OFF -DWITH_GUI=ON ..
91-
RUN ninja && ninja install && ninja test
91+
RUN ninja && ninja install
92+
93+
# Some models are necessary for unit tests to work, let's use a previous
94+
# version of lima-python to install them, then run tests and finally remove
95+
# old aymara/lima and downloaded models
96+
RUN wget -q https://github.com/aymara/lima-python/releases/download/continuous/aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl && pip install ./aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl && lima_models -i eng && && deeplima_models -i UD_English-EWT && pip uninstall -y aymara && (ctest || ctest --rerun-failed --output-on-failure) && rm -Rf $HOME/.local/share/lima
97+
9298
RUN bash -c 'if [[ "$PACKAGES" == "yes" ]] ; then ninja package && install -D -t /usr/share/apps/lima/packages /src/lima/build/*.deb ; fi'
9399

94100
# WORKDIR /usr/share/apps/lima/tests

continuous_integration/Dockerfile-ubuntu22.04-fia

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,9 @@ ENV CUDA_HOME=/usr/local/cuda \
9292
#
9393

9494
RUN cmake -G Ninja -DWITH_LIMA_RESOURCES:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE:STRING=Release -DLIMA_VERSION_RELEASE:STRING="$(cat /src/lima/release)" -DSHORTEN_POR_CORPUS_FOR_SVMLEARN:BOOL=ON -DCTEST_OUTPUT_ON_FAILURE=ON -DTF_SOURCES_PATH:PATH="/usr" -DTORCH_CUDA_ARCH_LIST=6.1 -DCMAKE_PREFIX_PATH=/src/lima/extern/libtorch -DWITH_DEBUG_MESSAGES=ON -DWITH_ARCH=OFF -DWITH_ASAN=OFF -DWITH_GUI=OFF -DCMAKE_CUDA_COMPILER:PATH=/usr/local/cuda/bin/nvcc ..
95-
RUN ninja && ninja install && ninja test
95+
RUN ninja && ninja install
96+
97+
# Some models are necessary for unit tests to work, let's use a previous
98+
# version of lima-python to install them, then run tests and finally remove
99+
# old aymara/lima and downloaded models
100+
RUN wget -q https://github.com/aymara/lima-python/releases/download/continuous/aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl && pip install ./aymara-0.5.0b6-cp37-abi3-manylinux_2_28_x86_64.whl && lima_models -i eng && && deeplima_models -i UD_English-EWT && pip uninstall -y aymara && (ctest || ctest --rerun-failed --output-on-failure) && rm -Rf $HOME/.local/share/lima

0 commit comments

Comments
 (0)