Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Azure Linux/SonarCloud jobs to work with new build #482

Merged
merged 1 commit into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 105 additions & 23 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Azure CI build file
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema


trigger:
batch: true
branches:
include:
- master
- ci-test

pr:
autoCancel: true
branches:
include:
- master

jobs:
# ------------------------------------------------------------------------------
Expand All @@ -14,12 +28,34 @@ jobs:
- job: Linux
strategy:
matrix:
CentOS 7 VFX CY2019:
CentOS 7 gcc VFX CY2019:
agentImage: 'ubuntu-16.04'
containerImage: aswfstaging/ci-base:2019
cxxCompiler: g++
cCompiler: gcc
installSh: ''
installSh: |
sudo share/ci/scripts/linux/install_cmake.sh 3.12.4
# CentOS 7 gcc VFX CY2020:
# agentImage: 'ubuntu-16.04'
# containerImage: aswfstaging/ci-base:2020
# cxxCompiler: g++
# cCompiler: gcc
# installSh: |
# sudo share/ci/scripts/linux/install_cmake.sh 3.12.4
CentOS 7 Clang 7 VFX CY2019:
agentImage: 'ubuntu-16.04'
containerImage: aswfstaging/ci-base:2019
cxxCompiler: clang++
cCompiler: clang
installSh: |
sudo share/ci/scripts/linux/install_cmake.sh 3.12.4
# CentOS 7 Clang 7 VFX CY2020:
# agentImage: 'ubuntu-16.04'
# containerImage: aswfstaging/ci-base:2020
# cxxCompiler: clang++
# cCompiler: clang
# installSh: |
# sudo share/ci/scripts/linux/install_cmake.sh 3.12.4
pool:
vmImage: $(agentImage)
container: $[ variables['containerImage'] ]
Expand All @@ -30,7 +66,6 @@ jobs:
displayName: Install dependencies
condition: and(succeeded(), variables['installSh'])


- template: share/ci/templates/configure.yml
parameters:
cxxCompiler: $(cxxCompiler)
Expand All @@ -49,26 +84,6 @@ jobs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test*.xml'
failTaskOnFailedTests: true
#pool:
# vmImage: 'ubuntu-16.04'
# container: aswfstaging/ci-base:2019
# steps:
# - bash: |
# mkdir _build
# cd _build
# cmake -DOPENEXR_BUILD_VIEWERS=OFF ..
# echo "Working directory $PWD"
# export LD_LIBRARY_PATH=$PWD/IlmBase/Half:$PWD/IlmBase/IlmThread:$PWD/IlmBase/Iex:$PWD/IlmBase/IexMath:$PWD/IlmBase/Imath:$PWD/OpenEXR/IlmImf:$PWD/OpenEXR/IlmImfUtil:$LD_LIBRARY_PATH
# echo `ls $PWD/IlmBase/Half`
# echo $LD_LIBRARY_PATH
# echo "Hello World"
# make -j4
# echo `ls $PWD/IlmBase/Half`
# displayName: Build
# - bash: |
# cd _build
# ctest -T Test --output-on-failure -VV -E PyImathNumpyTest
# displayName: Test

# ------------------------------------------------------------------------------
# SonarCloud static analysis
Expand All @@ -82,6 +97,8 @@ jobs:

steps:
- template: share/ci/templates/checkout.yml
- bash: sudo share/ci/scripts/linux/install_cmake.sh 3.12.4
displayName: Install dependencies
- template: share/ci/templates/configure.yml
parameters:
cxxFlags: -g -O0 -fprofile-arcs -ftest-coverage
Expand All @@ -91,5 +108,70 @@ jobs:

- template: share/ci/templates/build_sonar.yml

# ------------------------------------------------------------------------------
# macOS
# ------------------------------------------------------------------------------
#- job: macOS
# strategy:
# matrix:
# 10.14 AppleClang 10.0:
# agentImage: 'macOS-10.14'
# 10.13 AppleClang 10.0:
# agentImage: 'macOS-10.13'
# pool:
# vmImage: $(agentImage)

# steps:
# - template: share/ci/templates/checkout.yml
# - bash: |
# share/ci/scripts/macos/install.sh
# share/ci/scripts/macos/install_python.sh 2.7.16
# displayName: Install dependencies

# - template: share/ci/templates/configure.yml
# parameters:
# cmakeOpts: |
# -DPYTHON_INCLUDE_DIR=$(python-config --prefix)/include/python2.7 \
# -DPYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.dylib \
# -DPYTHON_EXECUTABLE=$(which python2)

# - template: share/ci/templates/build.yml
# parameters:
# cmakeOpts: -- -j4

# ------------------------------------------------------------------------------
# Windows
# ------------------------------------------------------------------------------
#- job: Windows
# strategy:
# matrix:
# 2016 MSVC 14.16:
# agentImage: 'vs2017-win2016'
# buildSharedLibs: ON
# 2016 MSVC 14.16 (Static):
# agentImage: 'vs2017-win2016'
# buildSharedLibs: OFF
# 2012 MSVC 14.0:
# agentImage: 'vs2015-win2012r2'
# buildSharedLibs: ON
# pool:
# vmImage: $(agentImage)

# steps:
# - template: share/ci/templates/checkout.yml
# - powershell: |
# share/ci/scripts/windows/install_python.ps1 2.7.16
# share/ci/scripts/windows/install_cmake.ps1 3.14.4
# displayName: Install dependencies
#
# - template: share/ci/templates/configure.yml
# parameters:
# buildSharedLibs: $(buildSharedLibs)
# verbose: ON
# cmakeOpts: |
# -DCMAKE_GENERATOR_PLATFORM=x64 \
# -DPYTHON_EXECUTABLE=$(which python)
#
# - template: share/ci/templates/build.yml


