leocad/appveyor.yml

134 lines
5.3 KiB
YAML
Raw Normal View History

2020-09-13 20:31:31 +02:00
version: '{branch}.{build}'
image:
2022-10-02 23:05:06 +02:00
- Ubuntu1604
- macos
2022-10-02 23:10:20 +02:00
- Visual Studio 2019
2020-09-13 21:23:29 +02:00
configuration: Release
platform: x64
2020-09-13 21:01:48 +02:00
2020-10-19 03:13:08 +02:00
environment:
GITHUB_TOKEN:
2023-09-20 02:19:19 +02:00
secure: WuBhTS6ZgIcyYgmDtFj3sqAnDz+9K8qQNchX0/RgYJfC7fBK9ShT8zEU3O3VNg1e
2020-10-19 03:13:08 +02:00
2022-10-02 23:05:06 +02:00
for:
-
matrix:
only:
- image: Visual Studio 2019
before_build:
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
- set PATH=C:\Qt\5.15\msvc2019_64\bin;%PATH%
- git rev-parse --short HEAD > version.txt
- set /p VERSION= < version.txt
- qmake -v
- qmake -tp vc
2020-10-19 03:03:12 +02:00
2022-10-02 23:05:06 +02:00
build:
project: leocad.vcxproj
verbosity: minimal
2020-10-19 03:03:12 +02:00
2022-10-02 23:05:06 +02:00
after_build:
- 7z a symbols.zip build/release/leocad.exe build/release/leocad.pdb
- mkdir appdir
- copy build\release\leocad.exe appdir
- copy docs\readme.md appdir\readme.txt
2023-03-19 01:03:06 +01:00
- appveyor DownloadFile https://github.com/leozide/leocad/releases/download/v21.06/Library-23.01.zip -FileName library.zip
2022-10-02 23:05:06 +02:00
- 7z e library.zip
- copy library.bin appdir\\library.bin
- appveyor DownloadFile https://github.com/leozide/povray/releases/download/continuous/povconsole32-sse2.exe -FileName appdir\povconsole32-sse2.exe
- windeployqt appdir\leocad.exe
- copy tools\setup\leocad.nsi .
- copy tools\setup\setup.ico .
- 'copy "%VCToolsRedistDir%\vcredist_x64.exe" appdir'
- '"C:\Program Files (x86)\NSIS\makensis.exe" /V4 /DX64 "/XOutFile LeoCAD-Windows-%VERSION%.exe" leocad.nsi'
- set TRAVIS_TAG=%APPVEYOR_REPO_TAG_NAME%
- set TRAVIS_REPO_SLUG=%APPVEYOR_REPO_NAME%
- set TRAVIS_COMMIT=%APPVEYOR_REPO_COMMIT%
2023-12-21 23:15:21 +01:00
- set UPLOADTOOL_ISPRERELEASE=1
2022-10-02 23:05:06 +02:00
- appveyor DownloadFile https://github.com/probonopd/uploadtool/raw/master/upload.sh
- if not defined APPVEYOR_PULL_REQUEST_NUMBER (bash upload.sh LeoCAD*.exe)
2020-10-19 03:03:12 +02:00
2022-10-02 23:05:06 +02:00
artifacts:
- path: symbols.zip
name: symbols
- path: LeoCAD-Windows-$(VERSION).exe
name: leocad
-
matrix:
only:
- image: Ubuntu1604
2022-10-02 23:54:04 +02:00
install:
2023-03-19 00:40:49 +01:00
- sudo apt-get -y install libqt5opengl5-dev libxcb-xinerama0
2022-10-02 23:54:04 +02:00
2022-10-02 23:05:06 +02:00
before_build:
2022-10-02 23:23:50 +02:00
- export PATH=$HOME/Qt/5.15/gcc_64/bin:$PATH
- export TRAVIS_TAG=$APPVEYOR_REPO_TAG_NAME
- export TRAVIS_REPO_SLUG=$APPVEYOR_REPO_NAME
- export TRAVIS_COMMIT=$APPVEYOR_REPO_COMMIT
2022-10-02 23:05:06 +02:00
build_script:
- qmake PREFIX=/usr
- make
2022-10-02 23:10:20 +02:00
after_build:
2023-03-19 00:35:22 +01:00
- make install INSTALL_ROOT=AppDir
2023-03-19 01:03:06 +01:00
- appveyor DownloadFile https://github.com/leozide/leocad/releases/download/v21.06/Library-23.01.zip -FileName library.zip
2023-03-19 00:35:22 +01:00
- unzip library.zip
- mkdir -p AppDir/usr/share/leocad
- mv library.bin AppDir/usr/share/leocad/library.bin
- cp qt/leocad.desktop AppDir/leocad.desktop
- cp tools/icon/256x256/apps/leocad.png AppDir/leocad.png
- appveyor DownloadFile https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
- chmod a+x linuxdeployqt*.AppImage
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
- export VERSION=$(git rev-parse --short HEAD)
- ./linuxdeployqt*.AppImage ./AppDir/usr/share/applications/*.desktop -bundle-non-qt-libs
- ./linuxdeployqt*.AppImage --appimage-extract
- export PATH=$(readlink -f ./squashfs-root/usr/bin/):$PATH
- ./squashfs-root/usr/bin/appimagetool AppDir/
- mv ./LeoCAD-$VERSION-x86_64.AppImage ./LeoCAD-Linux-$VERSION-x86_64.AppImage
- 'curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/leozide/leocad/commits/master -o repo.txt'
- 'export REMOTE=$(grep -Po ''(?<=: \")(([a-z0-9])\w+)(?=\")'' -m 1 repo.txt)'
- export LOCAL=$(git rev-parse HEAD)
2023-12-21 23:15:21 +01:00
- export UPLOADTOOL_ISPRERELEASE=1
2023-03-19 00:35:22 +01:00
- if [[ "$REMOTE" != "$LOCAL" ]]; then echo "Build no longer current. $REMOTE vs $LOCAL - aborting upload."; exit 0; fi;
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- bash upload.sh LeoCAD*.AppImage*
2022-10-02 23:10:20 +02:00
2022-10-02 23:05:06 +02:00
-
matrix:
only:
- image: macos
2022-10-03 00:02:54 +02:00
install:
- brew install grep
2022-10-02 23:05:06 +02:00
before_build:
2022-10-02 23:23:50 +02:00
- export PATH=$HOME/Qt/5.15/clang_64/bin:$PATH
- export TRAVIS_TAG=$APPVEYOR_REPO_TAG_NAME
- export TRAVIS_REPO_SLUG=$APPVEYOR_REPO_NAME
- export TRAVIS_COMMIT=$APPVEYOR_REPO_COMMIT
2022-10-02 23:45:25 +02:00
- appveyor DownloadFile https://github.com/leozide/povray/releases/download/continuous/povray
- chmod +x povray
2023-03-19 01:03:06 +01:00
- appveyor DownloadFile https://github.com/leozide/leocad/releases/download/v21.06/Library-23.01.zip -FileName library.zip
2022-10-02 23:45:25 +02:00
- unzip library.zip
2022-10-02 23:05:06 +02:00
build_script:
- qmake PREFIX=/usr
- make
after_build:
- cd build/release
- macdeployqt LeoCAD.app -dmg
- mv LeoCAD.dmg LeoCAD-macOS-$(git rev-parse --short HEAD).dmg
- 'curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/leozide/leocad/commits/master -o repo.txt'
2022-10-03 00:02:54 +02:00
- 'export REMOTE=$(ggrep -Po ''(?<=: \")(([a-z0-9])\w+)(?=\")'' -m 1 repo.txt)'
2022-10-02 23:05:06 +02:00
- export LOCAL=$(git rev-parse HEAD)
2023-12-21 23:15:21 +01:00
- export UPLOADTOOL_ISPRERELEASE=1
2022-10-02 23:05:06 +02:00
- if [[ "$REMOTE" != "$LOCAL" ]]; then echo "Build no longer current. $REMOTE vs $LOCAL - aborting upload."; exit 0; fi;
2022-10-03 00:11:06 +02:00
- appveyor DownloadFile https://github.com/probonopd/uploadtool/raw/master/upload.sh
2022-10-02 23:05:06 +02:00
- bash upload.sh LeoCAD*.dmg*