forked from coin3d/coin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
69 lines (68 loc) · 3.83 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Build configuration for Coin3D/coin package creation and upload.
#
# For automatic artifacts upload into the Downloads
# directory in the repository owner settings:
# - application password with write capabilities on the BitBucket project
# - secured environment variable named BB_AUTH_STRING containing:
# <repo owner>:<application password>
# -----
# The custom docker image from Docker Hub must contain all the pre-reqs for
# the project plus mercurial binaries.
pipelines:
custom: # manual trigger
manual-trigger:
# debian build
- step:
image: ggabbiani/coin:debian
script:
- mkdir target
- cd target
- cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DHAVE_MULTIPLE_VERSION=ON -DCOIN_BUILD_DOCUMENTATION_QTHELP=ON -DCOIN_THREADSAFE=ON -DCOIN_BUILD_TESTS=OFF
- make
#- make test
# creates debian's package with build number equal to the number of commits on the source branch
- cd cpack.d
- cpack --config debian.cmake
# pack the artifacts into a single tarball
- tar -czf debian-build-$(hg id --num --rev tip).tgz $(cat artifacts.list) artifacts.list
# creates 'last' archive
- cp debian-build-$(hg id --num --rev tip).tgz debian-build.tgz
# uploads both resulting tarballs to the download area
- curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"debian-build.tgz" --form files=@"debian-build-$(hg id --num --rev tip).tgz"
# fedora build
- step:
image: ggabbiani/coin:fedora
script:
- mkdir target
- cd target
- cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DHAVE_MULTIPLE_VERSION=ON -DCOIN_BUILD_DOCUMENTATION_QTHELP=ON -DCOIN_THREADSAFE=ON -DCOIN_BUILD_TESTS=OFF
- make
#- make test
# creates package rpms with build number equal to the number of commits on the source branch
- cd cpack.d
- cpack --config fedora.cmake
# pack the artifacts into a single tarball
- tar -czf fedora-build-$(hg id --num --rev tip).tgz $(cat artifacts.list) artifacts.list
# creates 'last' archive
- cp fedora-build-$(hg id --num --rev tip).tgz fedora-build.tgz
# uploads both resulting tarballs to the download area
- curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"fedora-build.tgz" --form files=@"fedora-build-$(hg id --num --rev tip).tgz"
# ubuntu build
- step:
image: ggabbiani/coin:ubuntu
script:
- mkdir target
- cd target
- cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DHAVE_MULTIPLE_VERSION=ON -DCOIN_BUILD_DOCUMENTATION_QTHELP=ON -DCOIN_THREADSAFE=ON -DCOIN_BUILD_TESTS=OFF
- make
#- make test
# creates debian's package with build number equal to the number of commits on the source branch
# for ubuntu images just use the debian cpack config
- cd cpack.d
- cpack --config debian.cmake
# pack the artifacts into a single tarball
- tar -czf ubuntu-build-$(hg id --num --rev tip).tgz $(cat artifacts.list) artifacts.list
# creates 'last' archive
- cp ubuntu-build-$(hg id --num --rev tip).tgz ubuntu-build.tgz
# uploads both resulting tarballs to the download area
- curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"ubuntu-build.tgz" --form files=@"ubuntu-build-$(hg id --num --rev tip).tgz"