batsim_ci.yaml 3.36 KB
Newer Older
Michael Mercier's avatar
Michael Mercier committed
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#==============================================================================
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
#==============================================================================
#
# DESCRIPTION: An applicance for batsim continuous integration (CI)
#   It contains all the dependencies mandatory for build and tests batsim
#
#==============================================================================

---
## Choose one of them the following extends

# Checkpoint only with btrfs
checkpoint: btrfs.yaml
extend: default/from_image/debian8.yaml

global:
  backend: qemu
  btrfs_volume: "/"
  virtualbox_memory_size: 2048
  qemu_memory_size : 2048
  appliance_formats: tar.gz
  appliance_tar_compression_level: fast
  setup_packages: git cmake build-essential e2fsprogs $$setup_packages
  default_keyboard_layout: fr
  default_timezone: Europe/Paris
  root_password: root
  hostname: batsim
  simctn_dir: /root

  simgrid_commit: dccf1b41e9c7b # Wed Nov 30 14:08:01 2016
  execo_commit: 725fddc

bootstrap:
  - "@base"

setup:
  #
  # General configuration
  #
  - "@base"
  - enable_root_ssh_login

  #
  # Simulator and schedulers install
  #
  - configure_apt_testing

  - install_common_deps:

    - install_build_tools:
      - exec_in: |
          apt-get -y -t testing install cmake gcc clang g++
          update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-6 100

  - simgrid_install:
    - commit_hash: $$simgrid_commit

  - batsim:
    # Need testing to be available
    - install dependencies:
      - exec_in: |
          apt-get -y -t testing install \
          libboost-all-dev \
          libgmp-dev \
          redis-server \
          libhiredis-dev \
          libev-dev \
          python-yaml \
          libssl-dev 2>&1
      # Install rapidjson (not available in jessy)
      - exec_in: |
          cd $$simctn_dir
          git clone https://github.com/miloyip/rapidjson.git
      - exec_in: |
          cd $$simctn_dir/rapidjson
          git checkout 3d5848a # v1.02
          cp -a include/rapidjson /usr/include
      - exec_in: |
          cd $$simctn_dir
          git clone https://github.com/hmartiro/redox.git
          cd redox
          git checkout 64becf28f3dd
          mkdir build
          cd build
          cmake .. -DCMAKE_INSTALL_PREFIX=../install
          make -j $(nproc)
          make install
          cd ../install
          mv -f lib64 lib
          sudo cp -r ./* /usr/
    - install_test_dependencies:
      - exec_in: apt install -y -t testing python-pip valgrind python-pandas
      - exec_in: pip2 install sortedcontainers redis
      - exec_in: |
          cd $$simctn_dir
          git clone https://github.com/mickours/execo.git
          cd execo
          git checkout $${execo_commit}
          pip install -e .
    - install_doc_dependencies:
      - exec_in: apt install -y -t testing doxygen graphviz


  - reprozip:
    - reprozip_version: 1.0.8

export:
  - "@base"
  - docker_export:
    - do_export:
      - exec_local: |
Michael Mercier's avatar
Michael Mercier committed
113
          docker import $${appliance_filename}.tar.gz oarteam/$${kameleon_recipe_name}:latest
Michael Mercier's avatar
Michael Mercier committed
114
      - exec_local: |
Michael Mercier's avatar
Michael Mercier committed
115
          docker tag oarteam/$${kameleon_recipe_name}:latest oarteam/$${kameleon_recipe_name}:$(date --iso-8601)
Michael Mercier's avatar
Michael Mercier committed
116
      - exec_local: |
Michael Mercier's avatar
Michael Mercier committed
117
118
          docker push oarteam/$${kameleon_recipe_name}:latest
          docker push oarteam/$${kameleon_recipe_name}:$(date --iso-8601)