summaryrefslogtreecommitdiffstats
path: root/tests/build.yml
blob: 859262632b7183679f06244e01bda40c4141a41d (plain)
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
version: "3"
services:
  dev:
    build:
      context: ..
      dockerfile: ${DOCKERFILE}
    image: hicn-base
    stdin_open: true
    tty: true
    working_dir: /workspace
    container_name: dev
    hostname: dev
    environment:
      - BUILD_SOFTWARE
    volumes:
      - ..:/workspace:z
    entrypoint: [/bin/bash, -ex, -c]
    command:
      - |
        whoami

        if [[ "${BUILD_SOFTWARE}" -ne 1 ]]; then
          exit 0
        fi

        if [[ ! -z "${REBUILD}" ]]; then
          rm -fr build-dev
        fi

        git config --global --add safe.directory \*

        mkdir -p build-dev
        cd build-dev
        cmake -G Ninja \
              -DCMAKE_INSTALL_PREFIX=/usr \
              -DCMAKE_BUILD_TYPE=Release \
              -DBUILD_APPS=ON \
              -DBUILD_TESTS=ON \
              -DENABLE_RELY=OFF \
              -DBUILD_HICNPLUGIN=ON ..
        sudo ninja install