@@ -33,48 +33,55 @@ jobs:
3333 linux-python2,
3434 linux-python2-debug,
3535 linux-python3,
36- macos-python2
36+ windows-python3,
37+ windows-python3-debug
3738 ]
3839
3940 include :
4041
4142 - name : linux-python2
4243 os : ubuntu-20.04
4344 buildType : RELEASE
44- containerImage : ghcr.io/gafferhq/build/build:1.2 .0
45+ containerImage : ghcr.io/gafferhq/build/build:2.0 .0
4546 options : .github/workflows/main/options.posix
46- dependenciesURL : https://github.com/GafferHQ/dependencies/releases/download/4.0 .0/gafferDependencies-4.0 .0-Python2-linux.tar.gz
47+ dependenciesURL : https://github.com/GafferHQ/dependencies/releases/download/5.1 .0/gafferDependencies-5.1 .0-Python2-linux.tar.gz
4748 tests : testCore testCorePython testScene testImage testAlembic testUSD testVDB testAppleseed
4849 publish : true
4950
5051 - name : linux-python2-debug
5152 os : ubuntu-20.04
5253 buildType : DEBUG
53- containerImage : ghcr.io/gafferhq/build/build:1.2 .0
54+ containerImage : ghcr.io/gafferhq/build/build:2.0 .0
5455 options : .github/workflows/main/options.posix
55- dependenciesURL : https://github.com/GafferHQ/dependencies/releases/download/4.0 .0/gafferDependencies-4.0 .0-Python2-linux.tar.gz
56+ dependenciesURL : https://github.com/GafferHQ/dependencies/releases/download/5.1 .0/gafferDependencies-5.1 .0-Python2-linux.tar.gz
5657 tests : testCore testCorePython testScene testImage testAlembic testUSD testVDB testAppleseed
5758 publish : false
5859
5960 - name : linux-python3
6061 os : ubuntu-20.04
6162 buildType : RELEASE
62- containerImage : ghcr.io/gafferhq/build/build:1.2 .0
63+ containerImage : ghcr.io/gafferhq/build/build:2.0 .0
6364 options : .github/workflows/main/options.posix
64- dependenciesURL : https://github.com/GafferHQ/dependencies/releases/download/4.0 .0/gafferDependencies-4.0 .0-Python3-linux.tar.gz
65+ dependenciesURL : https://github.com/GafferHQ/dependencies/releases/download/5.1 .0/gafferDependencies-5.1 .0-Python3-linux.tar.gz
6566 tests : testCore testCorePython testScene testImage testAlembic testUSD testVDB testAppleseed
6667 publish : true
6768
68- - name : macos-python2
69- os : macos-10.15
69+ - name : windows-python3
70+ os : windows-2019
7071 buildType : RELEASE
71- containerImage :
72- options : .github/workflows/main/options.posix
73- dependenciesURL : https://github.com/GafferHQ/dependencies/releases/download/4.0.0/gafferDependencies-4.0.0-Python2-osx.tar.gz
74- # `testAppleseed` currently omitted due to clashes with system image IO frameworks.
72+ options : .github/workflows/main/options.windows
73+ dependenciesURL : https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.2.0/gafferDependencies-6.2.0-Python3-windows.zip
7574 tests : testCore testCorePython testScene testImage testAlembic testUSD testVDB
7675 publish : true
7776
77+ - name : windows-python3-debug
78+ os : windows-2019
79+ buildType : RELWITHDEBINFO
80+ options : .github/workflows/main/options.windows
81+ dependenciesURL : https://github.com/hypothetical-inc/gafferDependencies/releases/download/6.2.0/gafferDependencies-6.2.0-Python3-windows.zip
82+ tests : testCore testCorePython testScene testImage testAlembic testUSD testVDB
83+ publish : false
84+
7885 runs-on : ${{ matrix.os }}
7986
8087 container : ${{ matrix.containerImage }}
8895 sdk : 10.0.17763.0
8996
9097 - name : Install toolchain (Windows)
91- run : python -m pip install scons
98+ run : |
99+ python -m pip install scons
100+ echo "PACKAGE_COMMAND=7z a -tzip" >> $env:GITHUB_ENV
101+ echo "PACKAGE_EXTENSION=zip" >> $env:GITHUB_ENV
92102 if : runner.os == 'Windows'
93103
94104 - name : Install toolchain (MacOS)
@@ -102,11 +112,25 @@ jobs:
102112 # _before_ anything we specify with `-isystem`, despite documentation to the
103113 # contrary. So we nuke the headers.
104114 rm -rf /usr/local/include/*
115+ echo PACKAGE_COMMAND=tar -czf >> $GITHUB_ENV
116+ echo PACKAGE_EXTENSION=tar.gz >> $GITHUB_ENV
105117 if : runner.os == 'macOS'
106118
107119 - name : Install toolchain (Linux)
108120 run : |
109- echo /opt/rh/devtoolset-6/root/bin >> $GITHUB_PATH
121+ # The Docker container configures bash shells such that they enable the
122+ # software collections we want. If we could set GitHub's
123+ # `defaults.run.shell` to `bash` then all our build steps would pick up
124+ # this environment automatically. But we can't do that because it
125+ # breaks the build on Windows, and we can't configure a different shell
126+ # per platform because GitHub won't allow it. But we can run _this_
127+ # Linux-only step in bash, and transfer the environment out to be used
128+ # in later steps.
129+ echo $PATH > $GITHUB_PATH
130+ echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH >> $GITHUB_ENV
131+ echo PACKAGE_COMMAND=tar -czf >> $GITHUB_ENV
132+ echo PACKAGE_EXTENSION=tar.gz >> $GITHUB_ENV
133+ shell : bash
110134 if : runner.os == 'Linux'
111135
112136 - name : Install Python Modules
@@ -137,7 +161,7 @@ jobs:
137161 shell : bash
138162
139163 - name : Cache
140- uses : actions/cache@v1
164+ uses : actions/cache@v3
141165 with :
142166 path : sconsCache
143167 key : ${{ runner.os }}-${{ matrix.containerImage }}-${{env.CORTEX_DEPENDENCIES_HASH}}-${{ matrix.buildType }}-${{ github.sha }}
@@ -146,32 +170,50 @@ jobs:
146170
147171 - name : Build
148172 run : |
149- scons -j 2 install BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} CXXSTD=c++14 BUILD_CACHEDIR=sconsCache
173+ scons -j 2 install BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache
174+ # Copy the config log for use in the "Debug Failures" step, because it
175+ # gets clobbered by the `scons test*` call below.
176+ cp config.log buildConfig.log
150177
151178 - name : Test
152179 run : |
153- scons ${{ matrix.tests }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} CXXSTD=c++14 BUILD_CACHEDIR=sconsCache
180+ scons ${{ matrix.tests }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache
154181 env :
155182 IECORE_RTLD_GLOBAL : 0
183+ OCIO : ${{ env.CORTEX_BUILD_NAME }}/openColorIO/config.ocio
156184
157185 - name : Build Package
158186 run : |
159- tar -czf ${{ env.CORTEX_BUILD_NAME }}.tar.gz ${{ env.CORTEX_BUILD_NAME }}
187+ ${{ env.PACKAGE_COMMAND }} ${{ env.CORTEX_BUILD_NAME }}.${{env.PACKAGE_EXTENSION}} ${{ env.CORTEX_BUILD_NAME }}
160188 if : matrix.publish
161189
162190 - uses : actions/upload-artifact@v2
163191 with :
164192 name : ${{ env.CORTEX_BUILD_NAME }}
165- path : ${{ env.CORTEX_BUILD_NAME }}.tar.gz
193+ path : ${{ env.CORTEX_BUILD_NAME }}.${{ env.PACKAGE_EXTENSION }}
166194 if : matrix.publish
167195
168196 - name : Publish Release
169197 run : |
170- ./.github/workflows/main/publishRelease.py --archive ${{ env.CORTEX_BUILD_NAME }}.tar.gz --repo ${{ github.repository }} --releaseId ${{ env.CORTEX_GITHUB_RELEASEID }}
171- if : matrix.publish && env.CORTEX_GITHUB_RELEASEID != '' && runner.os != 'Windows'
198+ python ./.github/workflows/main/publishRelease.py --archive ${{ env.CORTEX_BUILD_NAME }}.${{ env.PACKAGE_EXTENSION }} --repo ${{ github.repository }} --releaseId ${{ env.CORTEX_GITHUB_RELEASEID }}
199+ if : matrix.publish && env.CORTEX_GITHUB_RELEASEID != ''
172200
173201 env :
174202 GITHUB_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
175203
176204 - name : Limit cache size
177205 run : python ./.github/workflows/main/limitCacheSize.py
206+
207+ - name : Debug Failures
208+ run : |
209+ # Give MacOS crash reporter time to do its thing
210+ sleep 20
211+ # Print SCons logs and MacOS crash logs
212+ shopt -s nullglob
213+ for logFile in config.log buildConfig.log ~/Library/Logs/DiagnosticReports/*.crash
214+ do
215+ echo $logFile
216+ cat $logFile
217+ done
218+ shell : bash
219+ if : failure()
0 commit comments