.gitlab-ci.yml 7.85 KB
Newer Older
David Košenina's avatar
David Košenina committed
1
stages:
David Košenina's avatar
David Košenina committed
2 3 4
  - exe
  - zip
  - ftp
David Košenina's avatar
David Košenina committed
5
  
David Košenina's avatar
David Košenina committed
6
#-------------------------------------------------------------------------------
David Košenina's avatar
David Košenina committed
7
# exe 
David Košenina's avatar
David Košenina committed
8
#-------------------------------------------------------------------------------
David Košenina's avatar
David Košenina committed
9

David Košenina's avatar
David Košenina committed
10
Build-Exe:
David Košenina's avatar
David Košenina committed
11
    stage: exe
David Košenina's avatar
David Košenina committed
12 13
    environment: 
        name: win
David Košenina's avatar
David Košenina committed
14 15
    tags:
        - ScopeFun
David Košenina's avatar
David Košenina committed
16
    artifacts:
David Košenina's avatar
David Košenina committed
17
      name: "ScopeFun-Win64"
David Košenina's avatar
David Košenina committed
18
      paths: 
David Košenina's avatar
David Košenina committed
19 20
         - sfExe/*.exe
         - sfExe/*.sha512
David Košenina's avatar
David Košenina committed
21
      expire_in: 1 day
David Košenina's avatar
David Košenina committed
22
    cache:
David Košenina's avatar
David Košenina committed
23
        key: "%CI_COMMIT_REF_SLUG%"
David Košenina's avatar
David Košenina committed
24
        untracked: true
David Košenina's avatar
David Košenina committed
25
    allow_failure: true
David Košenina's avatar
David Košenina committed
26
    script:
David Košenina's avatar
David Košenina committed
27 28
        - powershell New-Item -ItemType Directory -name sfExe -Force
        - cd sfExe
David Košenina's avatar
David Košenina committed
29 30
        - powershell Remove-Item *.exe
        - powershell Remove-Item *.sha512
David Košenina's avatar
David Košenina committed
31
        - cmake -G "MinGW Makefiles" -D SCOPEFUN_VERSION_MAJOR="%VERSION_MAJOR%" -D SCOPEFUN_VERSION_MINOR="%VERSION_MINOR%" -D SCOPEFUN_VERSION_MICRO="%VERSION_MICRO%" -D CMAKE_BUILD_TYPE="Release" -D CPACK_SOURCE_ZIP="false" -S .. -B .
David Košenina's avatar
David Košenina committed
32
        - set "PATH=%PATH%;c:\msys\1.0\bin"
David Košenina's avatar
David Košenina committed
33
        - mingw32-make package
David Košenina's avatar
David Košenina committed
34 35
    only:
        - master
David Košenina's avatar
David Košenina committed
36

David Košenina's avatar
David Košenina committed
37
Build-Exe-Mac:
David Košenina's avatar
David Košenina committed
38
    stage: exe
David Košenina's avatar
David Košenina committed
39 40
    environment: 
        name: mac
David Košenina's avatar
David Košenina committed
41 42
    tags:
        - ScopeFunMac
David Košenina's avatar
David Košenina committed
43 44 45
    cache:
        key: "${CI_COMMIT_REF_SLUG}"
        untracked: true
David Košenina's avatar
David Košenina committed
46 47 48
    artifacts:
      name: "ScopeFun-Mac64"
      paths: 
Dejan Priversek's avatar
Dejan Priversek committed
49 50
         - sfExe/*Darwin.dmg
         - sfExe/*Darwin.dmg.sha512
David Košenina's avatar
David Košenina committed
51
      expire_in: 1 day
David Košenina's avatar
David Košenina committed
52
    allow_failure: true
David Košenina's avatar
David Košenina committed
53
    script:
David Košenina's avatar
David Košenina committed
54
        - mkdir -p sfExe
David Košenina's avatar
David Košenina committed
55
        - cd sfExe
David Košenina's avatar
David Košenina committed
56 57
        - rm -f *.dmg
        - rm -f *.sha512
David Košenina's avatar
David Košenina committed
58
        - chmod +x ../lib/wxWidgets-3.0.4/src/stc/gen_iface.py
David Košenina's avatar
David Košenina committed
59
        - chmod +x ../lib/libusb-1.0.22/install-sh
David Košenina's avatar
David Košenina committed
60
        - PATH="/Applications/CMake.app/Contents/bin":"$PATH"
David Košenina's avatar
David Košenina committed
61
        - cmake -G "Unix Makefiles" -D SCOPEFUN_VERSION_MAJOR="$VERSION_MAJOR" -D SCOPEFUN_VERSION_MINOR="$VERSION_MINOR" -D SCOPEFUN_VERSION_MICRO="$VERSION_MICRO" -D CMAKE_BUILD_TYPE="Release" -D CMAKE_VERBOSE_MAKEFILE="true" -D CPACK_BINARY_DRAGNDROP="true" -S "$CI_BUILDS_DIR.." -B.
David Košenina's avatar
David Košenina committed
62
        - make package
David Košenina's avatar
David Košenina committed
63 64
    only:
        - master
David Košenina's avatar
David Košenina committed
65

David Košenina's avatar
David Košenina committed
66
Build-Exe-Linux:
David Košenina's avatar
David Košenina committed
67
    stage: exe
David Košenina's avatar
David Košenina committed
68 69
    environment: 
        name: linux
David Košenina's avatar
David Košenina committed
70 71 72 73 74 75 76
    tags:
        - ScopeFunLinux
    artifacts:
      name: "ScopeFun-Linux64"
      paths: 
         - sfExe/*.deb
         - sfExe/*.sha512
David Košenina's avatar
David Košenina committed
77
      expire_in: 1 day
David Košenina's avatar
David Košenina committed
78
    cache:
David Košenina's avatar
David Košenina committed
79
        key: "$CI_COMMIT_REF_SLUG"
David Košenina's avatar
David Košenina committed
80
        untracked: true
David Košenina's avatar
David Košenina committed
81
    allow_failure: true
David Košenina's avatar
David Košenina committed
82
    script:
David Košenina's avatar
David Košenina committed
83
        - mkdir -p sfExe
David Košenina's avatar
David Košenina committed
84
        - cd sfExe
David Košenina's avatar
David Košenina committed
85 86
        - rm -f *.deb
        - rm -f *.sha512
Dejan Priversek's avatar
Dejan Priversek committed
87
        - chmod +x ../lib/wxWidgets-3.0.4/src/stc/gen_iface.py
David Košenina's avatar
David Košenina committed
88
        - cmake -G "Unix Makefiles" -D SCOPEFUN_VERSION_MAJOR="$VERSION_MAJOR" -D SCOPEFUN_VERSION_MINOR="$VERSION_MINOR" -D SCOPEFUN_VERSION_MICRO="$VERSION_MICRO" -D CMAKE_BUILD_TYPE="Release" -D CPACK_BINARY_DEB="true" -D CPACK_BINARY_TZ="false" -D CPACK_BINARY_TGZ="false" -D CPACK_BINARY_STGZ="false" ..
David Košenina's avatar
David Košenina committed
89
        - make package
David Košenina's avatar
David Košenina committed
90 91
    only:
        - master
David Košenina's avatar
David Košenina committed
92

David Košenina's avatar
David Košenina committed
93 94 95 96
#-------------------------------------------------------------------------------
# zip 
#-------------------------------------------------------------------------------

David Košenina's avatar
David Košenina committed
97
Zip-Source:
David Košenina's avatar
David Košenina committed
98
    stage: zip
David Košenina's avatar
David Košenina committed
99 100
    environment: 
        name: win
David Košenina's avatar
David Košenina committed
101 102
    tags:
        - ScopeFun
David Košenina's avatar
David Košenina committed
103
    cache: {}
David Košenina's avatar
David Košenina committed
104
    allow_failure: true
David Košenina's avatar
David Košenina committed
105 106 107 108 109
    artifacts:
      name: "ScopeFun-Src-Win"
      paths: 
         - sfSrc/*.7z
         - sfSrc/*.sha512
David Košenina's avatar
David Košenina committed
110
      expire_in: 1 day
David Košenina's avatar
David Košenina committed
111 112 113
    script:
        - powershell New-Item -ItemType Directory -name sfSrc -Force
        - cd sfSrc
David Košenina's avatar
David Košenina committed
114 115
        - powershell Remove-Item *.7z
        - powershell Remove-Item *.sha512
David Košenina's avatar
David Košenina committed
116
        - cmake -G "MinGW Makefiles" -D SCOPEFUN_VERSION_MAJOR="%VERSION_MAJOR%" -D SCOPEFUN_VERSION_MINOR="%VERSION_MINOR%" -D SCOPEFUN_VERSION_MICRO="%VERSION_MICRO%" -D CMAKE_BUILD_TYPE="Release" -D CPACK_SOURCE_ZIP="false" -S .. -B .
David Košenina's avatar
David Košenina committed
117
        - set "PATH=%PATH%;c:\msys\1.0\bin"
David Košenina's avatar
David Košenina committed
118
        - mingw32-make package_source
David Košenina's avatar
David Košenina committed
119
    when: always
David Košenina's avatar
David Košenina committed
120 121
    only:
        - master
David Košenina's avatar
David Košenina committed
122
        
David Košenina's avatar
David Košenina committed
123
Zip-Source-Linux:
David Košenina's avatar
David Košenina committed
124
    stage: zip
David Košenina's avatar
David Košenina committed
125
    environment: linux
David Košenina's avatar
David Košenina committed
126 127
    tags:
        - ScopeFunLinux
David Košenina's avatar
David Košenina committed
128
    cache: {}
David Košenina's avatar
David Košenina committed
129 130 131
    artifacts:
      name: "ScopeFun-Src-Linux"
      paths: 
David Košenina's avatar
David Košenina committed
132
         - sfSrc/*.gz
David Košenina's avatar
David Košenina committed
133
         - sfSrc/*.sha512
David Košenina's avatar
David Košenina committed
134
      expire_in: 1 day
David Košenina's avatar
David Košenina committed
135
    dependencies: []
David Košenina's avatar
David Košenina committed
136
    allow_failure: true
David Košenina's avatar
David Košenina committed
137
    script:
David Košenina's avatar
David Košenina committed
138
        - mkdir -p sfSrc
David Košenina's avatar
David Košenina committed
139
        - cd sfSrc
David Košenina's avatar
David Košenina committed
140 141
        - rm -f *.gz
        - rm -f *.sha512
David Košenina's avatar
David Košenina committed
142
        - cmake -G "Unix Makefiles" -D SCOPEFUN_VERSION_MAJOR="$VERSION_MAJOR" -D SCOPEFUN_VERSION_MINOR="$VERSION_MINOR" -D SCOPEFUN_VERSION_MICRO="$VERSION_MICRO" -D CMAKE_BUILD_TYPE="Release" -D CPACK_SOURCE_ZIP="false" -D CPACK_SOURCE_RPM="false" -D CPACK_SOURCE_TBZ2="false" -D CPACK_SOURCE_TXZ="false" -D CPACK_SOURCE_TZ="false" -D CPACK_SOURCE_TGZ="true" ..
David Košenina's avatar
David Košenina committed
143
        - make package_source
David Košenina's avatar
David Košenina committed
144
    when: always
David Košenina's avatar
David Košenina committed
145 146
    only:
        - master
David Košenina's avatar
David Košenina committed
147
        
David Košenina's avatar
David Košenina committed
148
Zip-Source-Mac:
David Košenina's avatar
David Košenina committed
149
    stage: zip
David Košenina's avatar
David Košenina committed
150 151
    environment: 
        name: mac
David Košenina's avatar
David Košenina committed
152 153
    tags:
        - ScopeFunMac
David Košenina's avatar
David Košenina committed
154
    cache: {}
David Košenina's avatar
David Košenina committed
155 156 157
    artifacts:
      name: "ScopeFun-Src-Mac"
      paths: 
David Košenina's avatar
David Košenina committed
158
         - sfSrc/*.gz
David Košenina's avatar
David Košenina committed
159
         - sfSrc/*.sha512
David Košenina's avatar
David Košenina committed
160
      expire_in: 1 day
David Košenina's avatar
David Košenina committed
161
    dependencies: []
David Košenina's avatar
David Košenina committed
162
    allow_failure: true
David Košenina's avatar
David Košenina committed
163
    script:
David Košenina's avatar
David Košenina committed
164
        - mkdir -p sfSrc
David Košenina's avatar
David Košenina committed
165
        - cd sfSrc
David Košenina's avatar
David Košenina committed
166 167
        - rm -f *.gz
        - rm -f *.sha512
David Košenina's avatar
David Košenina committed
168
        - PATH="/Applications/CMake.app/Contents/bin":"$PATH"
David Košenina's avatar
David Košenina committed
169
        - cmake -G "Unix Makefiles" -D SCOPEFUN_VERSION_MAJOR="$VERSION_MAJOR" -D SCOPEFUN_VERSION_MINOR="$VERSION_MINOR" -D SCOPEFUN_VERSION_MICRO="$VERSION_MICRO" -D CMAKE_BUILD_TYPE="Release" -D CPACK_SOURCE_ZIP="false" -D CPACK_SOURCE_RPM="false" -D CPACK_SOURCE_TBZ2="false" -D CPACK_SOURCE_TXZ="false" -D CPACK_SOURCE_TZ="false" -D CPACK_SOURCE_TGZ="true" -S .. -B .
David Košenina's avatar
David Košenina committed
170
        - make package_source
David Košenina's avatar
David Košenina committed
171
    when: always
David Košenina's avatar
David Košenina committed
172 173
    only:
        - master
David Košenina's avatar
David Košenina committed
174 175
        
#-------------------------------------------------------------------------------
David Košenina's avatar
David Košenina committed
176
# ftp
David Košenina's avatar
David Košenina committed
177
#-------------------------------------------------------------------------------
David Košenina's avatar
David Košenina committed
178

David Košenina's avatar
David Košenina committed
179
Upload-Ftp-Linux:
David Košenina's avatar
David Košenina committed
180
    stage: ftp
David Košenina's avatar
David Košenina committed
181 182
    environment:
        name: linux
David Košenina's avatar
David Košenina committed
183
    tags:
David Košenina's avatar
David Košenina committed
184
        - ScopeFunLinux
David Košenina's avatar
David Košenina committed
185
    cache: {}
David Košenina's avatar
David Košenina committed
186 187 188
    dependencies:
        - Build-Exe-Linux
        - Zip-Source-Linux
David Košenina's avatar
David Košenina committed
189 190
    script:
        - cd sfSrc
David Košenina's avatar
David Košenina committed
191
        - COMMIT_TIME=$(git show -s --format=%ct $CI_COMMIT_SHA)
Dejan Priversek's avatar
Dejan Priversek committed
192 193 194 195 196
        - mkdir -p $COMMIT_TIME/Linux
        - cp ./../sfExe/*.deb     $COMMIT_TIME/Linux
        - cp ./../sfExe/*.sha512  $COMMIT_TIME/Linux
        - cp *.gz                 $COMMIT_TIME/Linux
        - cp *.sha512             $COMMIT_TIME/Linux
Dejan Priversek's avatar
Dejan Priversek committed
197
        - ncftpput -z -R -u $FTP_USERNAME -p $FTP_PASSWORD ftp.scopefun.com Versions $COMMIT_TIME
David Košenina's avatar
David Košenina committed
198
    when: always
David Košenina's avatar
David Košenina committed
199 200
    only:
        - master
David Košenina's avatar
David Košenina committed
201 202
              
Upload-Ftp-Mac:
David Košenina's avatar
David Košenina committed
203
    stage: ftp
David Košenina's avatar
David Košenina committed
204 205
    environment: 
        name: mac
David Košenina's avatar
David Košenina committed
206 207
    tags:
        - ScopeFunMac
David Košenina's avatar
David Košenina committed
208
    cache: {}
David Košenina's avatar
David Košenina committed
209 210 211
    dependencies:
        - Build-Exe-Mac
        - Zip-Source-Mac
David Košenina's avatar
David Košenina committed
212 213
    script:
        - cd sfSrc
David Košenina's avatar
David Košenina committed
214
        - COMMIT_TIME=$(git show -s --format=%ct $CI_COMMIT_SHA)
Dejan Priversek's avatar
Dejan Priversek committed
215 216 217 218 219
        - mkdir -p $COMMIT_TIME/Mac
        - cp ./../sfExe/*.dmg     $COMMIT_TIME/Mac
        - cp ./../sfExe/*.sha512  $COMMIT_TIME/Mac
        - cp *.gz                 $COMMIT_TIME/Mac
        - cp *.sha512             $COMMIT_TIME/Mac
Dejan Priversek's avatar
Dejan Priversek committed
220
        - ncftpput -z -R -u $FTP_USERNAME -p $FTP_PASSWORD ftp.scopefun.com Versions $COMMIT_TIME
David Košenina's avatar
David Košenina committed
221
    when: always
David Košenina's avatar
David Košenina committed
222 223
    only:
        - master
David Košenina's avatar
David Košenina committed
224
     
David Košenina's avatar
David Košenina committed
225
Upload-Ftp:
David Košenina's avatar
David Košenina committed
226
    stage: ftp
David Košenina's avatar
David Košenina committed
227 228
    environment: 
        name: win
David Košenina's avatar
David Košenina committed
229 230
    tags:
        - ScopeFun
David Košenina's avatar
David Košenina committed
231
    cache: {}
David Košenina's avatar
David Košenina committed
232 233 234
    dependencies:
        - Build-Exe
        - Zip-Source
David Košenina's avatar
David Košenina committed
235 236
    script:
        - cd sfSrc
Dejan Priversek's avatar
Dejan Priversek committed
237
        - git show -s --pretty=format:%%ct %CI_COMMIT_SHA%>commit_time.txt
Dejan Priversek's avatar
Dejan Priversek committed
238
        - set /p COMMIT_TIME=<commit_time.txt
Dejan Priversek's avatar
Dejan Priversek committed
239 240 241 242 243
        - mkdir %COMMIT_TIME%\Windows
        - copy %cd%\..\sfExe\*.exe     %COMMIT_TIME%\Windows
        - copy %cd%\..\sfExe\*.sha512  %COMMIT_TIME%\Windows
        - copy *.7z                    %COMMIT_TIME%\Windows
        - copy *.sha512                %COMMIT_TIME%\Windows
David Košenina's avatar
David Košenina committed
244 245
        - winscp /ini=nul /command "open ftp://%FTP_USERNAME%:%FTP_PASSWORD%@ftp.scopefun.com/ "^
                                   "cd Versions"^
Dejan Priversek's avatar
Dejan Priversek committed
246
                                   "put %COMMIT_TIME%"^
David Košenina's avatar
David Košenina committed
247
                                   "close"^
David Košenina's avatar
David Košenina committed
248
                                   "exit"
David Košenina's avatar
David Košenina committed
249 250 251
    when: always
    only:
        - master