image: registry.gitlab.gnome.org/world/openpaperwork/paperwork/build stages: # no point in waiting for the tests to end before generating the data files # or the development documentation - tests_data_doc - deploy_linux - deploy_windows check: stage: tests_data_doc only: - branches@World/OpenPaperwork/paperwork - tags@World/OpenPaperwork/paperwork tags: - linux - volatile script: - sh ./ci/set_apt_proxy.sh - make check .apt: &apt before_script: - sh ./ci/set_apt_proxy.sh test: stage: tests_data_doc only: - branches@World/OpenPaperwork/paperwork - tags@World/OpenPaperwork/paperwork tags: - linux - volatile <<: *apt script: - source ./activate_test_env.sh && make install - source ./activate_test_env.sh && paperwork-gtk chkdeps -y && paperwork-cli chkdeps -y - source ./activate_test_env.sh && make test generate_data: stage: tests_data_doc only: - branches@World/OpenPaperwork/paperwork - tags@World/OpenPaperwork/paperwork tags: - linux - volatile <<: *apt script: - source ./activate_test_env.sh && make install - source ./activate_test_env.sh && paperwork-gtk chkdeps -y && paperwork-cli chkdeps -y - source ./activate_test_env.sh && make data upload_data doc_devel: stage: tests_data_doc only: - branches@World/OpenPaperwork/paperwork - tags@World/OpenPaperwork/paperwork tags: - linux - volatile <<: *apt script: - source ./activate_test_env.sh && make doc && make upload_doc linux_flatpak: stage: deploy_linux only: - branches@World/OpenPaperwork/paperwork - tags@World/OpenPaperwork/paperwork tags: - openpaper-flatpak script: # not running as root, so we cannot actually install anything # - apt-get update # - apt-get install -y -q rclone flatpak-builder - ./ci/update_flatpak_repo.sh .windows: &windows before_script: # Libinsane build dependencies - c:\msys64\usr\bin\pacman --needed --noconfirm -S make - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-cunit - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-doxygen - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-gcc - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-gobject-introspection - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-meson - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-python3-gobject - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-vala # Paperwork build dependencies - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-gdk-pixbuf2 - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-cairo - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-python3-cairo - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-gtk3 - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-python3-pillow - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-ca-certificates - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-python3-setuptools - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-python3-pip - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-libnotify - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-poppler - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-python-psutil - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-gettext - c:\msys64\usr\bin\pacman --needed --noconfirm -S git # for 'make version' - c:\msys64\usr\bin\pacman --needed --noconfirm -S wget # for downloading data files - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-python3-cx_Freeze - c:\msys64\usr\bin\pacman --needed --noconfirm -S zip unzip - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-nsis - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-nsis-nsisunz - git submodule init - git submodule update --recursive --remote - c:\msys64\usr\bin\bash -lc "make clean" - c:\msys64\usr\bin\bash -lc "make uninstall" # a 2nd time just to be really sure # (that's the problem when can't use containers ..) - c:\msys64\usr\bin\bash -lc "make uninstall" windows_tests: stage: tests_data_doc only: - branches@World/OpenPaperwork/paperwork - tags@World/OpenPaperwork/paperwork variables: MSYSTEM: "MINGW32" CHERE_INVOKING: "yes" tags: - windows - msys2 <<: *windows script: # Tesseract (required for unit tests) - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-libarchive # missing tesseract dependency - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-tesseract-ocr - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-tesseract-data-eng - c:\msys64\usr\bin\pacman --needed --noconfirm -S mingw-w64-i686-tesseract-data-fra # Build - c:\msys64\usr\bin\bash -lc "export TESSDATA_PREFIX=/mingw32/share/tessdata && make install test" - c:\msys64\usr\bin\bash -lc "make uninstall" windows_exe: stage: deploy_windows only: - branches@World/OpenPaperwork/paperwork - tags@World/OpenPaperwork/paperwork variables: MSYSTEM: "MINGW32" CHERE_INVOKING: "yes" tags: - windows - msys2 <<: *windows script: # We need rclone to upload the files on OVH object storage - c:\msys64\usr\bin\rm -f rclone-v1.50.1-windows-386.zip - c:\msys64\usr\bin\rm -rf rclone-v1.50.1-windows-386 - c:\msys64\usr\bin\wget -q https://downloads.rclone.org/v1.50.1/rclone-v1.50.1-windows-386.zip - c:\msys64\usr\bin\unzip rclone-v1.50.1-windows-386.zip - c:\msys64\usr\bin\cp rclone-v1.50.1-windows-386/rclone.exe /usr/bin # Build - c:\msys64\usr\bin\bash -lc "make windows_exe" - c:\msys64\usr\bin\bash -lc "./ci/deliver.sh dist/paperwork.zip windows .zip" - c:\msys64\usr\bin\bash -lc "make uninstall"