2017-03-30 22:47:59 +03:00
|
|
|
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
|
2019-11-27 00:17:47 +03:00
|
|
|
services:
|
|
|
|
- docker
|
2017-03-30 22:47:59 +03:00
|
|
|
branches:
|
|
|
|
only:
|
2017-04-11 23:21:32 +03:00
|
|
|
- master
|
2017-03-30 22:47:59 +03:00
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- pkg-config
|
|
|
|
- make
|
|
|
|
- bison
|
|
|
|
- g++
|
|
|
|
- rpm
|
|
|
|
- librpm-dev
|
|
|
|
- libpam0g-dev
|
|
|
|
- libssl-dev
|
|
|
|
- libmysqlclient-dev
|
|
|
|
- curl
|
|
|
|
- libcurl4-gnutls-dev
|
2017-04-11 23:21:32 +03:00
|
|
|
- zlib1g
|
|
|
|
- zlib1g-dev
|
|
|
|
- openssl
|
2017-03-30 22:47:59 +03:00
|
|
|
|
|
|
|
script:
|
|
|
|
- # Fetch the Build-PowerShell-DSC-for-Linux repository for dependencies to build from
|
|
|
|
- git config --global 'url.https://github.com/.insteadOf' 'git@github.com:'
|
|
|
|
- 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
|
2019-11-27 00:17:47 +03:00
|
|
|
- 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
|
2017-03-30 22:47:59 +03:00
|
|
|
- ./configure --noenable-ulinux
|
|
|
|
- make local
|
|
|
|
- cd ../omi*
|
|
|
|
- sudo make install
|
|
|
|
- cd ../
|
|
|
|
- sudo make reg
|
2019-11-27 00:17:47 +03:00
|
|
|
# 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"
|
2017-04-11 23:21:32 +03:00
|
|
|
- # Python tests for 2.6x-2.7x
|
2017-03-30 22:47:59 +03:00
|
|
|
- cd /opt/omi-*/share/dsc/Scripts/2.6x-2.7x/Scripts/Tests/
|
2017-04-11 23:21:32 +03:00
|
|
|
- sudo python ./test_nxProviders.py 2> /dev/null
|
2017-09-30 00:45:29 +03:00
|
|
|
-
|
2017-04-11 23:21:32 +03:00
|
|
|
- # Python tests for 3.x
|
|
|
|
- cd /opt/omi-*/share/dsc/Scripts/3.x/Scripts/Tests/
|
|
|
|
- sudo python3 ./test_nxProviders.py 2> /dev/null
|
2017-09-30 00:45:29 +03:00
|
|
|
-
|
2017-04-11 23:21:32 +03:00
|
|
|
- # 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 ..
|
2021-10-29 23:11:31 +03:00
|
|
|
- wget -q --no-check-certificate https://sourceforge.net/projects/ctypes/files/ctypes/1.0.2/ctypes-1.0.2.tar.gz
|
2017-04-11 23:21:32 +03:00
|
|
|
- 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
|