Skip to content

Commit ac5976c

Browse files
committed
Deploy travis builds as github releases
1 parent b382d2d commit ac5976c

File tree

3 files changed

+35
-34
lines changed

3 files changed

+35
-34
lines changed

.travis.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
11
sudo: required
2-
32
language: cpp
43
services:
5-
- docker
6-
4+
- docker
75
env:
86
global:
97
secure: X7BkOUOR2nt35IxLFFmpTPAVcgQ/SuSbuanXAheDj1tY4F+7MgEl/kDa+QV0mNG3EIvRhkY4+pmcBjgux8SF4MfPiFPD7XG7V0LPbHRWEWfzLIzJkVeErA8IAqwI0/IWQXEOOmQ9ElRygaKX1Tdot1piV99DSw+eGhtLnGIedKo=
10-
118
before_install:
12-
- docker pull ubuntu:16.04
13-
- docker pull ubuntu:14.04
14-
9+
- docker pull ubuntu:16.04
10+
- docker pull ubuntu:14.04
1511
script:
16-
- docker build --build-arg BINTRAYKEY=$BINTRAYKEY --build-arg TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER -f ./Dockerfile-ubuntu16.04 .
17-
- docker build --build-arg BINTRAYKEY=$BINTRAYKEY --build-arg TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER -f ./Dockerfile-ubuntu14.04 .
18-
12+
- docker build --tag qhttpserver-ubuntu16 --build-arg BINTRAYKEY=$BINTRAYKEY --build-arg TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER
13+
-f ./Dockerfile-ubuntu16.04 .
14+
- docker build --tag qhttpserver-ubuntu14 --build-arg BINTRAYKEY=$BINTRAYKEY --build-arg TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER
15+
-f ./Dockerfile-ubuntu14.04 .
16+
after_success:
17+
- docker run -t -d qhttpserver-ubuntu16
18+
- docker cp $(docker ps -n 1 -q):/src/qhttpserver/build/qhttpserver-0.0.1-Linux.deb
19+
$HOME/qhttpserver-0.0.1-ubuntu16.deb
20+
- docker run -t -d qhttpserver-ubuntu14
21+
- docker cp $(docker ps -n 1 -q):/src/qhttpserver/build/qhttpserver-0.0.1-Linux.deb
22+
$HOME/qhttpserver-0.0.1-ubuntu14.deb
23+
before_deploy:
24+
- git config --local user.name "Gael de Chalendar"
25+
- git config --local user.email "kleag@free.fr"
26+
- git tag "$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)"
27+
deploy:
28+
provider: releases
29+
api_key:
30+
secure: F16J7J9a+VNEBwSiAksWxnF7c1M8Zg0+Tg8WGRRYy2p5aqR83Gj8/3M+SIPNw/Dzxj8+Sid1QkIZ42jISzoDKO3bJ0cX7ymqGy3bwqMMsue6l2TAa/heJKpaGroyLtjZRgD2pGtHigC8W1BOEz+5KhVBwWAYDF92TpluvyklGoA=
31+
file_glob: true
32+
file: $HOME/*.deb
33+
skip_cleanup: true
34+
on:
35+
repo: aymara/qhttpserver
36+
tags: false
37+
all_branches: true

Dockerfile-ubuntu14.04

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,13 @@ ARG TRAVIS_JOB_NUMBER
55

66
# Setup
77
RUN apt-get update -y -qq
8-
RUN apt-get install -y apt-utils -qq
9-
RUN apt-get install -y git gcc g++ autotools-dev dh-autoreconf cmake cmake-data curl -qq
10-
RUN apt-get install -y qt5-default qtbase5-dev-tools qtdeclarative5-dev -qq
11-
RUN apt-get update -y -qq
8+
RUN apt-get install -y apt-utils git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev -qq
129
RUN mkdir -p /src/
1310
RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver
1411

1512
RUN mkdir -p /src/qhttpserver/build
1613

1714
# Build
1815
WORKDIR /src/qhttpserver/build
19-
RUN cmake ..
20-
RUN make -j4
21-
RUN make package
22-
RUN curl -T /src/qhttpserver/build/qhttpserver-0.0.1-Linux.deb \
23-
-ukleag:$BINTRAYKEY \
24-
https://api.bintray.com/content/kleag/ubuntu-14.04/qhttpserver/$TRAVIS_JOB_NUMBER/$TRAVIS_JOB_NUMBER/qhttpserver-0.0.1-Linux.deb
25-
RUN curl -XPOST -ukleag:$BINTRAYKEY \
26-
https://api.bintray.com/content/kleag/ubuntu-14.04/qhttpserver/$TRAVIS_JOB_NUMBER/publish
16+
RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
17+
RUN ninja package

Dockerfile-ubuntu16.04

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,13 @@ ARG TRAVIS_JOB_NUMBER
55

66
# Setup
77
RUN apt-get update -y -qq
8-
RUN apt-get install -y apt-utils -qq
9-
RUN apt-get install -y git gcc g++ autotools-dev dh-autoreconf cmake cmake-data curl -qq
10-
RUN apt-get install -y qt5-default qtbase5-dev-tools qtdeclarative5-dev -qq
11-
RUN apt-get update -y -qq
8+
RUN apt-get install -y apt-utils git gcc g++ cmake cmake-data ninja-build qt5-default qtbase5-dev-tools qtdeclarative5-dev -qq
129
RUN mkdir -p /src/
1310
RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver
1411

1512
RUN mkdir -p /src/qhttpserver/build
1613

1714
# Build
1815
WORKDIR /src/qhttpserver/build
19-
RUN cmake ..
20-
RUN make -j4
21-
RUN make package
22-
RUN curl -T /src/qhttpserver/build/qhttpserver-0.0.1-Linux.deb \
23-
-ukleag:$BINTRAYKEY \
24-
https://api.bintray.com/content/kleag/ubuntu-16.04/qhttpserver/$TRAVIS_JOB_NUMBER/$TRAVIS_JOB_NUMBER/qhttpserver-0.0.1-Linux.deb
25-
RUN curl -XPOST -ukleag:$BINTRAYKEY \
26-
https://api.bintray.com/content/kleag/ubuntu-16.04/qhttpserver/$TRAVIS_JOB_NUMBER/publish
16+
RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
17+
RUN ninja package

0 commit comments

Comments
 (0)