From c85460c87cf6c28f61b16680b387227a4d919a20 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Sun, 27 Jan 2019 21:28:09 +0100 Subject: [PATCH 01/19] Add deps as seen in oiio appveyor.yml --- win2016-azure-pipelines.yml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index bee4896..790c1f3 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -64,7 +64,13 @@ jobs: sed -i '/SHA512/c\SHA512 $(oiio.sha512)' C:/vcpkg/ports/openimageio/portfile.cmake sed -i '/HEAD_REF/c\HEAD_REF $(oiio.head_ref)' C:/vcpkg/ports/openimageio/portfile.cmake sed -i '/vcpkg_configure_cmake(/c\set(ENV{OIIO_PYTHON_VERSION} \"$(python.version)\")\n\nvcpkg_configure_cmake(' C:/vcpkg/ports/openimageio/portfile.cmake + sed -i '/-DUSE_FREETYPE/c\-DUSE_FREETYPE=ON' C:/vcpkg/ports/openimageio/portfile.cmake + sed -i '/-DUSE_GIF/c\-DUSE_GIF=ON' C:/vcpkg/ports/openimageio/portfile.cmake + sed -i '/-DUSE_LIBRAW/c\-DUSE_LIBRAW=ON' C:/vcpkg/ports/openimageio/portfile.cmake + sed -i '/-DUSE_OPENJPEG/c\-DUSE_OPENJPEG=ON' C:/vcpkg/ports/openimageio/portfile.cmake + sed -i '/-DUSE_PTEX/c\-DUSE_PTEX=ON' C:/vcpkg/ports/openimageio/portfile.cmake sed -i '/-DUSE_PYTHON/c\-DUSE_PYTHON=ON' C:/vcpkg/ports/openimageio/portfile.cmake + sed -i '/-DUSE_WEBP/c\-DUSE_WEBP=ON' C:/vcpkg/ports/openimageio/portfile.cmake sed -i '/-DBUILD_MISSING_PYBIND11/c\-DBUILD_MISSING_PYBIND11=ON' C:/vcpkg/ports/openimageio/portfile.cmake sed -i '/-DBUILD_MISSING_DEPS/c\-DBUILD_MISSING_DEPS=ON' C:/vcpkg/ports/openimageio/portfile.cmake sed -i 's/LICENSE/LICENSE.md/g' C:/vcpkg/ports/openimageio/portfile.cmake @@ -77,9 +83,17 @@ jobs: - powershell: | cd C:/vcpkg .\vcpkg list - .\vcpkg install openexr:x64-windows - .\vcpkg install tiff:x64-windows .\vcpkg install pybind11:x64-windows + .\vcpkg install zlib:x64-windows + .\vcpkg install tiff:x64-windows + .\vcpkg install libpng:x64-windows + .\vcpkg install openexr:x64-windows + .\vcpkg install freetype:x64-windows + .\vcpkg install giflib:x64-windows + .\vcpkg install libwebp:x64-windows + .\vcpkg install openjpeg:x64-windows + .\vcpkg install ptex:x64-windows + .\vcpkg install libraw:x64-windows .\vcpkg list condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Install oiio prerequisites From 04371db922f88f2d6bd591dcdbc87a0bc1a62219 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Tue, 29 Jan 2019 18:12:16 +0100 Subject: [PATCH 02/19] Enable features --- .../ports/openimageio-py3.6/portfile.cmake | 21 ++++++++++--------- .../ports/openimageio-py3.7/portfile.cmake | 21 ++++++++++--------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake index 61addfb..d6d2163 100644 --- a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake @@ -24,11 +24,12 @@ else() set(LINKSTATIC OFF) endif() -# Features -set(USE_LIBRAW OFF) -if("libraw" IN_LIST FEATURES) - set(USE_LIBRAW ON) -endif() +# # Features +# set(USE_LIBRAW OFF) +#if("libraw" IN_LIST FEATURES) +# set(USE_LIBRAW ON) +# endif() +set(USE_LIBRAW ON) set(ENV{OIIO_PYTHON_VERSION} "3.6") @@ -42,18 +43,18 @@ vcpkg_configure_cmake( -DUSE_DICOM=OFF -DUSE_FFMPEG=OFF -DUSE_FIELD3D=OFF - -DUSE_FREETYPE=OFF - -DUSE_GIF=OFF + -DUSE_FREETYPE=ON + -DUSE_GIF=ON -DUSE_LIBRAW=${USE_LIBRAW} -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=OFF + -DUSE_OPENJPEG=ON -DUSE_OPENSSL=OFF - -DUSE_PTEX=OFF + -DUSE_PTEX=ON -DUSE_PYTHON=ON -DUSE_QT=OFF - -DUSE_WEBP=OFF + -DUSE_WEBP=ON -DBUILDSTATIC=${BUILDSTATIC} -DLINKSTATIC=${LINKSTATIC} -DBUILD_MISSING_PYBIND11=ON diff --git a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake index e381ac3..c28ed5c 100644 --- a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake @@ -24,11 +24,12 @@ else() set(LINKSTATIC OFF) endif() -# Features -set(USE_LIBRAW OFF) -if("libraw" IN_LIST FEATURES) - set(USE_LIBRAW ON) -endif() +# # Features +# set(USE_LIBRAW OFF) +#if("libraw" IN_LIST FEATURES) +# set(USE_LIBRAW ON) +# endif() +set(USE_LIBRAW ON) set(ENV{OIIO_PYTHON_VERSION} "3.7") @@ -42,18 +43,18 @@ vcpkg_configure_cmake( -DUSE_DICOM=OFF -DUSE_FFMPEG=OFF -DUSE_FIELD3D=OFF - -DUSE_FREETYPE=OFF - -DUSE_GIF=OFF + -DUSE_FREETYPE=ON + -DUSE_GIF=ON -DUSE_LIBRAW=${USE_LIBRAW} -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=OFF + -DUSE_OPENJPEG=ON -DUSE_OPENSSL=OFF - -DUSE_PTEX=OFF + -DUSE_PTEX=ON -DUSE_PYTHON=ON -DUSE_QT=OFF - -DUSE_WEBP=OFF + -DUSE_WEBP=ON -DBUILDSTATIC=${BUILDSTATIC} -DLINKSTATIC=${LINKSTATIC} -DBUILD_MISSING_PYBIND11=ON From b5a562c20d61facd69a2a9e0740ca1882fef5486 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Thu, 31 Jan 2019 15:53:38 +0100 Subject: [PATCH 03/19] Adjust extras --- win2016-azure-pipelines.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index 4c665d2..6abaee7 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -95,24 +95,19 @@ jobs: condition: eq(variables['python.version'], '3.7') displayName: 'Workaround: Uninstall Python 3.7 Interpreter' - # Install oiio prerequisites via vcpkg + # Install oiio extras - powershell: | cd C:/vcpkg .\vcpkg list - .\vcpkg install pybind11:x64-windows .\vcpkg install zlib:x64-windows - .\vcpkg install tiff:x64-windows - .\vcpkg install libpng:x64-windows - .\vcpkg install openexr:x64-windows .\vcpkg install freetype:x64-windows .\vcpkg install giflib:x64-windows .\vcpkg install libwebp:x64-windows .\vcpkg install openjpeg:x64-windows .\vcpkg install ptex:x64-windows - .\vcpkg install libraw:x64-windows .\vcpkg list condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Install oiio prerequisites + displayName: Install oiio extras - powershell: | $env:OIIO_PYTHON_VERSION = "$(python.version)" From 9e4625c5270d3194fa0e497ecc9432fb21b291a1 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Thu, 31 Jan 2019 15:57:28 +0100 Subject: [PATCH 04/19] Add install.vcpkg variable --- win2016-azure-pipelines.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index 6abaee7..cd088b5 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -22,6 +22,7 @@ jobs: azure.vm_image: 'vs2017-win2016' src.python: '$(Agent.BuildDirectory)/s/src/python' src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg' + install.vcpkg: 'C:/vcpkg' pypackage.version: '2.0.4+$(Build.BuildNumber)' pypackage.os_name: 'Microsoft :: Windows' @@ -62,9 +63,9 @@ jobs: # Copy customized port(s) into place - powershell: | - cp -r -v $(src.vcpkg)/ports/python3-py$(python.version)/* C:/vcpkg/ports/python3 - cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* C:/vcpkg/ports/openimageio - cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* C:/vcpkg/ports/pybind11 + cp -r -v $(src.vcpkg)/ports/python3-py$(python.version)/* $(install.vcpkg)/ports/python3 + cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* $(install.vcpkg)/ports/openimageio + cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11 condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Override vcpkg port files @@ -82,7 +83,7 @@ jobs: # Install pybind11 via vcpkg - powershell: | - cd C:/vcpkg + cd $(install.vcpkg) .\vcpkg list .\vcpkg install pybind11:x64-windows .\vcpkg list @@ -97,7 +98,7 @@ jobs: # Install oiio extras - powershell: | - cd C:/vcpkg + cd $(install.vcpkg) .\vcpkg list .\vcpkg install zlib:x64-windows .\vcpkg install freetype:x64-windows @@ -111,7 +112,7 @@ jobs: - powershell: | $env:OIIO_PYTHON_VERSION = "$(python.version)" - cd C:/vcpkg + cd $(install.vcpkg) .\vcpkg list .\vcpkg install openimageio:x64-windows .\vcpkg list @@ -120,31 +121,31 @@ jobs: # Debug logs - powershell: | - if (Test-Path "C:/vcpkg/buildtrees/openimageio/config-x64-windows-err.log") { cat C:/vcpkg/buildtrees/openimageio/config-x64-windows-err.log } - if (Test-Path "C:/vcpkg/buildtrees/openimageio/config-x64-windows-out.log") { cat C:/vcpkg/buildtrees/openimageio/config-x64-windows-out.log } - if (Test-Path "C:/vcpkg/buildtrees/openimageio/install-x64-windows-dbg-err.log") { cat C:/vcpkg/buildtrees/openimageio/install-x64-windows-dbg-err.log } - if (Test-Path "C:/vcpkg/buildtrees/openimageio/install-x64-windows-dbg-out.log") { cat C:/vcpkg/buildtrees/openimageio/install-x64-windows-dbg-out.log } - if (Test-Path "C:/vcpkg/buildtrees/openimageio/install-x64-windows-rel-err.log") { cat C:/vcpkg/buildtrees/openimageio/install-x64-windows-rel-err.log } - if (Test-Path "C:/vcpkg/buildtrees/openimageio/install-x64-windows-rel-out.log") { cat C:/vcpkg/buildtrees/openimageio/install-x64-windows-rel-out.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/config-x64-windows-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/config-x64-windows-err.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/config-x64-windows-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/config-x64-windows-out.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-err.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log } condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Build logs for oiio # View files from built and installed oiio - powershell: | - cd C:\vcpkg\installed\x64-windows\bin + cd $(install.vcpkg)/installed/x64-windows/bin tree /F condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Show contents of oiio bin folder tree - powershell: | - cd C:\vcpkg\installed\x64-windows\lib\python$(python.version)\site-packages + cd $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages tree /F condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Show contents of oiio site-packages folder tree # Copy files into Python package - powershell: | - cp -r -v C:\vcpkg\installed\x64-windows\lib\python$(python.version)\site-packages\*.pyd $(src.python)/oiio - cp -r -v C:\vcpkg\installed\x64-windows\bin\*.dll $(src.python)/oiio + cp -r -v $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages/*.pyd $(src.python)/oiio + cp -r -v $(install.vcpkg)/installed/x64-windows/bin/*.dll $(src.python)/oiio cd $(src.python) tree /F condition: eq( variables['Agent.OS'], 'Windows_NT' ) From f432d9c2f113fff598f70229b7a9f351e924f40d Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Thu, 31 Jan 2019 15:57:33 +0100 Subject: [PATCH 05/19] Add extras --- macOS-10.13-azure-pipelines.yml | 13 +++++++++++++ ubuntu16.04-azure-pipelines.yml | 23 ++++++++++++----------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 356611d..90a061b 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -82,6 +82,19 @@ jobs: ./vcpkg list displayName: Install pybind11 + # Install oiio extras + - bash: | + cd $(install.vcpkg) + .\vcpkg list + .\vcpkg install zlib:x64-osx + .\vcpkg install freetype:x64-osx + .\vcpkg install giflib:x64-osx + .\vcpkg install libwebp:x64-osx + .\vcpkg install openjpeg:x64-osx + .\vcpkg install ptex:x64-osx + .\vcpkg list + displayName: Install oiio extras + # Install oiio prerequisites via vcpkg - bash: | cd $(install.vcpkg) diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index 1c216f9..7137c75 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -73,17 +73,18 @@ jobs: cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11 displayName: Override vcpkg port files - # Install oiio prerequisites via vcpkg - # - bash: | - # cd vcpkg - # ./vcpkg list - # ./vcpkg install openexr:x64-linux - # ./vcpkg install tiff:x64-linux - # ./vcpkg install python3:x64-linux - # ./vcpkg install pybind11:x64-linux - # ./vcpkg list - # condition: eq( variables['Agent.OS'], 'Linux' ) - # displayName: Install prerequisites + # Install oiio extras + - bash: | + cd $(install.vcpkg) + .\vcpkg list + .\vcpkg install zlib:x64-osx + .\vcpkg install freetype:x64-osx + .\vcpkg install giflib:x64-osx + .\vcpkg install libwebp:x64-osx + .\vcpkg install openjpeg:x64-osx + .\vcpkg install ptex:x64-osx + .\vcpkg list + displayName: Install oiio extras # Install oiio - bash: | From 449b672ca510bb93ae16f4ce42ff4417da9507f6 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Thu, 31 Jan 2019 16:08:06 +0100 Subject: [PATCH 06/19] Change backslashes to forward slashes --- macOS-10.13-azure-pipelines.yml | 16 ++++++++-------- ubuntu16.04-azure-pipelines.yml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 90a061b..10a2c7d 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -85,14 +85,14 @@ jobs: # Install oiio extras - bash: | cd $(install.vcpkg) - .\vcpkg list - .\vcpkg install zlib:x64-osx - .\vcpkg install freetype:x64-osx - .\vcpkg install giflib:x64-osx - .\vcpkg install libwebp:x64-osx - .\vcpkg install openjpeg:x64-osx - .\vcpkg install ptex:x64-osx - .\vcpkg list + ./vcpkg list + ./vcpkg install zlib:x64-osx + ./vcpkg install freetype:x64-osx + ./vcpkg install giflib:x64-osx + ./vcpkg install libwebp:x64-osx + ./vcpkg install openjpeg:x64-osx + ./vcpkg install ptex:x64-osx + ./vcpkg list displayName: Install oiio extras # Install oiio prerequisites via vcpkg diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index 7137c75..e422d04 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -76,14 +76,14 @@ jobs: # Install oiio extras - bash: | cd $(install.vcpkg) - .\vcpkg list - .\vcpkg install zlib:x64-osx - .\vcpkg install freetype:x64-osx - .\vcpkg install giflib:x64-osx - .\vcpkg install libwebp:x64-osx - .\vcpkg install openjpeg:x64-osx - .\vcpkg install ptex:x64-osx - .\vcpkg list + ./vcpkg list + ./vcpkg install zlib:x64-osx + ./vcpkg install freetype:x64-osx + ./vcpkg install giflib:x64-osx + ./vcpkg install libwebp:x64-osx + ./vcpkg install openjpeg:x64-osx + ./vcpkg install ptex:x64-osx + ./vcpkg list displayName: Install oiio extras # Install oiio From 7113004ab3d1b637450f7afde43462a36c85abc3 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Thu, 31 Jan 2019 18:25:28 +0100 Subject: [PATCH 07/19] Fix wrong platform --- ubuntu16.04-azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index e422d04..56c80ad 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -77,12 +77,12 @@ jobs: - bash: | cd $(install.vcpkg) ./vcpkg list - ./vcpkg install zlib:x64-osx - ./vcpkg install freetype:x64-osx - ./vcpkg install giflib:x64-osx - ./vcpkg install libwebp:x64-osx - ./vcpkg install openjpeg:x64-osx - ./vcpkg install ptex:x64-osx + ./vcpkg install zlib:x64-linux + ./vcpkg install freetype:x64-linux + ./vcpkg install giflib:x64-linux + ./vcpkg install libwebp:x64-linux + ./vcpkg install openjpeg:x64-linux + ./vcpkg install ptex:x64-linux ./vcpkg list displayName: Install oiio extras From 243dc21781423ae031ba5ce35700c4393d3ab4c9 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 19:07:53 +0100 Subject: [PATCH 08/19] Remove openjpg --- macOS-10.13-azure-pipelines.yml | 1 - ubuntu16.04-azure-pipelines.yml | 1 - win2016-azure-pipelines.yml | 1 - 3 files changed, 3 deletions(-) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 327bdf8..ec9e7fc 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -89,7 +89,6 @@ jobs: ./vcpkg install freetype:x64-osx ./vcpkg install giflib:x64-osx ./vcpkg install libwebp:x64-osx - ./vcpkg install openjpeg:x64-osx ./vcpkg install ptex:x64-osx ./vcpkg list displayName: Install oiio extras diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index e91a418..b8ffa91 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -82,7 +82,6 @@ jobs: ./vcpkg install freetype:x64-linux ./vcpkg install giflib:x64-linux ./vcpkg install libwebp:x64-linux - ./vcpkg install openjpeg:x64-linux ./vcpkg install ptex:x64-linux ./vcpkg list displayName: Install oiio extras diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index a40477f..5008566 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -105,7 +105,6 @@ jobs: .\vcpkg install freetype:x64-windows .\vcpkg install giflib:x64-windows .\vcpkg install libwebp:x64-windows - .\vcpkg install openjpeg:x64-windows .\vcpkg install ptex:x64-windows .\vcpkg list condition: eq( variables['Agent.OS'], 'Windows_NT' ) From dd16b214559342bf25aa301d4e4cd122d31b9e6c Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 19:11:24 +0100 Subject: [PATCH 09/19] Also remove openjpeg from portfile --- src/vcpkg/ports/openimageio-py3.6/portfile.cmake | 2 +- src/vcpkg/ports/openimageio-py3.7/portfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake index 87d281e..9c0a5bc 100644 --- a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake @@ -63,7 +63,7 @@ vcpkg_configure_cmake( -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=ON + -DUSE_OPENJPEG=OFF -DUSE_OPENSSL=OFF -DUSE_PTEX=ON -DUSE_PYTHON=ON diff --git a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake index 9c3ffa8..4242e07 100644 --- a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake @@ -63,7 +63,7 @@ vcpkg_configure_cmake( -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=ON + -DUSE_OPENJPEG=OFF -DUSE_OPENSSL=OFF -DUSE_PTEX=ON -DUSE_PYTHON=ON From 0ab375f66a7e1d9f66c902a1e7707dda3fa0c1f1 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 21:10:22 +0100 Subject: [PATCH 10/19] Try clang --- _ubuntu16.04-azure-pipelines.yml | 150 +++++++++++++++ _win2016-azure-pipelines.yml | 181 ++++++++++++++++++ macOS-10.13-azure-pipelines.yml | 3 +- .../ports/openimageio-py3.6/portfile.cmake | 2 +- .../ports/openimageio-py3.7/portfile.cmake | 2 +- 5 files changed, 335 insertions(+), 3 deletions(-) create mode 100644 _ubuntu16.04-azure-pipelines.yml create mode 100644 _win2016-azure-pipelines.yml diff --git a/_ubuntu16.04-azure-pipelines.yml b/_ubuntu16.04-azure-pipelines.yml new file mode 100644 index 0000000..6bd0f82 --- /dev/null +++ b/_ubuntu16.04-azure-pipelines.yml @@ -0,0 +1,150 @@ +# https://aka.ms/yaml +# https://aka.ms/hosted-agent-software +# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/cross-platform-scripting +# https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md + +jobs: +- job: 'oiio' + + strategy: + matrix: + ubuntu-py36: + python.version_major: '3' + python.version_minor: '6' + python.version_patch: '5' + ubuntu-py37: + python.version_major: '3' + python.version_minor: '7' + python.version_patch: '0' + + variables: + python.version: '$(python.version_major).$(python.version_minor)' + azure.vm_image: 'ubuntu-16.04' + src.python: '$(Agent.BuildDirectory)/s/src/python' + src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg' + tests: '$(Agent.BuildDirectory)/s/tests' + install.vcpkg: $(Agent.BuildDirectory)/s/vcpkg + pypackage.version: '2.0.4+$(Build.BuildNumber)' + pypackage.os_name: 'Microsoft :: POSIX :: Linux' + + pool: + vmImage: $(azure.vm_image) + + + steps: + + # Select Python version to run on agent + # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azdevops + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version).$(python.version_patch)' + architecture: 'x64' + addToPath: true + + # Make setup.py ready by substituting placeholders + - bash: | + cd $(src.python) + sed -i'' 's/PACKAGE_VERSION/$(pypackage.version)/g' setup.py + sed -i'' 's/PYTHON_VERSION/$(python.version)/g' setup.py + sed -i'' 's/OS_NAME/$(pypackage.os_name)/g' setup.py + cat setup.py + displayName: Inject variable values into setup.py + + # Install vcpkg prerequisites + - bash: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update -y + sudo apt-get install g++-7 -y + displayName: Install prerequisites for vcpkg + + # Install vcpkg + - bash: | + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg update + pwd + displayName: Install vcpkg + + # Copy customized port(s) into place + - bash: | + cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3 + cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* $(install.vcpkg)/ports/openimageio + cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11 + displayName: Override vcpkg port files + + # Install oiio extras + - bash: | + cd $(install.vcpkg) + ./vcpkg list + ./vcpkg install zlib:x64-linux + ./vcpkg install freetype:x64-linux + ./vcpkg install libwebp:x64-linux + ./vcpkg install giflib:x64-linux + ./vcpkg install openjpeg:x64-linux + ./vcpkg install ptex:x64-linux + ./vcpkg list + displayName: Install oiio extras + + # Install oiio + - bash: | + $env:OIIO_PYTHON_VERSION = "$(python.version)" + cd vcpkg + ./vcpkg list + ./vcpkg install python3:x64-linux + ./vcpkg install pybind11:x64-linux + ./vcpkg install openimageio:x64-linux + ./vcpkg list + displayName: Install oiio + + # Debug Logs + - bash: | + [ -f $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-dbg-err.log ] && cat $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-dbg-err.log || echo "Not found" + [ -f $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-dbg-out.log ] && cat $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-dbg-out.log || echo "Not found" + [ -f $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-rel-err.log ] && cat $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-rel-err.log || echo "Not found" + [ -f $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-rel-out.log ] && cat $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-rel-out.log || echo "Not found" + [ -f $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-dbg-err.log ] && cat $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-dbg-err.log || echo "Not found" + [ -f $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-dbg-out.log ] && cat $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-dbg-out.log || echo "Not found" + [ -f $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-rel-err.log ] && cat $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-rel-err.log || echo "Not found" + [ -f $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-rel-out.log ] && cat $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-rel-out.log || echo "Not found" + displayName: Build logs for oiio + + # View files from built and installed oiio + - bash: | + cd $(install.vcpkg)/installed/x64-linux/lib/python$(python.version)/site-packages + ls -alh + displayName: Show contents of oiio site-packages folder + + # # Copy files into Python package + - bash: | + cp -r -v $(install.vcpkg)/installed/x64-linux/lib/python$(python.version)/site-packages/*.so $(src.python)/oiio + displayName: Copy files into oiio Python package + + # Build wheel + - bash: | + cd $(src.python) + python -m pip install -U pip + pip install -U setuptools wheel + python setup.py bdist_wheel --python-tag=cp$(python.version_major)$(python.version_minor) --plat-name=linux-x86_64 --dist-dir="$(Build.ArtifactStagingDirectory)" + cd $(Build.ArtifactStagingDirectory) + ls -alh + displayName: Build wheel + + # Publish wheel as build artifact (see "Summary" in Azure Pipelines build) + # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-build-artifacts?view=azdevops + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: drop-$(python.version) + + # Tests + - bash: | + cd $(tests) + python --version + pip list + pip install $(Build.ArtifactStagingDirectory)/*.whl + pip install pytest + pip list + pytest --verbose + displayName: Run rudimental test(s) \ No newline at end of file diff --git a/_win2016-azure-pipelines.yml b/_win2016-azure-pipelines.yml new file mode 100644 index 0000000..a907616 --- /dev/null +++ b/_win2016-azure-pipelines.yml @@ -0,0 +1,181 @@ +# https://aka.ms/yaml +# https://aka.ms/hosted-agent-software +# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/cross-platform-scripting +# https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md + +jobs: +- job: 'oiio' + + strategy: + matrix: + windows-py36: + python.version_major: '3' + python.version_minor: '6' + python.version_patch: '4' + windows-py37: + python.version_major: '3' + python.version_minor: '7' + python.version_patch: '0' + + variables: + python.version: '$(python.version_major).$(python.version_minor)' + azure.vm_image: 'vs2017-win2016' + src.python: '$(Agent.BuildDirectory)/s/src/python' + src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg' + install.vcpkg: 'C:/vcpkg' + tests: '$(Agent.BuildDirectory)/s/tests' + pypackage.version: '2.0.4+$(Build.BuildNumber)' + pypackage.os_name: 'Microsoft :: Windows' + + pool: + vmImage: $(azure.vm_image) + + + steps: + + # Select Python version to run on agent + # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azdevops + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version).$(python.version_patch)' + architecture: 'x64' + addToPath: true + + # Make setup.py ready by substituting placeholders + - powershell: | + cd $(src.python) + sed -i 's/PACKAGE_VERSION/$(pypackage.version)/g' setup.py + sed -i 's/PYTHON_VERSION/$(python.version)/g' setup.py + sed -i 's/OS_NAME/$(pypackage.os_name)/g' setup.py + cat setup.py + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Inject variable values into setup.py + + # Instal vcpkg + - powershell: | + cd C:/ + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + .\bootstrap-vcpkg.bat + .\vcpkg integrate install + .\vcpkg update + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Install vcpkg + + # Copy customized port(s) into place + - powershell: | + cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3 + cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* $(install.vcpkg)/ports/openimageio + cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11 + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Override vcpkg port files + + # Install Python Interpreter to default location + # We have to do this because pybind11 currently can't find the + # Azure-provided Python: + # Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.7") + # Fore more info, see issue #7: + # https://github.com/fredrikaverpil/oiio-python/issues/7#issuecomment-458042455 + - powershell: | + choco install python --version $(python.version).$(python.version_patch) + if (Test-Path "C:/Python37/python.exe") { echo "PYTHON INTERPRETER FOUND!" } + condition: eq(variables['python.version'], '3.7') + displayName: 'Workaround: Install Python 3.7 Interpreter' + + # Install pybind11 via vcpkg + - powershell: | + cd $(install.vcpkg) + .\vcpkg list + .\vcpkg install pybind11:x64-windows + .\vcpkg list + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Install pybind11 + + # Uninstall Python Interpreter + - powershell: | + if (Test-Path "C:/Python37/python.exe") { choco uninstall python -y --version $(python.version).$(python.version_patch) } + condition: eq(variables['python.version'], '3.7') + displayName: 'Workaround: Uninstall Python 3.7 Interpreter' + + # Install oiio extras + - powershell: | + cd $(install.vcpkg) + .\vcpkg list + .\vcpkg install zlib:x64-windows + .\vcpkg install freetype:x64-windows + .\vcpkg install libwebp:x64-windows + ./vcpkg install giflib:x64-windows + .\vcpkg install openjpeg:x64-windows + .\vcpkg install ptex:x64-windows + .\vcpkg list + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Install oiio extras + + - powershell: | + $env:OIIO_PYTHON_VERSION = "$(python.version)" + cd $(install.vcpkg) + .\vcpkg list + .\vcpkg install openimageio:x64-windows + .\vcpkg list + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Install oiio + + # Debug logs + - powershell: | + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/config-x64-windows-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/config-x64-windows-err.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/config-x64-windows-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/config-x64-windows-out.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-err.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log } + if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log } + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Build logs for oiio + + # View files from built and installed oiio + - powershell: | + cd $(install.vcpkg)/installed/x64-windows/bin + tree /F + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Show contents of oiio bin folder tree + - powershell: | + cd $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages + tree /F + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Show contents of oiio site-packages folder tree + + # Copy files into Python package + - powershell: | + cp -r -v $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages/*.pyd $(src.python)/oiio + cp -r -v $(install.vcpkg)/installed/x64-windows/bin/*.dll $(src.python)/oiio + cd $(src.python) + tree /F + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Copy files into oiio Python package + - powershell: | + cd $(src.python) + python -m pip install -U pip + pip install -U setuptools wheel + python setup.py bdist_wheel --python-tag=cp$(python.version_major)$(python.version_minor) --plat-name=win-amd64 --dist-dir="$(Build.ArtifactStagingDirectory)" + cd $(Build.ArtifactStagingDirectory) + tree /F + condition: eq( variables['Agent.OS'], 'Windows_NT' ) + displayName: Build wheel + + # Publish wheel as build artifact (see "Summary" in Azure Pipelines build) + # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-build-artifacts?view=azdevops + - task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: drop-$(python.version) + + # Tests + - powershell: | + cd $(tests) + python --version + pip list + dir + python -m pip install --find-links=$(Build.ArtifactStagingDirectory) oiio + pip install pytest + pip list + pytest --verbose + displayName: Run rudimental test(s) \ No newline at end of file diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index ec9e7fc..fb755d8 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -58,7 +58,7 @@ jobs: # Install vcpkg - bash: | - brew install gcc6 + brew install clang git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh @@ -88,6 +88,7 @@ jobs: ./vcpkg install zlib:x64-osx ./vcpkg install freetype:x64-osx ./vcpkg install giflib:x64-osx + ./vcpkg install openjpeg:x64-osx ./vcpkg install libwebp:x64-osx ./vcpkg install ptex:x64-osx ./vcpkg list diff --git a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake index 9c0a5bc..87d281e 100644 --- a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake @@ -63,7 +63,7 @@ vcpkg_configure_cmake( -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=OFF + -DUSE_OPENJPEG=ON -DUSE_OPENSSL=OFF -DUSE_PTEX=ON -DUSE_PYTHON=ON diff --git a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake index 4242e07..9c3ffa8 100644 --- a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake @@ -63,7 +63,7 @@ vcpkg_configure_cmake( -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=OFF + -DUSE_OPENJPEG=ON -DUSE_OPENSSL=OFF -DUSE_PTEX=ON -DUSE_PYTHON=ON From b93211f5ec366ff3a0e60dbc58e81866683aa51c Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 21:18:16 +0100 Subject: [PATCH 11/19] Set VCPKG_ALLOW_APPLE_CLANG --- macOS-10.13-azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index fb755d8..fdc0554 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -27,6 +27,7 @@ jobs: install.vcpkg: $(Agent.BuildDirectory)/s/vcpkg pypackage.version: '2.0.4+$(Build.BuildNumber)' pypackage.os_name: 'Microsoft :: MacOS' + VCPKG_ALLOW_APPLE_CLANG: '1' pool: vmImage: $(azure.vm_image) From d856e9b33d11e4ff16836c38bd37826c3d30fb69 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 21:30:30 +0100 Subject: [PATCH 12/19] set VCPKG_ALLOW_APPLE_CLANG just before brew installing vcpkg --- macOS-10.13-azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index fdc0554..2280d5d 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -27,7 +27,6 @@ jobs: install.vcpkg: $(Agent.BuildDirectory)/s/vcpkg pypackage.version: '2.0.4+$(Build.BuildNumber)' pypackage.os_name: 'Microsoft :: MacOS' - VCPKG_ALLOW_APPLE_CLANG: '1' pool: vmImage: $(azure.vm_image) @@ -59,6 +58,7 @@ jobs: # Install vcpkg - bash: | + set VCPKG_ALLOW_APPLE_CLANG brew install clang git clone https://github.com/Microsoft/vcpkg.git cd vcpkg From 3baddcfe5c5dd828ddb149c3be1b8b661e49bf41 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 21:36:28 +0100 Subject: [PATCH 13/19] export VCPKG_ALLOW_APPLE_CLANG=1 --- macOS-10.13-azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 2280d5d..db04365 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -58,7 +58,7 @@ jobs: # Install vcpkg - bash: | - set VCPKG_ALLOW_APPLE_CLANG + export VCPKG_ALLOW_APPLE_CLANG=1 brew install clang git clone https://github.com/Microsoft/vcpkg.git cd vcpkg From 02c1020e27263f0292bc84efb06e7bcbabbb9cbc Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 21:44:46 +0100 Subject: [PATCH 14/19] Try adding export VCPKG_ALLOW_APPLE_CLANG to .bash_profile --- macOS-10.13-azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index db04365..8cff0e8 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -58,7 +58,7 @@ jobs: # Install vcpkg - bash: | - export VCPKG_ALLOW_APPLE_CLANG=1 + echo "export VCPKG_ALLOW_APPLE_CLANG=1" > ~/.bash_profile brew install clang git clone https://github.com/Microsoft/vcpkg.git cd vcpkg From fea349f38f79af9981170139efa295fa2ed6d573 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 22:39:11 +0100 Subject: [PATCH 15/19] Clean up before merge --- _ubuntu16.04-azure-pipelines.yml | 150 ------------------------- _win2016-azure-pipelines.yml | 181 ------------------------------- macOS-10.13-azure-pipelines.yml | 17 +-- ubuntu16.04-azure-pipelines.yml | 13 ++- win2016-azure-pipelines.yml | 16 +-- 5 files changed, 16 insertions(+), 361 deletions(-) delete mode 100644 _ubuntu16.04-azure-pipelines.yml delete mode 100644 _win2016-azure-pipelines.yml diff --git a/_ubuntu16.04-azure-pipelines.yml b/_ubuntu16.04-azure-pipelines.yml deleted file mode 100644 index 6bd0f82..0000000 --- a/_ubuntu16.04-azure-pipelines.yml +++ /dev/null @@ -1,150 +0,0 @@ -# https://aka.ms/yaml -# https://aka.ms/hosted-agent-software -# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/cross-platform-scripting -# https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md - -jobs: -- job: 'oiio' - - strategy: - matrix: - ubuntu-py36: - python.version_major: '3' - python.version_minor: '6' - python.version_patch: '5' - ubuntu-py37: - python.version_major: '3' - python.version_minor: '7' - python.version_patch: '0' - - variables: - python.version: '$(python.version_major).$(python.version_minor)' - azure.vm_image: 'ubuntu-16.04' - src.python: '$(Agent.BuildDirectory)/s/src/python' - src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg' - tests: '$(Agent.BuildDirectory)/s/tests' - install.vcpkg: $(Agent.BuildDirectory)/s/vcpkg - pypackage.version: '2.0.4+$(Build.BuildNumber)' - pypackage.os_name: 'Microsoft :: POSIX :: Linux' - - pool: - vmImage: $(azure.vm_image) - - - steps: - - # Select Python version to run on agent - # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azdevops - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version).$(python.version_patch)' - architecture: 'x64' - addToPath: true - - # Make setup.py ready by substituting placeholders - - bash: | - cd $(src.python) - sed -i'' 's/PACKAGE_VERSION/$(pypackage.version)/g' setup.py - sed -i'' 's/PYTHON_VERSION/$(python.version)/g' setup.py - sed -i'' 's/OS_NAME/$(pypackage.os_name)/g' setup.py - cat setup.py - displayName: Inject variable values into setup.py - - # Install vcpkg prerequisites - - bash: | - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - sudo apt-get update -y - sudo apt-get install g++-7 -y - displayName: Install prerequisites for vcpkg - - # Install vcpkg - - bash: | - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - ./bootstrap-vcpkg.sh - ./vcpkg integrate install - ./vcpkg update - pwd - displayName: Install vcpkg - - # Copy customized port(s) into place - - bash: | - cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3 - cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* $(install.vcpkg)/ports/openimageio - cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11 - displayName: Override vcpkg port files - - # Install oiio extras - - bash: | - cd $(install.vcpkg) - ./vcpkg list - ./vcpkg install zlib:x64-linux - ./vcpkg install freetype:x64-linux - ./vcpkg install libwebp:x64-linux - ./vcpkg install giflib:x64-linux - ./vcpkg install openjpeg:x64-linux - ./vcpkg install ptex:x64-linux - ./vcpkg list - displayName: Install oiio extras - - # Install oiio - - bash: | - $env:OIIO_PYTHON_VERSION = "$(python.version)" - cd vcpkg - ./vcpkg list - ./vcpkg install python3:x64-linux - ./vcpkg install pybind11:x64-linux - ./vcpkg install openimageio:x64-linux - ./vcpkg list - displayName: Install oiio - - # Debug Logs - - bash: | - [ -f $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-dbg-err.log ] && cat $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-dbg-err.log || echo "Not found" - [ -f $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-dbg-out.log ] && cat $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-dbg-out.log || echo "Not found" - [ -f $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-rel-err.log ] && cat $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-rel-err.log || echo "Not found" - [ -f $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-rel-out.log ] && cat $(install.vcpkg)/buildtrees/openimageio/config-x64-linux-rel-out.log || echo "Not found" - [ -f $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-dbg-err.log ] && cat $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-dbg-err.log || echo "Not found" - [ -f $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-dbg-out.log ] && cat $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-dbg-out.log || echo "Not found" - [ -f $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-rel-err.log ] && cat $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-rel-err.log || echo "Not found" - [ -f $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-rel-out.log ] && cat $(install.vcpkg)/buildtrees/openimageio/install-x64-linux-rel-out.log || echo "Not found" - displayName: Build logs for oiio - - # View files from built and installed oiio - - bash: | - cd $(install.vcpkg)/installed/x64-linux/lib/python$(python.version)/site-packages - ls -alh - displayName: Show contents of oiio site-packages folder - - # # Copy files into Python package - - bash: | - cp -r -v $(install.vcpkg)/installed/x64-linux/lib/python$(python.version)/site-packages/*.so $(src.python)/oiio - displayName: Copy files into oiio Python package - - # Build wheel - - bash: | - cd $(src.python) - python -m pip install -U pip - pip install -U setuptools wheel - python setup.py bdist_wheel --python-tag=cp$(python.version_major)$(python.version_minor) --plat-name=linux-x86_64 --dist-dir="$(Build.ArtifactStagingDirectory)" - cd $(Build.ArtifactStagingDirectory) - ls -alh - displayName: Build wheel - - # Publish wheel as build artifact (see "Summary" in Azure Pipelines build) - # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-build-artifacts?view=azdevops - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: drop-$(python.version) - - # Tests - - bash: | - cd $(tests) - python --version - pip list - pip install $(Build.ArtifactStagingDirectory)/*.whl - pip install pytest - pip list - pytest --verbose - displayName: Run rudimental test(s) \ No newline at end of file diff --git a/_win2016-azure-pipelines.yml b/_win2016-azure-pipelines.yml deleted file mode 100644 index a907616..0000000 --- a/_win2016-azure-pipelines.yml +++ /dev/null @@ -1,181 +0,0 @@ -# https://aka.ms/yaml -# https://aka.ms/hosted-agent-software -# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/cross-platform-scripting -# https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md - -jobs: -- job: 'oiio' - - strategy: - matrix: - windows-py36: - python.version_major: '3' - python.version_minor: '6' - python.version_patch: '4' - windows-py37: - python.version_major: '3' - python.version_minor: '7' - python.version_patch: '0' - - variables: - python.version: '$(python.version_major).$(python.version_minor)' - azure.vm_image: 'vs2017-win2016' - src.python: '$(Agent.BuildDirectory)/s/src/python' - src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg' - install.vcpkg: 'C:/vcpkg' - tests: '$(Agent.BuildDirectory)/s/tests' - pypackage.version: '2.0.4+$(Build.BuildNumber)' - pypackage.os_name: 'Microsoft :: Windows' - - pool: - vmImage: $(azure.vm_image) - - - steps: - - # Select Python version to run on agent - # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/use-python-version?view=azdevops - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version).$(python.version_patch)' - architecture: 'x64' - addToPath: true - - # Make setup.py ready by substituting placeholders - - powershell: | - cd $(src.python) - sed -i 's/PACKAGE_VERSION/$(pypackage.version)/g' setup.py - sed -i 's/PYTHON_VERSION/$(python.version)/g' setup.py - sed -i 's/OS_NAME/$(pypackage.os_name)/g' setup.py - cat setup.py - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Inject variable values into setup.py - - # Instal vcpkg - - powershell: | - cd C:/ - git clone https://github.com/Microsoft/vcpkg.git - cd vcpkg - .\bootstrap-vcpkg.bat - .\vcpkg integrate install - .\vcpkg update - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Install vcpkg - - # Copy customized port(s) into place - - powershell: | - cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3 - cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* $(install.vcpkg)/ports/openimageio - cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11 - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Override vcpkg port files - - # Install Python Interpreter to default location - # We have to do this because pybind11 currently can't find the - # Azure-provided Python: - # Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.7") - # Fore more info, see issue #7: - # https://github.com/fredrikaverpil/oiio-python/issues/7#issuecomment-458042455 - - powershell: | - choco install python --version $(python.version).$(python.version_patch) - if (Test-Path "C:/Python37/python.exe") { echo "PYTHON INTERPRETER FOUND!" } - condition: eq(variables['python.version'], '3.7') - displayName: 'Workaround: Install Python 3.7 Interpreter' - - # Install pybind11 via vcpkg - - powershell: | - cd $(install.vcpkg) - .\vcpkg list - .\vcpkg install pybind11:x64-windows - .\vcpkg list - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Install pybind11 - - # Uninstall Python Interpreter - - powershell: | - if (Test-Path "C:/Python37/python.exe") { choco uninstall python -y --version $(python.version).$(python.version_patch) } - condition: eq(variables['python.version'], '3.7') - displayName: 'Workaround: Uninstall Python 3.7 Interpreter' - - # Install oiio extras - - powershell: | - cd $(install.vcpkg) - .\vcpkg list - .\vcpkg install zlib:x64-windows - .\vcpkg install freetype:x64-windows - .\vcpkg install libwebp:x64-windows - ./vcpkg install giflib:x64-windows - .\vcpkg install openjpeg:x64-windows - .\vcpkg install ptex:x64-windows - .\vcpkg list - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Install oiio extras - - - powershell: | - $env:OIIO_PYTHON_VERSION = "$(python.version)" - cd $(install.vcpkg) - .\vcpkg list - .\vcpkg install openimageio:x64-windows - .\vcpkg list - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Install oiio - - # Debug logs - - powershell: | - if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/config-x64-windows-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/config-x64-windows-err.log } - if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/config-x64-windows-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/config-x64-windows-out.log } - if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-err.log } - if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log } - if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log } - if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log } - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Build logs for oiio - - # View files from built and installed oiio - - powershell: | - cd $(install.vcpkg)/installed/x64-windows/bin - tree /F - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Show contents of oiio bin folder tree - - powershell: | - cd $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages - tree /F - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Show contents of oiio site-packages folder tree - - # Copy files into Python package - - powershell: | - cp -r -v $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages/*.pyd $(src.python)/oiio - cp -r -v $(install.vcpkg)/installed/x64-windows/bin/*.dll $(src.python)/oiio - cd $(src.python) - tree /F - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Copy files into oiio Python package - - powershell: | - cd $(src.python) - python -m pip install -U pip - pip install -U setuptools wheel - python setup.py bdist_wheel --python-tag=cp$(python.version_major)$(python.version_minor) --plat-name=win-amd64 --dist-dir="$(Build.ArtifactStagingDirectory)" - cd $(Build.ArtifactStagingDirectory) - tree /F - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Build wheel - - # Publish wheel as build artifact (see "Summary" in Azure Pipelines build) - # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-build-artifacts?view=azdevops - - task: PublishBuildArtifacts@1 - inputs: - pathtoPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: drop-$(python.version) - - # Tests - - powershell: | - cd $(tests) - python --version - pip list - dir - python -m pip install --find-links=$(Build.ArtifactStagingDirectory) oiio - pip install pytest - pip list - pytest --verbose - displayName: Run rudimental test(s) \ No newline at end of file diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 8cff0e8..b6cd864 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -58,8 +58,7 @@ jobs: # Install vcpkg - bash: | - echo "export VCPKG_ALLOW_APPLE_CLANG=1" > ~/.bash_profile - brew install clang + brew install gcc6 clang git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh @@ -88,25 +87,15 @@ jobs: ./vcpkg list ./vcpkg install zlib:x64-osx ./vcpkg install freetype:x64-osx - ./vcpkg install giflib:x64-osx - ./vcpkg install openjpeg:x64-osx + # ./vcpkg install giflib:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/27 + # ./vcpkg install openjpeg:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/26 ./vcpkg install libwebp:x64-osx ./vcpkg install ptex:x64-osx ./vcpkg list displayName: Install oiio extras - # Install oiio prerequisites via vcpkg - - bash: | - cd $(install.vcpkg) - ./vcpkg list - ./vcpkg install openexr:x64-osx - ./vcpkg install tiff:x64-osx - ./vcpkg list - displayName: Install oiio prerequisites - # Install oiio - bash: | - $env:OIIO_PYTHON_VERSION = "$(python.version)" cd $(install.vcpkg) ./vcpkg list ./vcpkg install openimageio:x64-osx diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index b8ffa91..30e9a12 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -74,6 +74,15 @@ jobs: cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11 displayName: Override vcpkg port files + # Install python3 and pybind11 via vcpkg + - bash: | + cd $(install.vcpkg) + ./vcpkg list + ./vcpkg install python3:x64-linux + ./vcpkg install pybind11:x64-linux + ./vcpkg list + displayName: Install python3 and pybind11 + # Install oiio extras - bash: | cd $(install.vcpkg) @@ -81,6 +90,7 @@ jobs: ./vcpkg install zlib:x64-linux ./vcpkg install freetype:x64-linux ./vcpkg install giflib:x64-linux + ./vcpkg install openjpeg:x64-linux ./vcpkg install libwebp:x64-linux ./vcpkg install ptex:x64-linux ./vcpkg list @@ -88,11 +98,8 @@ jobs: # Install oiio - bash: | - $env:OIIO_PYTHON_VERSION = "$(python.version)" cd vcpkg ./vcpkg list - ./vcpkg install python3:x64-linux - ./vcpkg install pybind11:x64-linux ./vcpkg install openimageio:x64-linux ./vcpkg list displayName: Install oiio diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index 5008566..cf982e6 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -48,7 +48,6 @@ jobs: sed -i 's/PYTHON_VERSION/$(python.version)/g' setup.py sed -i 's/OS_NAME/$(pypackage.os_name)/g' setup.py cat setup.py - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Inject variable values into setup.py # Instal vcpkg @@ -59,7 +58,6 @@ jobs: .\bootstrap-vcpkg.bat .\vcpkg integrate install .\vcpkg update - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Install vcpkg # Copy customized port(s) into place @@ -67,7 +65,6 @@ jobs: cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3 cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* $(install.vcpkg)/ports/openimageio cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11 - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Override vcpkg port files # Install Python Interpreter to default location @@ -86,10 +83,10 @@ jobs: - powershell: | cd $(install.vcpkg) .\vcpkg list + .\vcpkg install python3:x64-windows .\vcpkg install pybind11:x64-windows .\vcpkg list - condition: eq( variables['Agent.OS'], 'Windows_NT' ) - displayName: Install pybind11 + displayName: Install python3 and pybind11 # Uninstall Python Interpreter - powershell: | @@ -104,19 +101,17 @@ jobs: .\vcpkg install zlib:x64-windows .\vcpkg install freetype:x64-windows .\vcpkg install giflib:x64-windows + .\vcpkg install openjpeg:x64-windows .\vcpkg install libwebp:x64-windows .\vcpkg install ptex:x64-windows .\vcpkg list - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Install oiio extras - powershell: | - $env:OIIO_PYTHON_VERSION = "$(python.version)" cd $(install.vcpkg) .\vcpkg list .\vcpkg install openimageio:x64-windows .\vcpkg list - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Install oiio # Debug logs @@ -127,19 +122,16 @@ jobs: if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-dbg-out.log } if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-err.log } if (Test-Path "$(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log") { cat $(install.vcpkg)/buildtrees/openimageio/install-x64-windows-rel-out.log } - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Build logs for oiio # View files from built and installed oiio - powershell: | cd $(install.vcpkg)/installed/x64-windows/bin tree /F - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Show contents of oiio bin folder tree - powershell: | cd $(install.vcpkg)/installed/x64-windows/lib/python$(python.version)/site-packages tree /F - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Show contents of oiio site-packages folder tree # Copy files into Python package @@ -148,7 +140,6 @@ jobs: cp -r -v $(install.vcpkg)/installed/x64-windows/bin/*.dll $(src.python)/oiio cd $(src.python) tree /F - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Copy files into oiio Python package - powershell: | cd $(src.python) @@ -157,7 +148,6 @@ jobs: python setup.py bdist_wheel --python-tag=cp$(python.version_major)$(python.version_minor) --plat-name=win-amd64 --dist-dir="$(Build.ArtifactStagingDirectory)" cd $(Build.ArtifactStagingDirectory) tree /F - condition: eq( variables['Agent.OS'], 'Windows_NT' ) displayName: Build wheel # Publish wheel as build artifact (see "Summary" in Azure Pipelines build) From cfab43e0f6810eacae477cf43bd19878b69ef228 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 22:42:15 +0100 Subject: [PATCH 16/19] Last try with gcc and clang --- macOS-10.13-azure-pipelines.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index b6cd864..56d8a8f 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -58,13 +58,18 @@ jobs: # Install vcpkg - bash: | - brew install gcc6 clang + brew install gcc6 git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install displayName: Install vcpkg + # Install vcpkg + - bash: | + brew install clang + displayName: Install clang + # Copy customized port(s) into place - bash: | cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3 @@ -87,8 +92,8 @@ jobs: ./vcpkg list ./vcpkg install zlib:x64-osx ./vcpkg install freetype:x64-osx - # ./vcpkg install giflib:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/27 - # ./vcpkg install openjpeg:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/26 + ./vcpkg install giflib:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/27 + ./vcpkg install openjpeg:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/26 ./vcpkg install libwebp:x64-osx ./vcpkg install ptex:x64-osx ./vcpkg list From 1aecb77caf1f9fe4446869868b31e37c42cf7507 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Fri, 1 Feb 2019 22:48:53 +0100 Subject: [PATCH 17/19] Disable giflib and openjpeg --- macOS-10.13-azure-pipelines.yml | 9 ++------- src/vcpkg/ports/openimageio-py3.6/portfile.cmake | 4 ++-- src/vcpkg/ports/openimageio-py3.7/portfile.cmake | 4 ++-- ubuntu16.04-azure-pipelines.yml | 4 ++-- win2016-azure-pipelines.yml | 4 ++-- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 56d8a8f..3c6eb3e 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -65,11 +65,6 @@ jobs: ./vcpkg integrate install displayName: Install vcpkg - # Install vcpkg - - bash: | - brew install clang - displayName: Install clang - # Copy customized port(s) into place - bash: | cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3 @@ -92,8 +87,8 @@ jobs: ./vcpkg list ./vcpkg install zlib:x64-osx ./vcpkg install freetype:x64-osx - ./vcpkg install giflib:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/27 - ./vcpkg install openjpeg:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/26 + # ./vcpkg install giflib:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/27 + # ./vcpkg install openjpeg:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/26 ./vcpkg install libwebp:x64-osx ./vcpkg install ptex:x64-osx ./vcpkg list diff --git a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake index 87d281e..f464d42 100644 --- a/src/vcpkg/ports/openimageio-py3.6/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.6/portfile.cmake @@ -58,12 +58,12 @@ vcpkg_configure_cmake( -DUSE_FFMPEG=OFF -DUSE_FIELD3D=OFF -DUSE_FREETYPE=ON - -DUSE_GIF=ON + -DUSE_GIF=OFF -DUSE_LIBRAW=${USE_LIBRAW} -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=ON + -DUSE_OPENJPEG=OFF -DUSE_OPENSSL=OFF -DUSE_PTEX=ON -DUSE_PYTHON=ON diff --git a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake index 9c3ffa8..ba72e12 100644 --- a/src/vcpkg/ports/openimageio-py3.7/portfile.cmake +++ b/src/vcpkg/ports/openimageio-py3.7/portfile.cmake @@ -58,12 +58,12 @@ vcpkg_configure_cmake( -DUSE_FFMPEG=OFF -DUSE_FIELD3D=OFF -DUSE_FREETYPE=ON - -DUSE_GIF=ON + -DUSE_GIF=OFF -DUSE_LIBRAW=${USE_LIBRAW} -DUSE_NUKE=OFF -DUSE_OCIO=OFF -DUSE_OPENCV=OFF - -DUSE_OPENJPEG=ON + -DUSE_OPENJPEG=OFF -DUSE_OPENSSL=OFF -DUSE_PTEX=ON -DUSE_PYTHON=ON diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index 30e9a12..84956b4 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -89,8 +89,8 @@ jobs: ./vcpkg list ./vcpkg install zlib:x64-linux ./vcpkg install freetype:x64-linux - ./vcpkg install giflib:x64-linux - ./vcpkg install openjpeg:x64-linux + # ./vcpkg install giflib:x64-linux # https://github.com/fredrikaverpil/oiio-python/issues/27 + # ./vcpkg install openjpeg:x64-linux # https://github.com/fredrikaverpil/oiio-python/issues/26 ./vcpkg install libwebp:x64-linux ./vcpkg install ptex:x64-linux ./vcpkg list diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index cf982e6..645de44 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -100,8 +100,8 @@ jobs: .\vcpkg list .\vcpkg install zlib:x64-windows .\vcpkg install freetype:x64-windows - .\vcpkg install giflib:x64-windows - .\vcpkg install openjpeg:x64-windows + # .\vcpkg install giflib:x64-windows # https://github.com/fredrikaverpil/oiio-python/issues/27 + # .\vcpkg install openjpeg:x64-windows # https://github.com/fredrikaverpil/oiio-python/issues/26 .\vcpkg install libwebp:x64-windows .\vcpkg install ptex:x64-windows .\vcpkg list From fd0c2c7c33ad258656cf52ba82ae09c68f57d165 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Sat, 2 Feb 2019 13:16:33 +0100 Subject: [PATCH 18/19] Merge with master (#36) * Enable GitHub release * Add GitHub release notes * Improve GitHub release naming * Use better wheel names * Remove date from wheel * Only publish release for master branch * Use + as separator * Use + as separator * Use + as separator --- README.md | 7 ++++++- macOS-10.13-azure-pipelines.yml | 34 ++++++++++++++++++++++++++++-- ubuntu16.04-azure-pipelines.yml | 36 +++++++++++++++++++++++++++++--- win2016-azure-pipelines.yml | 37 ++++++++++++++++++++++++++++++--- 4 files changed, 105 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 34cfcf4..df656e0 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,9 @@ See the `tests` folder for code examples used to test the built wheels' function - The python3 files for oiio at [vcpkg/ports/python3](https://github.com/Microsoft/vcpkg/tree/master/ports/python3) - The vcpkg files for oiio at [vcpkg/ports/openimageio](https://github.com/Microsoft/vcpkg/tree/master/ports/openimageio) - Get SHA512 of file: - - macOS: `openssl dgst -sha512 [FILE]` \ No newline at end of file + - macOS: `openssl dgst -sha512 [FILE]` +- Create release: + 1. Commit changes: `git commit -am "My changes"` + 2. Create tag: `git tag [oiio-version]+[yyyymmdd]` (e.g. `2.0.4+20190202`) + 3. Push tag: `git push origin [oiio-version]+[yyyymmdd]` + 4. Push changes: `git push` \ No newline at end of file diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 3c6eb3e..8a176f2 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -25,7 +25,7 @@ jobs: src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg' tests: '$(Agent.BuildDirectory)/s/tests' install.vcpkg: $(Agent.BuildDirectory)/s/vcpkg - pypackage.version: '2.0.4+$(Build.BuildNumber)' + oiio.version: '2.0.4' pypackage.os_name: 'Microsoft :: MacOS' pool: @@ -42,10 +42,16 @@ jobs: architecture: 'x64' addToPath: true + # Create $(build.date) variable, to be used for GitHub release + - bash: | + DATE=`date +%Y%m%d` + echo "##vso[task.setvariable variable=build.date]$DATE" + displayName: Create build.date variable + # Make setup.py ready by substituting placeholders - bash: | cd $(src.python) - sed -i'' -e 's/PACKAGE_VERSION/$(pypackage.version)/g' setup.py + sed -i'' -e 's/PACKAGE_VERSION/$(oiio.version)/g' setup.py sed -i'' -e 's/PYTHON_VERSION/$(python.version)/g' setup.py sed -i'' -e 's/OS_NAME/$(pypackage.os_name)/g' setup.py cat setup.py @@ -142,3 +148,27 @@ jobs: pip list pytest --verbose displayName: Run rudimental test(s) + + # GitHub Release + # Create, edit, or discard a GitHub release. + # https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/GitHubReleaseV0 + # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azdevops + - task: GithubRelease@0 + inputs: + gitHubConnection: 'oiio-python-releases' + repositoryName: 'fredrikaverpil/oiio-python' + action: 'edit' # Options: create, edit, discard + target: '$(build.sourceVersion)' # Required when action == create || action == edit + tagSource: 'Git tag' # Required when action == create. Options: auto, manual + tag: '$(oiio.version)+$(build.date)' # Required when action == edit || action == discard || tagSource == manual + title: '$(oiio.version)+$(build.date)' + #releaseNotesSource: 'file' # Optional. Options: file, input + #releaseNotesFile: # Optional + #releaseNotes: # Optional + # assets: '$(build.artifactStagingDirectory)/*' # Optional + # assets: '$(Build.ArtifactStagingDirectory)' # Optional + assetUploadMode: 'replace' # Optional. Options: delete, replace + #isDraft: false # Optional + #isPreRelease: false # Optional + addChangeLog: false # Optional + condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index 84956b4..4d5735a 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -24,7 +24,7 @@ jobs: src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg' tests: '$(Agent.BuildDirectory)/s/tests' install.vcpkg: $(Agent.BuildDirectory)/s/vcpkg - pypackage.version: '2.0.4+$(Build.BuildNumber)' + oiio.version: '2.0.4' pypackage.os_name: 'Microsoft :: POSIX :: Linux' pool: @@ -41,10 +41,16 @@ jobs: architecture: 'x64' addToPath: true + # Create $(build.date) variable, to be used for GitHub release + - bash: | + DATE=`date +%Y%m%d` + echo "##vso[task.setvariable variable=build.date]$DATE" + displayName: Create build.date variable + # Make setup.py ready by substituting placeholders - bash: | cd $(src.python) - sed -i'' 's/PACKAGE_VERSION/$(pypackage.version)/g' setup.py + sed -i'' 's/PACKAGE_VERSION/$(oiio.version)/g' setup.py sed -i'' 's/PYTHON_VERSION/$(python.version)/g' setup.py sed -i'' 's/OS_NAME/$(pypackage.os_name)/g' setup.py cat setup.py @@ -153,4 +159,28 @@ jobs: pip install pytest pip list pytest --verbose - displayName: Run rudimental test(s) \ No newline at end of file + displayName: Run rudimental test(s) + + # GitHub Release + # Create, edit, or discard a GitHub release. + # https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/GitHubReleaseV0 + # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azdevops + - task: GithubRelease@0 + inputs: + gitHubConnection: 'oiio-python-releases' + repositoryName: 'fredrikaverpil/oiio-python' + action: 'edit' # Options: create, edit, discard + target: '$(build.sourceVersion)' # Required when action == create || action == edit + tagSource: 'Git tag' # Required when action == create. Options: auto, manual + tag: '$(oiio.version)+$(build.date)' # Required when action == edit || action == discard || tagSource == manual + title: '$(oiio.version)+$(build.date)' + #releaseNotesSource: 'file' # Optional. Options: file, input + #releaseNotesFile: # Optional + #releaseNotes: # Optional + # assets: '$(build.artifactStagingDirectory)/*' # Optional + # assets: '$(Build.ArtifactStagingDirectory)' # Optional + assetUploadMode: 'replace' # Optional. Options: delete, replace + #isDraft: false # Optional + #isPreRelease: false # Optional + addChangeLog: false # Optional + condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index 645de44..de746d9 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -24,7 +24,7 @@ jobs: src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg' install.vcpkg: 'C:/vcpkg' tests: '$(Agent.BuildDirectory)/s/tests' - pypackage.version: '2.0.4+$(Build.BuildNumber)' + oiio.version: '2.0.4' pypackage.os_name: 'Microsoft :: Windows' pool: @@ -41,10 +41,17 @@ jobs: architecture: 'x64' addToPath: true + # Create $(build.date) variable, to be used for GitHub release + - powershell: | + $Date = Get-Date -format "yyyyMMdd" + $DateStr = $Date.ToString() + echo "##vso[task.setvariable variable=build.date]$DateStr" + displayName: Create build.date variable + # Make setup.py ready by substituting placeholders - powershell: | cd $(src.python) - sed -i 's/PACKAGE_VERSION/$(pypackage.version)/g' setup.py + sed -i 's/PACKAGE_VERSION/$(oiio.version)/g' setup.py sed -i 's/PYTHON_VERSION/$(python.version)/g' setup.py sed -i 's/OS_NAME/$(pypackage.os_name)/g' setup.py cat setup.py @@ -167,4 +174,28 @@ jobs: pip install pytest pip list pytest --verbose - displayName: Run rudimental test(s) \ No newline at end of file + displayName: Run rudimental test(s) + + # GitHub Release + # Create, edit, or discard a GitHub release. + # https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/GitHubReleaseV0 + # https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azdevops + - task: GithubRelease@0 + inputs: + gitHubConnection: 'oiio-python-releases' + repositoryName: 'fredrikaverpil/oiio-python' + action: 'edit' # Options: create, edit, discard + target: '$(build.sourceVersion)' # Required when action == create || action == edit + tagSource: 'Git tag' # Required when action == create. Options: auto, manual + tag: '$(oiio.version)+$(build.date)' # Required when action == edit || action == discard || tagSource == manual + title: '$(oiio.version)+$(build.date)' + #releaseNotesSource: 'file' # Optional. Options: file, input + #releaseNotesFile: # Optional + #releaseNotes: # Optional + # assets: '$(build.artifactStagingDirectory)/*' # Optional + # assets: '$(Build.ArtifactStagingDirectory)' # Optional + assetUploadMode: 'replace' # Optional. Options: delete, replace + #isDraft: false # Optional + #isPreRelease: false # Optional + addChangeLog: false # Optional + condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') From eadf1d12b1ce2b8a575dfad0dcd5d5fb5f61ebec Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Mon, 4 Feb 2019 07:45:17 +0100 Subject: [PATCH 19/19] Add libpng --- macOS-10.13-azure-pipelines.yml | 1 + ubuntu16.04-azure-pipelines.yml | 1 + win2016-azure-pipelines.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/macOS-10.13-azure-pipelines.yml b/macOS-10.13-azure-pipelines.yml index 2902116..11e8478 100644 --- a/macOS-10.13-azure-pipelines.yml +++ b/macOS-10.13-azure-pipelines.yml @@ -95,6 +95,7 @@ jobs: ./vcpkg install freetype:x64-osx # ./vcpkg install giflib:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/27 # ./vcpkg install openjpeg:x64-osx # https://github.com/fredrikaverpil/oiio-python/issues/26 + ./vcpkg install libpng:x64-osx ./vcpkg install libwebp:x64-osx ./vcpkg install ptex:x64-osx ./vcpkg list diff --git a/ubuntu16.04-azure-pipelines.yml b/ubuntu16.04-azure-pipelines.yml index fc60b58..e56e7ac 100644 --- a/ubuntu16.04-azure-pipelines.yml +++ b/ubuntu16.04-azure-pipelines.yml @@ -97,6 +97,7 @@ jobs: ./vcpkg install freetype:x64-linux # ./vcpkg install giflib:x64-linux # https://github.com/fredrikaverpil/oiio-python/issues/27 # ./vcpkg install openjpeg:x64-linux # https://github.com/fredrikaverpil/oiio-python/issues/26 + ./vcpkg install libpng:x64-linux ./vcpkg install libwebp:x64-linux ./vcpkg install ptex:x64-linux ./vcpkg list diff --git a/win2016-azure-pipelines.yml b/win2016-azure-pipelines.yml index 2a2b11a..a04746e 100644 --- a/win2016-azure-pipelines.yml +++ b/win2016-azure-pipelines.yml @@ -109,6 +109,7 @@ jobs: .\vcpkg install freetype:x64-windows # .\vcpkg install giflib:x64-windows # https://github.com/fredrikaverpil/oiio-python/issues/27 # .\vcpkg install openjpeg:x64-windows # https://github.com/fredrikaverpil/oiio-python/issues/26 + .\vcpkg install libpng:x64-windows .\vcpkg install libwebp:x64-windows .\vcpkg install ptex:x64-windows .\vcpkg list