.gitlab-ci.yml 4.44 KB
Newer Older
1 2 3 4 5 6 7 8 9
stages:
  - configure
  - build
  - dist
  - pack

configure:win32:
  stage: configure
  script:
Victor Yacovlev's avatar
Victor Yacovlev committed
10
    - md build
11 12 13 14 15 16 17
    - set QMAKESPEC=win32-msvc2015
    - set INCLUDE=
    - set LIB=
    - set LIBPATH=
    - call vsvars32.bat
    - call vcvars32.bat
    - cd build
Victor Yacovlev's avatar
Victor Yacovlev committed
18
    - cmake -Wno-dev -DCMAKE_PREFIX_PATH="%QTDIR%\lib\cmake" -DQt5_DIR="%QTDIR%\lib\cmake\Qt5" -DUSE_QT=5 -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=%PYTHON_EXECUTABLE% -G "NMake Makefiles" ..
19 20
  tags:
    - windows
Victor Yacovlev's avatar
Victor Yacovlev committed
21
  cache:
Victor Yacovlev's avatar
Victor Yacovlev committed
22
    key: $CI_PIPELINE_ID
Victor Yacovlev's avatar
Victor Yacovlev committed
23
    untracked: true
Victor Yacovlev's avatar
Victor Yacovlev committed
24
    paths:
Victor Yacovlev's avatar
Victor Yacovlev committed
25
      - build/
26 27 28 29

build:win32:
  stage: build
  script:
Victor Yacovlev's avatar
Victor Yacovlev committed
30
    - cd build
31 32 33 34 35 36 37 38 39
    - set QMAKESPEC=win32-msvc2016
    - set INCLUDE=
    - set LIB=
    - set LIBPATH=
    - call vsvars32.bat
    - call vcvars32.bat
    - nmake
  tags:
    - windows
Victor Yacovlev's avatar
Victor Yacovlev committed
40
  cache:
Victor Yacovlev's avatar
Victor Yacovlev committed
41
    key: $CI_PIPELINE_ID
Victor Yacovlev's avatar
Victor Yacovlev committed
42 43 44
    untracked: true
    paths:
      - build/
45 46 47 48

dist:win32:
  stage: dist
  script:
Victor Yacovlev's avatar
Victor Yacovlev committed
49
    - cd build
Victor Yacovlev's avatar
Victor Yacovlev committed
50 51
    - md kumir2-master-%CI_PIPELINE_ID%\
    - md kumir2-master-%CI_PIPELINE_ID%\bin\
Victor Yacovlev's avatar
Victor Yacovlev committed
52 53
    - md kumir2-master-%CI_PIPELINE_ID%\lib\
    - md kumir2-master-%CI_PIPELINE_ID%\share\
Victor Yacovlev's avatar
Victor Yacovlev committed
54 55 56
    - xcopy /Y /S /E bin kumir2-master-%CI_PIPELINE_ID%\bin
    - xcopy /Y /S /E lib kumir2-master-%CI_PIPELINE_ID%\lib
    - xcopy /Y /S /E share kumir2-master-%CI_PIPELINE_ID%\share
Victor Yacovlev's avatar
Victor Yacovlev committed
57
    - copy /Y  ..\LICENSE_RU.rtf kumir2-master-%CI_PIPELINE_ID%\
Victor Yacovlev's avatar
Victor Yacovlev committed
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
    - copy /Y  %QTDIR%\bin\icudt54.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\icuin54.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\icuuc54.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Core.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Declarative.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Gui.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Multimedia.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5MultimediaWidgets.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Network.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5OpenGL.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Positioning.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5PrintSupport.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Qml.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Quick.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Script.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Sensors.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Sql.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Svg.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Widgets.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Xml.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5XmlPatterns.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - md kumir2-master-%CI_PIPELINE_ID%\bin\platforms
    - copy /Y  %QTDIR%\plugins\platforms\qminimal.dll kumir2-master-%CI_PIPELINE_ID%\bin\platforms\
    - copy /Y  %QTDIR%\plugins\platforms\qwindows.dll kumir2-master-%CI_PIPELINE_ID%\bin\platforms\
    - copy /Y  %QTDIR%\plugins\platforms\qoffscreen.dll kumir2-master-%CI_PIPELINE_ID%\bin\platforms\
    - copy /Y  %VC_REDIST_DIR%\x86\Microsoft.VC140.CRT\*.dll kumir2-master-%CI_PIPELINE_ID%\bin\
    - upx -9 kumir2-master-%CI_PIPELINE_ID%\bin\*.exe
    - upx -9 kumir2-master-%CI_PIPELINE_ID%\bin\*.dll
    - md kumir2-master-%CI_PIPELINE_ID%\src
Victor Yacovlev's avatar
Victor Yacovlev committed
87
    - call %PYTHON_EXECUTABLE% scripts\get_bundle_name.py --prefix=git@20archive@20--out=kumir2-master-%CI_PIPELINE_ID%\src\kumir2- --suffix=.src.zip@20--format=zip@20-9@20HEAD --out=run_git_archive.cmd
Victor Yacovlev's avatar
Victor Yacovlev committed
88 89
    - copy /Y  kumir2.nsi kumir2-master-%CI_PIPELINE_ID%\
    - copy /Y  kumir2.nsi kumir2-master-%CI_PIPELINE_ID%\src\
Victor Yacovlev's avatar
Victor Yacovlev committed
90
    - call %PYTHON_EXECUTABLE% scripts\query_version_info.py --mode=nsis_include_file --out=kumir2-master-%CI_PIPELINE_ID%\nsis_version_info.nsh
Victor Yacovlev's avatar
Victor Yacovlev committed
91
    - copy /Y  kumir2-master-%CI_PIPELINE_ID%\outfilename.nsh kumir2-master-%CI_PIPELINE_ID%\src\
92
    - run_git_archive.cmd
Victor Yacovlev's avatar
Victor Yacovlev committed
93
    - copy /Y  kumir2.nsi kumir2-master-%CI_PIPELINE_ID%\
94 95
  tags:
    - windows
Victor Yacovlev's avatar
Victor Yacovlev committed
96
  cache:
Victor Yacovlev's avatar
Victor Yacovlev committed
97
    key: $CI_PIPELINE_ID
Victor Yacovlev's avatar
Victor Yacovlev committed
98
    untracked: true
Victor Yacovlev's avatar
Victor Yacovlev committed
99
    paths:
Victor Yacovlev's avatar
Victor Yacovlev committed
100
      - build/
101 102 103 104

pack:win32:
  stage: pack
  script:
Victor Yacovlev's avatar
Victor Yacovlev committed
105
    - cd build
Victor Yacovlev's avatar
Victor Yacovlev committed
106
    - cd kumir2-master-%CI_PIPELINE_ID%
Victor Yacovlev's avatar
Victor Yacovlev committed
107
    - call %NSIS_EXECUTABLE% kumir2.nsi
Victor Yacovlev's avatar
Victor Yacovlev committed
108
    - move /Y kumir2-master-%CI_PIPELINE_ID%-install.exe ..\
109 110
  tags:
    - windows