1 Star 0 Fork 1

arci/scopefun-software

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.gitlab-ci.yml 6.27 KB
一键复制 编辑 原始数据 按行查看 历史
Dejan 提交于 2024-01-19 08:45 . mac universal binary build
stages:
- exe
- ftp
#-------------------------------------------------------------------------------
# exe
#-------------------------------------------------------------------------------
Build-Exe:
stage: exe
environment:
name: win
tags:
- ScopeFun
needs: []
artifacts:
name: "ScopeFun-Win64"
paths:
- sfExe/*.exe
- sfExe/*.sha512
- sfExe/source/*.pyd
expire_in: 1 day
cache:
key: $CI_COMMIT_REF_SLUG
untracked: true
allow_failure: true
script:
- $env:Path += ";C:\msys64\mingw64\bin;C:\msys64\usr\bin;"
- Set-Alias -Name python3 -Value python
- powershell New-Item -ItemType Directory -name sfExe\source -Force
- cd lib/libusb-1.0.25
- bash aclocal
- bash automake
- cd ..
- cd ..
- cd sfExe
- powershell Remove-Item *.exe
- powershell Remove-Item *.sha512
- powershell Remove-Item .\source\*.pyd
- cmake -G "MinGW Makefiles" -DSCOPEFUN_VERSION_MAJOR="$VERSION_MAJOR" -DSCOPEFUN_VERSION_MINOR="$VERSION_MINOR" -DSCOPEFUN_VERSION_MICRO="$VERSION_MICRO" -DSCOPEFUN_BUILD_TYPE="Release" -DCPACK_SOURCE_ZIP="false" -DPython_EXECUTABLE="$Python_EXECUTABLE" -DPython_LIBRARY="$Python_LIBRARY" -DPython_INCLUDE_DIR="$DPython_INCLUDE_DIR" -S .. -B .
- mingw32-make package
only:
- master
- develop
Build-Exe-Linux:
stage: exe
environment:
name: linux
tags:
- ScopeFunLinux
needs: []
artifacts:
name: "ScopeFun-Linux64"
paths:
- sfExe/*.deb
- sfExe/*.sha512
- sfExe/source/*.so
expire_in: 1 day
cache:
key: $CI_COMMIT_REF_SLUG
untracked: true
allow_failure: true
image: ubuntu:22.04
script:
- ln -snf /usr/share/zoneinfo/Europe/Ljubljana /etc/localtime && echo Europe/Ljubljana > /etc/timezone
- apt-get update
- apt-get -y install cmake protobuf-compiler
- apt-get -y install build-essential
- apt-get -y install libgtk-3-dev
- apt-get -y install libudev-dev
- apt-get -y install libgl1-mesa-dev
- apt-get -y install autoconf
- apt-get -y install automake
- apt-get -y install libxxf86vm-dev
- apt-get -y install python3.10-dev
- cd lib/libusb-1.0.25
- aclocal
- automake
- cd ..
- cd ..
- mkdir -p sfExe
- cd sfExe
- rm -f *.deb
- rm -f *.sha512
- rm -f ./source/*.so
- chmod +x ../lib/libusb-1.0.25/install-sh
- cmake -G "Unix Makefiles" -D SCOPEFUN_VERSION_MAJOR="$VERSION_MAJOR" -D SCOPEFUN_VERSION_MINOR="$VERSION_MINOR" -D SCOPEFUN_VERSION_MICRO="$VERSION_MICRO" -D SCOPEFUN_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
only:
- master
- develop
Build-Exe-Mac:
stage: exe
environment:
name: mac
tags:
- ScopeFunMac
needs: []
cache:
key: $CI_COMMIT_REF_SLUG
untracked: true
artifacts:
name: "ScopeFun-Mac64"
paths:
- sfExe/*Darwin.dmg
- sfExe/*Darwin.dmg.sha512
- sfExe/source/*.so
expire_in: 1 day
allow_failure: true
script:
- mkdir -p sfExe
- cd sfExe
- rm -f *.dmg
- rm -f *.sha512
- rm -f ./source/*.so
- chmod +x ../lib/libusb-1.0.25/install-sh
- export CFLAGS="-arch arm64 -arch x86_64 -mmacosx-version-min=10.15"
- export MACOSX_DEPLOYMENT_TARGET=10.15
- PATH="/Applications/CMake.app/Contents/bin":"$PATH"
- cmake -G "Unix Makefiles" -DSCOPEFUN_VERSION_MAJOR="$VERSION_MAJOR" -DSCOPEFUN_VERSION_MINOR="$VERSION_MINOR" -DSCOPEFUN_VERSION_MICRO="$VERSION_MICRO" -DSCOPEFUN_BUILD_TYPE="Release" -DCPACK_BINARY_DRAGNDROP="true" -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -S .. -B .
- make package
only:
- master
- develop
#-------------------------------------------------------------------------------
# ftp
#-------------------------------------------------------------------------------
Upload-Ftp:
stage: ftp
environment:
name: win
tags:
- ScopeFun
needs:
- Build-Exe
cache: {}
dependencies:
- Build-Exe
script:
- $COMMIT_TIME = git show -s --format=%ct
- New-Item -ItemType Directory $COMMIT_TIME\Windows
- copy .\sfExe\*.exe $COMMIT_TIME\Windows
- copy .\sfExe\*.sha512 $COMMIT_TIME\Windows
- copy .\sfExe\source\*.pyd $COMMIT_TIME\Windows
- winscp /ini=nul /command "open ftp://${FTP_USERNAME}:[email protected]/" "cd Versions" "put $COMMIT_TIME" "close" "exit"
when: always
only:
- master
- develop
Upload-Ftp-Linux:
stage: ftp
environment:
name: linux
tags:
- ScopeFunLinux
needs:
- Build-Exe-Linux
cache: {}
dependencies:
- Build-Exe-Linux
image: ubuntu:20.04
script:
- apt-get update
- apt-get -y install git
- apt-get -y install ncftp
- 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 ./sfExe/source/*.so $COMMIT_TIME/Linux
- ncftpput -z -R -u $FTP_USERNAME -p $FTP_PASSWORD ftp.scopefun.com Versions $COMMIT_TIME
when: always
only:
- master
- develop
Upload-Ftp-Mac:
stage: ftp
environment:
name: mac
tags:
- ScopeFunMac
needs:
- Build-Exe-Mac
cache: {}
dependencies:
- Build-Exe-Mac
script:
- 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 ./sfExe/source/*.so $COMMIT_TIME/Mac
- ncftpput -z -R -u $FTP_USERNAME -p $FTP_PASSWORD ftp.scopefun.com Versions $COMMIT_TIME
when: always
only:
- master
- develop
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/arci/scopefun-software.git
[email protected]:arci/scopefun-software.git
arci
scopefun-software
scopefun-software
master

搜索帮助