File: build-linux.yml

package info (click to toggle)
mapcache 1.14.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,844 kB
  • sloc: ansic: 33,609; xml: 889; sh: 183; makefile: 61; python: 48
file content (80 lines) | stat: -rw-r--r-- 2,689 bytes parent folder | download | duplicates (2)
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
70
71
72
73
74
75
76
77
78
79
80
name: Build MapCache on Linux
on: [ push, pull_request ]

jobs:

    build-matrix:
      strategy:
        matrix:
          os: [ ubuntu-20.04 ]
          option: [ minimal, default, maximal ]
      runs-on: ${{ matrix.os }}
      steps:
        - name: Checkout repository
          uses: actions/checkout@v2

        - name: Install dependencies
          run: |
            if [[ 'minimal,default,maximal' =~ ${{ matrix.option }} ]]
            then
              sudo apt-get update -y
              sudo apt-get upgrade -y
              sudo apt-get install -y libcurl4-openssl-dev apache2-dev
            fi
            if [[ 'default,maximal' =~ ${{ matrix.option }} ]]
            then
              sudo apt-get install -y libgdal-dev libfcgi-dev libpixman-1-dev
              sudo apt-get install -y gdal-bin libxml2-utils
            fi
            if [[ 'maximal' =~ ${{ matrix.option }} ]]
            then
              sudo apt-get install -y libhiredis-dev libdb-dev libmapserver-dev libpcre2-dev
            fi

        - name: Build MapCache
          run: |
            if [[ 'minimal' == ${{ matrix.option }} ]]
            then
              options="-DWITH_SQLITE=OFF \
                       -DWITH_PIXMAN=OFF \
                       -DWITH_GDAL=OFF \
                       -DWITH_APACHE=OFF \
                       -DWITH_CGI=OFF \
                       -DWITH_OGR=OFF \
                       -DWITH_GEOS=OFF \
                       -DWITH_MAPCACHE_DETAIL=OFF"
            elif [[ 'default' == ${{ matrix.option }} ]]
            then
              options=""
            elif [[ 'maximal' == ${{ matrix.option }} ]]
            then
              options="-DWITH_POSTGRESQL=ON \
                       -DWITH_BERKELEY_DB=ON \
                       -DWITH_MEMCACHE=ON \
                       -DWITH_REDIS=ON \
                       -DWITH_TIFF=ON \
                       -DWITH_TIFF_WRITE_SUPPORT=ON \
                       -DWITH_GEOTIFF=ON \
                       -DWITH_PCRE=OFF \
                       -DWITH_PCRE2=ON \
                       -DWITH_MAPSERVER=ON \
                       -DWITH_RIAK=OFF"
            fi
            mkdir build
            cd build
            cmake ${options} ${{ github.workspace }}
            make
            sudo make install
            sudo ldconfig

        - name: Run tests
          run: |
            if [[ 'ubuntu-20.04' == ${{ matrix.os }} ]] \
               && [[ 'default' == ${{ matrix.option }} ]]
            then
              cd ${{ github.workspace }}/tests
              ./setup.sh
              ./run.sh
            else
              echo No test performed on this target
            fi