Skip to content
This repository was archived by the owner on Sep 13, 2021. It is now read-only.

Commit 764d25a

Browse files
Merge pull request #25 from fredrikaverpil/tests
Add simple test
2 parents c14e0ba + b3aebd4 commit 764d25a

27 files changed

+303
-27
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ When browsing an Azure Pipelines build, click the "Summary" link, and you will s
2525
- Install the wheel: `pip install ...`
2626
- From within Python, import OpenImageIO: `from oiio import OpenImageIO as oiio`
2727

28+
See the `tests` folder for code examples used to test the built wheels' functionality.
29+
2830
## Notes
2931

3032
- Official OpenImageIO repository at [OpenImageIO/oiio](https://github.com/OpenImageIO/oiio), note the `.travis.yml` and `appveyor.yml`
3133
- The python3 files for oiio at [vcpkg/ports/python3](https://github.com/Microsoft/vcpkg/tree/master/ports/python3)
3234
- The vcpkg files for oiio at [vcpkg/ports/openimageio](https://github.com/Microsoft/vcpkg/tree/master/ports/openimageio)
35+
- Get SHA512 of file:
36+
- macOS: `openssl dgst -sha512 [FILE]`

macOS-10.13-azure-pipelines.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# https://aka.ms/yaml
2+
# https://aka.ms/hosted-agent-software
23
# https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/cross-platform-scripting
34
# https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azdevops&tabs=yaml
45
# https://github.com/OpenImageIO/oiio/blob/master/INSTALL.md
@@ -22,6 +23,7 @@ jobs:
2223
azure.vm_image: 'macOS-10.13'
2324
src.python: '$(Agent.BuildDirectory)/s/src/python'
2425
src.vcpkg: '$(Agent.BuildDirectory)/s/src/vcpkg'
26+
tests: '$(Agent.BuildDirectory)/s/tests'
2527
install.vcpkg: $(Agent.BuildDirectory)/s/vcpkg
2628
pypackage.version: '2.0.4+$(Build.BuildNumber)'
2729
pypackage.os_name: 'Microsoft :: MacOS'
@@ -65,18 +67,19 @@ jobs:
6567
6668
# Copy customized port(s) into place
6769
- bash: |
68-
cp -r -v $(src.vcpkg)/ports/python3-py$(python.version)/* $(install.vcpkg)/ports/python3
70+
cp -r -v $(src.vcpkg)/ports/python3-py$(python.version).$(python.version_patch)/* $(install.vcpkg)/ports/python3
6971
cp -r -v $(src.vcpkg)/ports/openimageio-py$(python.version)/* $(install.vcpkg)/ports/openimageio
7072
cp -r -v $(src.vcpkg)/ports/pybind11-py$(python.version)/* $(install.vcpkg)/ports/pybind11
7173
displayName: Override vcpkg port files
7274
73-
# Install pybind11 via vcpkg
75+
# Install python3 and pybind11 via vcpkg
7476
- bash: |
7577
cd $(install.vcpkg)
7678
./vcpkg list
79+
./vcpkg install python3:x64-osx
7780
./vcpkg install pybind11:x64-osx
7881
./vcpkg list
79-
displayName: Install pybind11
82+
displayName: Install python3 and pybind11
8083
8184
# Install oiio prerequisites via vcpkg
8285
- bash: |
@@ -124,4 +127,15 @@ jobs:
124127
- task: PublishBuildArtifacts@1
125128
inputs:
126129
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
127-
artifactName: drop-$(python.version)
130+
artifactName: drop-$(python.version)
131+
132+
# Tests
133+
- bash: |
134+
cd $(tests)
135+
python --version
136+
pip list
137+
pip install $(Build.ArtifactStagingDirectory)/*.whl
138+
pip install pytest
139+
pip list
140+
pytest --verbose
141+
displayName: Run rudimental test(s)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)