File: bitbucket-pipelines.yml

package info (click to toggle)
soqt 1.6.0~ea5cd76+ds1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 11,056 kB
  • sloc: sh: 11,393; cpp: 8,650; makefile: 8,649; perl: 863; ansic: 329
file content (69 lines) | stat: -rw-r--r-- 3,950 bytes parent folder | download
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/soqt package creation and upload.
#
# For automatical 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/soqt:debian
          script:
            - mkdir target
            - cd target
            - cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DHAVE_MULTIPLE_VERSION=ON -DCOIN_QT_HELP=ON -DCOIN_THREADSAFE=ON -DSIMAGE_RUNTIME_LINKING=ON -DCOIN_BUILD_TESTS=OFF
            - make
            #- make test
            # creates package debians 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/soqt:fedora
          script:
            - mkdir target
            - cd target
            - cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DHAVE_MULTIPLE_VERSION=ON -DCOIN_QT_HELP=ON -DCOIN_THREADSAFE=ON -DSIMAGE_RUNTIME_LINKING=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/soqt:ubuntu
          script:
            - mkdir target
            - cd target
            - cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DHAVE_MULTIPLE_VERSION=ON -DCOIN_QT_HELP=ON -DCOIN_THREADSAFE=ON -DSIMAGE_RUNTIME_LINKING=ON -DCOIN_BUILD_TESTS=OFF
            - make
            #- make test
            # creates package debians 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"