# Jobs to build the two channels in Socializer. # Currently using python 3.7.5 variables: PYTHON3-32: "C:\\python37-32\\python.exe" PYTHON3-64: "C:\\python37-64\\python.exe" PYINSTALLER: "C:\\python37-32\\scripts\\pyinstaller.exe" NSIS: "C:\\nsis\\makensis.exe" ### Job to make some tests (ToDo: I need to improve the current testing stuff. Currently those tests fails) test_py3: stage: test tags: - windows10 before_script: - '%PYTHON3-32% -V' - '%PYTHON3-32% -m pip install --upgrade pip' - '%PYTHON3-32% -m pip install --upgrade -r requirements.txt' only: - schedules script: - cd src - '%PYTHON3-32% -m coverage run run_tests.py' - '%PYTHON3-32% -m coverage report --omit="test*"' coverage: '/TOTAL.+ ([0-9]{1,3}%)/' # Create documentation in all available languages so we'll have it at http://socializer.su/documentation # this job is triggered on every commit to master, so we always will display the latest available version of the documentation in the website. documentation: type: deploy tags: - windows10 before_script: - '%PYTHON3-32% -V' script: - copy changelog.md doc\changelog.md - cd doc - '%PYTHON3-32% documentation_importer.py' - cd ..\src - '%PYTHON3-32% ..\doc\generator.py' - 'move documentation ..\' only: - master artifacts: paths: - documentation name: socializer_documentation expire_in: 90 days # Create alpha version in Python 3.7 by using pyinstaller # This job is about to be removed on november 27. alpha_python3: type: deploy tags: - windows10 before_script: - '%PYTHON3-32% -V' - '%PYTHON3-32% -m pip install --upgrade pip' - '%PYTHON3-32% -m pip install --upgrade -r requirements.txt' - '%PYTHON3-32% -m pip uninstall enum34 -y' script: - copy changelog.md doc\changelog.md - cd doc - '%PYTHON3-32% documentation_importer.py' - cd ..\src - '%PYTHON3-32% ..\doc\generator.py' - '%PYTHON3-32% write_version_data.py' - '%PYINSTALLER% main.spec' - cd .. - cd scripts - '%PYTHON3-32% prepare_zipversion.py' - call genpot_interface.bat - call genpot_doc.bat - cd .. - move src\socializer.zip socializer.zip - move scripts\socializer.pot socializer.pot - move scripts\socializer-documentation.pot socializer-documentation.pot only: - schedules artifacts: paths: - socializer.zip - socializer.pot - socializer-documentation.pot name: socializer_py3 expire_in: 1 day # Creates a version built with Python 3.7 and cx-freeze # this is going to be the current alpha version after november 27. alpha32: type: deploy tags: - windows10 before_script: - '%PYTHON3-32% -V' - '%PYTHON3-32% -m pip install --upgrade pip cx_freeze' - '%PYTHON3-32% -m pip install --upgrade -r requirements.txt' - '%PYTHON3-32% -m pip uninstall enum34 -y' script: - copy changelog.md doc\changelog.md - cd doc - '%PYTHON3-32% documentation_importer.py' - cd ..\src - '%PYTHON3-32% ..\doc\generator.py' - '%PYTHON3-32% write_version_data.py' - '%PYTHON3-32% setup.py build' - cd .. - cd scripts - '%PYTHON3-32% prepare_zipversion_cxfreeze.py' - call genpot_interface.bat - call genpot_doc.bat - cd .. - move src\socializer.zip socializer_x86.zip - move scripts\socializer.pot socializer.pot - move scripts\socializer-documentation.pot socializer-documentation.pot only: - schedules artifacts: paths: - socializer_x86.zip - socializer.pot - socializer-documentation.pot name: socializer_alpha expire_in: 1 day alpha: type: deploy tags: - windows10 before_script: - '%PYTHON3-32% -V' - '%PYTHON3-32% -m pip install --upgrade pip cx_freeze' - '%PYTHON3-32% -m pip install --upgrade -r requirements.txt' - '%PYTHON3-32% -m pip uninstall enum34 -y' script: - copy changelog.md doc\changelog.md - cd doc - '%PYTHON3-32% documentation_importer.py' - cd ..\src - '%PYTHON3-32% ..\doc\generator.py' - '%PYTHON3-32% write_version_data.py' - '%PYTHON3-32% setup.py build' - cd .. - cd scripts - '%PYTHON3-32% prepare_zipversion_cxfreeze.py' - call genpot_interface.bat - call genpot_doc.bat - cd .. - move src\socializer.zip socializer.zip - move scripts\socializer.pot socializer.pot - move scripts\socializer-documentation.pot socializer-documentation.pot only: - schedules artifacts: paths: - socializer.zip - socializer.pot - socializer-documentation.pot name: socializer_alpha expire_in: 1 day ### This is commented because there is no 64 bits version of enchant, thus pyenchant will not work. ### I will reenable this when we will get rid of enchant, probably in favour of symspellpy # Creates a version built with Python 3.7 and cx-freeze # this is going to be the current alpha version after november 27. .alpha64: type: deploy tags: - windows10 before_script: - '%PYTHON3-64% -V' - '%PYTHON3-64% -m pip install --upgrade pip cx_freeze' - '%PYTHON3-64% -m pip install --upgrade -r requirements.txt' - '%PYTHON3-64% -m pip uninstall enum34 -y' script: - copy changelog.md doc\changelog.md - cd doc - '%PYTHON3-64% documentation_importer.py' - cd ..\src - '%PYTHON3-64% ..\doc\generator.py' - '%PYTHON3-64% write_version_data.py' - '%PYTHON3-64% setup.py build' - cd .. - cd scripts - '%PYTHON3-64% prepare_zipversion_cxfreeze.py' - call genpot_interface.bat - call genpot_doc.bat - cd .. - move src\socializer.zip socializer_x64.zip - move scripts\socializer.pot socializer.pot - move scripts\socializer-documentation.pot socializer-documentation.pot only: - schedules artifacts: paths: - socializer_x64.zip - socializer.pot - socializer-documentation.pot name: socializer_alpha expire_in: 1 day # Generates a new stable version of the application every tag. stable: type: deploy tags: - windows before_script: - '%PYTHON3-32% -V' - '%PYTHON3-32% -m pip install --upgrade pip' - '%PYTHON3-32% -m pip install --upgrade -r requirements.txt' - '%PYTHON3-32% -m pip uninstall enum34 -y' script: - copy changelog.md doc\changelog.md - cd doc - '%PYTHON3-32% documentation_importer.py' - cd ..\src - '%PYTHON3-32% ..\doc\generator.py' - '%PYTHON3-32% write_version_data.py' - '%PYTHON3-32% setup.py build' - '%NSIS% installer.nsi' - cd .. - move src\socializer* . - cd scripts - '%PYTHON3-32% prepare_zipversion_cxfreeze.py' - cd .. - move src\socializer.zip socializer.zip - '%PYTHON3-32% scripts/upload.py' only: - tags