tg2sip/appveyor.yml

80 lines
2.8 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_login: infactum
docker_password:
secure: wWPsUiEtw8rfnjX2/Y3/AA==
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: |
2018-11-21 17:35:36 +00:00
docker login -u "$docker_login" -p "$docker_password"
2019-02-16 06:30:54 +00:00
docker pull "$docker_image":"$docker_tag"
2018-11-21 17:35:36 +00:00
install:
- sh: docker build buildenv/ -f buildenv/Dockerfile."$docker_tag" --cache-from "$docker_image":"$docker_tag" -t "$docker_image":"$docker_tag"
2018-10-04 07:25:40 +00:00
build_script:
- sh: >-
2019-02-24 12:20:44 +00:00
if [ "$target_name" = "AppImage" ] ; then exit 0; fi ;
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;
2018-10-04 07:25:40 +00:00
2019-02-24 12:20:44 +00:00
- sh: >-
if [ "$target_name" != "AppImage" ] ; then exit 0; fi ;
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;
linuxdeploy --appdir /src/build/tg2sip -e gen_db;"
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool.AppImage;
chmod +x appimagetool.AppImage;
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O chmod +x linuxdeploy.AppImage;
chmod +x linuxdeploy.AppImage;
./linuxdeploy.AppImage --appdir ./build/tg2sip -d ./buildenv/app.desktop -i ./buildenv/icon.svg;
./linuxdeploy.AppImage --appdir ./build/gen_db -d ./buildenv/app.desktop -i ./buildenv/icon.svg;
./appimagetool.AppImage tg2sip;
./appimagetool.AppImage gen_db;
7z a tg2sip.zip ./build/tg2sip-x86_64.AppImage ./build/gen_db-x86_64.AppImage ./settings.ini;
2018-10-04 07:25:40 +00:00
after_build:
2018-11-21 17:35:36 +00:00
- sh: docker push "$docker_image":"$docker_tag"
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