.gitlab-ci.yml 4.8 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
    - set QMAKESPEC=win32-msvc2016
    - set INCLUDE=
    - set LIB=
    - set LIBPATH=
    - call vsvars32.bat
    - call vcvars32.bat
Victor Yacovlev's avatar
Victor Yacovlev committed
37
    - set CL=/MP
38 39 40
    - nmake
  tags:
    - windows
Victor Yacovlev's avatar
Victor Yacovlev committed
41
  cache:
Victor Yacovlev's avatar
Victor Yacovlev committed
42
    key: $CI_PIPELINE_ID
Victor Yacovlev's avatar
Victor Yacovlev committed
43 44 45
    untracked: true
    paths:
      - build/
46 47 48 49

dist:win32:
  stage: dist
  script:
Victor Yacovlev's avatar
Victor Yacovlev committed
50
    - cd build
51 52 53 54 55 56 57 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
    - md kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\
    - md kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - md kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\lib\
    - md kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\share\
    - xcopy /Y /S /E bin kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin
    - xcopy /Y /S /E lib kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\lib
    - xcopy /Y /S /E share kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\share
    - copy /Y  ..\LICENSE_RU.rtf kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\
    - copy /Y  %QTDIR%\bin\Qt5Core.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Gui.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Multimedia.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5MultimediaWidgets.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Network.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5OpenGL.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Positioning.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5PrintSupport.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Qml.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Quick.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Script.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Sensors.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Sql.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Svg.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Widgets.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5Xml.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - copy /Y  %QTDIR%\bin\Qt5XmlPatterns.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - md kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\platforms
    - copy /Y  %QTDIR%\plugins\platforms\qminimal.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\platforms\
    - copy /Y  %QTDIR%\plugins\platforms\qwindows.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\platforms\
    - copy /Y  %QTDIR%\plugins\platforms\qdirect2d.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\platforms\
    - copy /Y  %QTDIR%\plugins\platforms\qoffscreen.dll kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\platforms\
    - xcopy /Y /S /E  "%VC_REDIST_DIR%\x86\Microsoft.VC140.CRT\*.dll" kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\bin\
    - md kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\src
Victor Yacovlev's avatar
Victor Yacovlev committed
83
    - cd ..
84 85 86 87 88
    - call %PYTHON_EXECUTABLE% scripts\get_bundle_name.py --prefix=git@20archive@20--out=build\kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\src\kumir2- --suffix=.src.zip@20--format=zip@20-9@20HEAD --out=run_git_archive.cmd
    - copy /Y  kumir2.nsi build\kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\
    - copy /Y  kumir2.nsi build\kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\src\
    - call %PYTHON_EXECUTABLE% scripts\query_version_info.py --mode=nsis_include_file --out=build\kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\nsis_version_info.nsh
    - copy /Y  build\kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\nsis_version_info.nsh build\kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%\src\
89 90 91
    - run_git_archive.cmd
  tags:
    - windows
Victor Yacovlev's avatar
Victor Yacovlev committed
92
  cache:
Victor Yacovlev's avatar
Victor Yacovlev committed
93
    key: $CI_PIPELINE_ID
Victor Yacovlev's avatar
Victor Yacovlev committed
94
    untracked: true
Victor Yacovlev's avatar
Victor Yacovlev committed
95
    paths:
Victor Yacovlev's avatar
Victor Yacovlev committed
96
      - build/
97 98 99 100

pack:win32:
  stage: pack
  script:
Victor Yacovlev's avatar
Victor Yacovlev committed
101
    - cd build
102
    - cd kumir2-%CI_COMMIT_REF_NAME%-%CI_PIPELINE_ID%
Victor Yacovlev's avatar
Victor Yacovlev committed
103
    - call "%NSIS_EXECUTABLE%" kumir2.nsi
104
    - move /Y kumir2-*-install.exe ..\..\
Victor Yacovlev's avatar
Victor Yacovlev committed
105 106 107 108 109
  cache:
    key: $CI_PIPELINE_ID
    untracked: true
    paths:
      - build/
Victor Yacovlev's avatar
Victor Yacovlev committed
110 111 112
  artifacts:
    paths:
      - kumir2-*-install.exe
113 114
  tags:
    - windows