mirror of
https://github.com/leozide/leocad
synced 2024-12-26 21:58:44 +01:00
107 lines
4.1 KiB
YAML
107 lines
4.1 KiB
YAML
language: cpp
|
|
|
|
jobs:
|
|
include:
|
|
- os: linux
|
|
name: Linux amd64
|
|
dist: xenial
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- sourceline: "ppa:beineri/opt-qt-5.15.2-xenial"
|
|
packages:
|
|
- qt515base
|
|
- qt5153d
|
|
- libgl1-mesa-dev
|
|
compiler: gcc
|
|
script:
|
|
- source /opt/qt*/bin/qt*-env.sh
|
|
- qmake PREFIX=/usr -v
|
|
- qmake PREFIX=/usr
|
|
- make -j$(nproc)
|
|
after_success:
|
|
- make install INSTALL_ROOT=AppDir
|
|
- wget https://github.com/leozide/leocad/releases/download/v19.07.1/Library-20.03.zip -O library.zip
|
|
- 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
|
|
- wget -c "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)
|
|
- 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*
|
|
|
|
- os: linux
|
|
name: Linux arm64
|
|
arch: arm64
|
|
dist: focal
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- qt5-default
|
|
- qtbase5-dev
|
|
- qttools5-dev-tools
|
|
- libqt5opengl5-dev
|
|
- zip
|
|
compiler: gcc
|
|
script:
|
|
- qmake -v
|
|
- qmake PREFIX=/usr
|
|
- make
|
|
after_success:
|
|
- cp build/release/leocad .
|
|
- export VERSION=$(git rev-parse --short HEAD)
|
|
- zip LeoCAD-Linux-$VERSION-arm64.zip leocad
|
|
- '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)
|
|
- if [[ "$REMOTE" != "$LOCAL" ]]; then echo "Build no longer current. $REMOTE vs $LOCAL - aborting upload."; travis_terminate 0; fi;
|
|
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
|
- bash upload.sh LeoCAD*.zip
|
|
|
|
- os: osx
|
|
name: macOS
|
|
osx_image: xcode11
|
|
compiler: clang
|
|
addons:
|
|
homebrew:
|
|
packages:
|
|
- grep
|
|
- qt5
|
|
install:
|
|
- brew link --force qt5
|
|
- wget https://github.com/leozide/povray/releases/download/continuous/povray
|
|
- chmod +x povray
|
|
- wget https://github.com/leozide/leocad/releases/download/v19.07.1/Library-20.03.zip -O library.zip
|
|
- unzip library.zip
|
|
script:
|
|
- qmake -v
|
|
- qmake
|
|
- make -j$(sysctl -n hw.ncpu)
|
|
after_success:
|
|
- 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'
|
|
- 'export REMOTE=$(ggrep -Po ''(?<=: \")(([a-z0-9])\w+)(?=\")'' -m 1 repo.txt)'
|
|
- export LOCAL=$(git rev-parse HEAD)
|
|
- 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*.dmg*
|
|
|
|
branches:
|
|
except:
|
|
- # Do not build tags that we create when we upload to GitHub Releases
|
|
- /^(?i:continuous)/
|