Commit 06eb111b authored by David Košenina's avatar David Košenina
parents 2fcf45ca bb5b3629
stages:
- build-exe
- zip-source
- upload-ftp
- exe
- zip
- ftp
variables:
VERSION_MAJOR : "2"
VERSION_MINOR : "0"
VERSION_MICRO : "1"
#-------------------------------------------------------------------------------
# exe
#-------------------------------------------------------------------------------
Build-Exe:
stage: build-exe
stage: exe
environment:
name: win
tags:
- ScopeFun
artifacts:
......@@ -12,50 +23,203 @@ Build-Exe:
paths:
- sfExe/*.exe
- sfExe/*.sha512
expire_in: 1 day
cache:
key: "%CI_COMMIT_REF_SLUG%"
untracked: true
allow_failure: true
script:
- powershell New-Item -ItemType Directory -name sfExe -Force
- cd sfExe
- cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" -D CPACK_SOURCE_ZIP="false" -S .. -B .
- 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 .
- set "PATH=%PATH%;c:\msys\1.0\bin"
- mingw32-make package
Zip-Source:
stage: zip-source
Build-Exe-Mac:
stage: exe
environment:
name: mac
tags:
- ScopeFun
- ScopeFunMac
cache:
key: "%CI_JOB_NAME%"
key: "${CI_COMMIT_REF_SLUG}"
untracked: true
dependencies: []
artifacts:
name: "ScopeFun-Mac64"
paths:
- sfExe/*.dmg
- sfExe/*.sha512
expire_in: 1 day
allow_failure: true
script:
- mkdir -p sfExe
- cd sfExe
- chmod +x ../lib/wxWidgets-3.0.4/src/stc/gen_iface.py
- chmod +x ../lib/libusb-1.0.22/install-sh
- PATH="/Applications/CMake.app/Contents/bin":"$PATH"
- 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.
- make package
Build-Exe-Linux:
stage: exe
environment:
name: linux
tags:
- ScopeFunLinux
artifacts:
name: "ScopeFun-Linux64"
paths:
- sfExe/*.deb
- sfExe/*.sha512
expire_in: 1 day
cache:
key: "$CI_COMMIT_REF_SLUG"
untracked: true
allow_failure: true
script:
- mkdir -p sfExe
- cd sfExe
- 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" ..
- make package
#-------------------------------------------------------------------------------
# zip
#-------------------------------------------------------------------------------
Zip-Source:
stage: zip
environment:
name: win
tags:
- ScopeFun
cache: {}
allow_failure: true
artifacts:
name: "ScopeFun-Src-Win"
paths:
- sfSrc/*.7z
- sfSrc/*.sha512
expire_in: 1 day
script:
- powershell New-Item -ItemType Directory -name sfSrc -Force
- cd sfSrc
- cmake -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE="Release" -D CPACK_SOURCE_ZIP="false" -S .. -B .
- set "PATH=%PATH%;c:\msys\1.0\bin"
- mingw32-make package_source
when: always
Zip-Source-Linux:
stage: zip
environment: linux
tags:
- ScopeFunLinux
cache: {}
artifacts:
name: "ScopeFun-Src-Linux"
paths:
- sfSrc/*.gz
- sfSrc/*.sha512
expire_in: 1 day
dependencies: []
allow_failure: true
script:
- mkdir -p sfSrc
- cd sfSrc
- cmake -G "Unix Makefiles" -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" ..
- make package_source
when: always
Zip-Source-Mac:
stage: zip
environment:
name: mac
tags:
- ScopeFunMac
cache: {}
artifacts:
name: "ScopeFun-Src-Mac"
paths:
- sfSrc/*.gz
- sfSrc/*.sha512
expire_in: 1 day
dependencies: []
allow_failure: true
script:
- mkdir -p sfSrc
- cd sfSrc
- PATH="/Applications/CMake.app/Contents/bin":"$PATH"
- cmake -G "Unix Makefiles" -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 .
- make package_source
when: always
#-------------------------------------------------------------------------------
# ftp
#-------------------------------------------------------------------------------
Upload-Ftp-Linux:
stage: ftp
environment:
name: linux
tags:
- ScopeFunLinux
cache: {}
dependencies:
- Build-Exe-Linux
- Zip-Source-Linux
script:
- cd sfSrc
- COMMIT_TIME=$(git show -s --format=%ct $CI_COMMIT_SHA)
- 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
- ncftpput -z -R -u $FTP_USERNAME -p $FTP_PASSWORD ftp.scopefun.com Versions $COMMIT_TIME
when: always
Upload-Ftp-Mac:
stage: ftp
environment:
name: mac
tags:
- ScopeFunMac
cache: {}
dependencies:
- Build-Exe-Mac
- Zip-Source-Mac
script:
- cd sfSrc
- COMMIT_TIME=$(git show -s --format=%ct $CI_COMMIT_SHA)
- 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
- ncftpput -z -R -u $FTP_USERNAME -p $FTP_PASSWORD ftp.scopefun.com Versions $COMMIT_TIME
when: always
Upload-Ftp:
stage: upload-ftp
stage: ftp
environment:
name: win
tags:
- ScopeFun
dependencies: []
cache: {}
dependencies:
- Build-Exe
- Zip-Source
script:
- cd sfSrc
- powershell get-date -format {yyyyMMdd} > date.txt
- powershell get-date -format {HHmmss} > time.txt
- set /p date=<date.txt
- set /p time=<time.txt
- mkdir Windows\%date%-%time%
- copy %cd%\..\sfExe\*.exe Windows\%date%-%time%
- copy %cd%\..\sfExe\*.sha512 Windows\%date%-%time%
- copy *.7z Windows\%date%-%time%
- copy *.sha512 Windows\%date%-%time%
- git show -s --pretty=format:%%ct %CI_COMMIT_SHA%>commit_time.txt
- set /p COMMIT_TIME=<commit_time.txt
- 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
- winscp /ini=nul /command "open ftp://%FTP_USERNAME%:%FTP_PASSWORD%@ftp.scopefun.com/ "^
"cd Versions"^
"cd Windows"^
"put Windows\%date%-%time%"^
"put %COMMIT_TIME%"^
"close"^
"exit"
\ No newline at end of file
"exit"
when: always
\ No newline at end of file
......@@ -80,7 +80,7 @@ externalproject_add(Python2716
PREFIX ${CMAKE_SOURCE_DIR}/lib/Python-2.7.16
BINARY_DIR ${CMAKE_SOURCE_DIR}/lib/Python-2.7.16/sfBuild${SCOPEFUN_TYPE}
SOURCE_DIR ${CMAKE_SOURCE_DIR}/lib/Python-2.7.16
CONFIGURE_COMMAND sh ../configure --enable-framework
CONFIGURE_COMMAND sh ../configure --enable-framework --with-pic
BUILD_COMMAND make
UPDATE_COMMAND ""
INSTALL_COMMAND ""
......
......@@ -53,7 +53,7 @@ target_compile_definitions(sfAPI PRIVATE SCOPEFUN_EXPORT )
# link sfAPI
if(SCOPEFUN_MACOSX)
target_link_libraries(sfAPI ${SCOPEFUN_LIBS} ${SCOPEFUN_LIB_LINK_PYTHON}/Python.framework )
target_link_libraries(sfAPI ${SCOPEFUN_LIBS} ${SCOPEFUN_LIB_LINK_PYTHON}/libpython2.7.a )
else()
if(SCOPEFUN_LINUX)
target_link_libraries(sfAPI ${SCOPEFUN_LIBS} ${SCOPEFUN_LIB_LINK_PYTHON}/libpython2.7.a )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment