This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
/
.travis.yml
87 lines (85 loc) · 3.28 KB
/
.travis.yml
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
language: c
dist: trusty # Travis build machine is Ubuntu Trusty 14.04 x64
sudo: required # A sudo enabled, full VM is used for building instead of a docker container
services:
- docker
branches:
only:
- master
addons:
apt:
packages:
- pkg-config
- make
- bison
- g++
- rpm
- librpm-dev
- libpam0g-dev
- libssl-dev
- libmysqlclient-dev
- curl
- libcurl4-gnutls-dev
- zlib1g
- zlib1g-dev
- openssl
script:
- # Fetch the Build-PowerShell-DSC-for-Linux repository for dependencies to build from
- git config --global 'url.https://github.com/.insteadOf' '[email protected]:'
- git clone --recursive 'https://github.com/Microsoft/Build-PowerShell-DSC-for-Linux.git' ../bld-dsc
-
- # Master branch for all submodules
- cd ../bld-dsc
- git submodule foreach git checkout master
-
- # Patch in the version of PowerShell-DSC-for-Linux that Travis gave to us
- rm -rf dsc
- cp -R ../Power?hell-DSC-for-Linux dsc
- PS_DIR=$(cd .; pwd -P)
- DSC_DIR=$(cd ./dsc; pwd -P)
- OMI_ROOT=$(cd ./omi/Unix; pwd -P)
# BUILD default DSC
- cd ${DSC_DIR}/build
- ./configure --noenable-ulinux
- make local
- cd ../omi*
- sudo make install
- cd ../
- sudo make reg
# Build DSC for OMS
#- docker pull abenbachir/oms-centos6-x64:latest || true
# - docker run --rm -t -v ${PS_DIR}:/OMS abenbachir/oms-centos6-x64:latest /bin/sh -c "cd /OMS/omi/Unix; ./configure --enable-microsoft --enable-ulinux; make all"
# - docker run --rm -t -v ${PS_DIR}:/OMS abenbachir/oms-centos6-x64:latest /bin/sh -c "cd /OMS/dsc; ./configure --oms; ln -fs /OMS/omi/Unix /OMS/dsc/omi-1.0.8; cd /OMS/omi/Unix; rm -rf output; ln -s output_openssl_1.0.0 output"
# - docker run --rm -t -v ${PS_DIR}:/OMS abenbachir/oms-centos6-x64:latest /bin/sh -c "cd /OMS/omi/Unix; make -C /OMS/dsc dsc100"
# - docker run --rm -t -v ${PS_DIR}:/OMS abenbachir/oms-centos6-x64:latest /bin/sh -c "cd /OMS/omi/Unix; make -C /OMS/dsc dsckit100"
# - docker run --rm -t -v ${PS_DIR}:/OMS abenbachir/oms-centos6-x64:latest /bin/sh -c "cd /OMS/dsc; make distclean"
- # Python tests for 2.6x-2.7x
- cd /opt/omi-*/share/dsc/Scripts/2.6x-2.7x/Scripts/Tests/
- sudo python ./test_nxProviders.py 2> /dev/null
-
- # Python tests for 3.x
- cd /opt/omi-*/share/dsc/Scripts/3.x/Scripts/Tests/
- sudo python3 ./test_nxProviders.py 2> /dev/null
-
- # Python tests for 2.4x-2.5x
- cd /tmp
- wget -q https://www.python.org/ftp/python/2.4.6/Python-2.4.6.tgz
- tar -xzf Python-2.4.6.tgz
- cd Python-2.4.6
- ./configure &> /dev/null
- sed -i "s/#zlib/zlib/" Modules/Setup
- sed -i "s/#_socket/_socket/" Modules/Setup
- sed -i "s/#_ssl _ssl/_ssl _ssl/" Modules/Setup
- sed -i "s/#\t-DUSE_SSL/\t-DUSE_SSL/" Modules/Setup
- sed -i "s/#\t-L\$(SSL)/\t-L\$(SSL)/" Modules/Setup
- sed -i "s/#md5/md5/" Modules/Setup
- sed -i "s/#sha/sha/" Modules/Setup
- make &> /dev/null
- sudo make altinstall &> /dev/null
- cd ..
- wget -q --no-check-certificate https://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.tar.gz
- tar -xzf ctypes-1.0.2.tar.gz
- cd ctypes-1.0.2
- sudo python2.4 ./setup.py build install &> /dev/null
- cd /opt/omi-*/share/dsc/Scripts/2.4x-2.5x/Scripts/Tests/
- sudo python2.4 ./test_nxProviders.py 2> /dev/null