tg2sip/appveyor.yml

75 lines
2.5 KiB
YAML
Raw Normal View History

2018-10-04 07:25:40 +00:00
version: 1.0.0+{build}
image:
2019-02-14 15:45:48 +00:00
- Ubuntu
2018-11-21 17:35:36 +00:00
services:
- docker
2018-10-04 07:25:40 +00:00
configuration: Release
platform: x64
environment:
2018-11-21 17:35:36 +00:00
global:
docker_image: infactum/tg2sip-builder
2018-10-04 07:25:40 +00:00
matrix:
2018-11-21 17:35:36 +00:00
- target_name: Ubuntu Bionic
docker_tag: bionic
- target_name: CentOS 7
docker_tag: centos7
2018-10-04 07:25:40 +00:00
2019-02-24 12:20:44 +00:00
- target_name: AppImage
docker_tag: centos6
2018-10-04 07:25:40 +00:00
init:
- sh: |
2019-02-16 06:30:54 +00:00
docker pull "$docker_image":"$docker_tag"
2018-11-21 17:35:36 +00:00
2019-07-07 18:29:52 +00:00
build_script:
2018-10-04 07:25:40 +00:00
- sh: >-
2019-03-01 18:29:38 +00:00
if [ "$target_name" != "AppImage" ] ; then
2018-10-04 08:46:25 +00:00
mkdir build;
2019-02-16 06:30:54 +00:00
docker run --rm -v "$(pwd)":/src "$docker_image":"$docker_tag" /bin/bash -c "
2018-10-04 07:25:40 +00:00
mkdir build && cd build;
2019-02-24 06:24:56 +00:00
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig && cmake -DCMAKE_BUILD_TYPE=Release /src;
2018-10-04 07:25:40 +00:00
cmake --build .;
2018-10-04 08:46:25 +00:00
chmod +x tg2sip;
chmod +x gen_db;
cp tg2sip /src/build;
2019-02-24 12:20:44 +00:00
cp gen_db /src/build;"
2018-10-04 08:55:50 +00:00
7z a tg2sip.zip ./build/tg2sip ./build/gen_db ./settings.ini;
2019-03-01 18:29:38 +00:00
fi;
2018-10-04 07:25:40 +00:00
2019-03-01 18:29:38 +00:00
- sh: >-
if [ "$target_name" = "AppImage" ] ; then
2019-02-24 12:20:44 +00:00
mkdir build;
docker run --rm -v "$(pwd)":/src "$docker_image":"$docker_tag" /bin/bash -c "
mkdir build && cd build;
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig && cmake -DCMAKE_BUILD_TYPE=Release /src;
cmake --build .;
chmod +x tg2sip;
chmod +x gen_db;
linuxdeploy --appdir /src/build/tg2sip -e tg2sip;
2019-03-01 18:29:38 +00:00
linuxdeploy --appdir /src/build/gen_db -e gen_db;"
2019-02-24 12:20:44 +00:00
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool.AppImage;
chmod +x appimagetool.AppImage;
2019-03-01 18:29:38 +00:00
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O linuxdeploy.AppImage;
2019-02-24 12:20:44 +00:00
chmod +x linuxdeploy.AppImage;
2019-03-01 18:29:38 +00:00
sudo chown -R "$(id -u)":"$(id -g)" ./build;
./linuxdeploy.AppImage --appdir ./build/tg2sip -d ./buildenv/tg2sip.desktop -i ./buildenv/icon.svg;
./linuxdeploy.AppImage --appdir ./build/gen_db -d ./buildenv/gen_db.desktop -i ./buildenv/icon.svg;
./appimagetool.AppImage ./build/tg2sip;
./appimagetool.AppImage ./build/gen_db;
7z a tg2sip.zip ./tg2sip-x86_64.AppImage ./gen_db-x86_64.AppImage ./settings.ini;
fi;
2019-02-24 12:20:44 +00:00
2018-10-04 07:25:40 +00:00
after_build:
2019-02-24 12:20:44 +00:00
- sh: >-
if [ "$target_name" != "AppImage" ] ; then
appveyor PushArtifact tg2sip.zip -FileName tg2sip_"$docker_tag".zip -DeploymentName "TG2SIP $target_name"
else
appveyor PushArtifact tg2sip.zip -FileName tg2sip.zip -DeploymentName "TG2SIP AppImage"
fi