29 changes: 29 additions & 0 deletions share/ci/scripts/linux/install_boost.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

set -ex

BOOST_VERSION="$1"
BOOST_MAJOR_MINOR=$(echo "${BOOST_VERSION}" | cut -d. -f-2)
BOOST_MAJOR=$(echo "${BOOST_VERSION}" | cut -d. -f-1)
BOOST_MINOR=$(echo "${BOOST_MAJOR_MINOR}" | cut -d. -f2-)
BOOST_PATCH=$(echo "${BOOST_VERSION}" | cut -d. -f3-)
BOOST_VERSION_U="${BOOST_MAJOR}_${BOOST_MINOR}_${BOOST_PATCH}"

mkdir _boost
cd _boost

wget -q https://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_U}.tar.gz
tar -xzf boost_${BOOST_VERSION_U}.tar.gz

cd boost_${BOOST_VERSION_U}
sh bootstrap.sh
./b2 install -j4 variant=release toolset=gcc \
--with-system \
--with-regex \
--with-filesystem \
--with-thread \
--with-python \
--prefix=/usr/local

cd ../..
rm -rf _boost
14 changes: 14 additions & 0 deletions share/ci/scripts/linux/install_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -ex

echo "Updating to newer cmake to enable python-3"

CMAKE_VERSION="$1"

curl --location "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh" -o /tmp/cmake.sh
cd /tmp && sh cmake.sh --skip-license --prefix=/usr/local --exclude-subdir
rm /tmp/cmake.sh

echo $(ls /usr/local/bin)
echo $(which cmake)
2 changes: 1 addition & 1 deletion share/ci/templates/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
if [ "$CCOMPILER" ]; then
export CC="$CCOMPILER"
fi
export LD_LIBRARY_PATH=$PWD/IlmBase/Half:$PWD/IlmBase/IlmThread:$PWD/IlmBase/Iex:$PWD/IlmBase/IexMath:$PWD/IlmBase/Imath:$PWD/OpenEXR/IlmImf:$PWD/OpenEXR/IlmImfUtil:$LD_LIBRARY_PATH
echo `which cmake`
cmake --build . \
--target install \
--config ${{ parameters.buildType }} \
Expand Down
28 changes: 1 addition & 27 deletions share/ci/templates/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,8 @@

parameters:
buildType: Release
buildIlmBase: ON
buildOpenEXR: ON
buildPythonLibs: ON
buildSharedLibs: ON
buildStaticLibs: OFF
buildTests: ON
buildUtils: ON
buildViewers: OFF
forceCXX03: OFF
useNamespaceVersioning: OFF
pythonMajor: 2
pythonMinor: 7
runFuzzTests: OFF
verbose: OFF
cxxStd: 14
Expand All @@ -36,30 +26,14 @@ steps:
if [ "$CCOMPILER" ]; then
export CC="$CCOMPILER"
fi
cmake ../. \
/usr/local/bin/cmake ../. \
-DCMAKE_INSTALL_PREFIX=../_install \
-DCMAKE_BUILD_TYPE=${{ parameters.buildType }} \
-DCMAKE_CXX_STANDARD=${{ parameters.cxxStd }} \
-DCMAKE_CXX_FLAGS="${{ parameters.cxxFlags }}" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=${{ parameters.verbose }} \
-DBUILD_SHARED_LIBS=${{ parameters.buildSharedLibs }} \
-DOCIO_BUILD_TESTS=${{ parameters.buildTests }} \
-DOCIO_BUILD_GPU_TESTS=${{ parameters.buildGpuTests }} \
-DOCIO_BUILD_DOCS=${{ parameters.buildDocs }} \
-DOCIO_USE_SSE=${{ parameters.useSSE }} \
-DOCIO_WARNING_AS_ERROR=ON \
-DOPENEXR_BUILD_ILMBASE=${{ parameters.buildIlmBase }} \
-DOPENEXR_BUILD_OPENEXR=${{ parameters.buildOpenEXR }} \
-DOPENEXR_BUILD_PYTHONLIBS=${{ parameters.buildPythonLibs }} \
-DOPENEXR_BUILD_SHARED=${{ parameters.buildSharedLibs }} \
-DOPENEXR_BUILD_STATIC=${{ parameters.buildStaticLibs }} \
-DOPENEXR_BUILD_TESTS=${{ parameters.buildTests }} \
-DOPENEXR_BUILD_UTILS=${{ parameters.buildUtils }} \
-DOPENEXR_BUILD_VIEWERS=${{ parameters.buildViewers }} \
-DOPENEXR_FORCE_CXX03=${{ parameters.forceCXX03 }} \
-DOPENEXR_NAMESPACE_VERSIONING=${{ parameters.useNamespaceVersioning }} \
-DOPENEXR_PYTHON_MAJOR=${{ parameters.pythonMajor }} \
-DOPENEXR_PYTHON_MINOR=${{ parameters.pythonMinor }} \
-DOPENEXR_RUN_FUZZ_TESTS=${{ parameters.runFuzzTests }} \
${{ parameters.cmakeOpts }}
workingDirectory: _build
Expand Down
3 changes: 1 addition & 2 deletions share/ci/templates/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

steps:
- bash: |
export LD_LIBRARY_PATH=$PWD/IlmBase/Half:$PWD/IlmBase/IlmThread:$PWD/IlmBase/Iex:$PWD/IlmBase/IexMath:$PWD/IlmBase/Imath:$PWD/OpenEXR/IlmImf:$PWD/OpenEXR/IlmImfUtil:$LD_LIBRARY_PATH
ctest -T Test --output-on-failure -VV -E PyImathNumpyTest
ctest -T Test -E PyIlmBase.* --output-on-failure -VV
workingDirectory: _build
displayName: Test OpenEXR