File: ci-build

package info (click to toggle)
schroot 1.6.13-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,628 kB
  • sloc: cpp: 21,758; sh: 1,019; ansic: 231; makefile: 77
file content (46 lines) | stat: -rwxr-xr-x 913 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
#!/bin/sh
# Test commit

set -e
set -x

cmake_version_major=3
cmake_version_minor=8
cmake_version_patch=2

download_cmake()
{
  if [ ! -d downloads ]; then
    (
      mkdir downloads
      cd downloads
      wget https://cmake.org/files/v${cmake_version_major}.${cmake_version_minor}/cmake-${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}-Linux-x86_64.tar.gz
    )
  fi
}

unpack_cmake()
{
  tar xf downloads/cmake-${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}-Linux-x86_64.tar.gz
  echo "$(pwd)/cmake-${cmake_version_major}.${cmake_version_minor}.${cmake_version_patch}-Linux-x86_64/bin"
}

cpp()
{
    (
        rm -rf build
        mkdir build
        cd build
        cmake -Dtest=ON .. || cat CMakeFiles/CMakeError.log
        make
        fakeroot ctest -V
        make DESTDIR=../install install
    )
}


download_cmake
PATH="$(unpack_cmake):$PATH"
cpp

exit 0