Update to Dependencies 9.0.0 #1436
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- 'RB-*' | |
pull_request: | |
branches: | |
- main | |
- 'RB-*' | |
release: | |
types: [published] | |
jobs: | |
build: | |
strategy: | |
# Don't cancel other jobs in the build matrix if one job fails. | |
fail-fast: false | |
matrix: | |
# Rather than generate all permutations of various settings, | |
# we want to explicitly list each of the variants we want to | |
# test. We can use `name` to declare the names of our variants, | |
# and then use `include` to define their settings. | |
name: [ | |
linux-gcc11, | |
linux-debug-gcc11, | |
windows, | |
windows-debug, | |
macos-arm64 | |
] | |
include: | |
- name: linux-gcc11 | |
os: ubuntu-20.04 | |
buildType: RELEASE | |
containerImage: ghcr.io/gafferhq/build/build:3.0.0 | |
options: .github/workflows/main/options.posix | |
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.0.0/gafferDependencies-9.0.0-linux-gcc11.tar.gz | |
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB | |
publish: true | |
jobs: 4 | |
- name: linux-debug-gcc11 | |
os: ubuntu-20.04 | |
buildType: DEBUG | |
containerImage: ghcr.io/gafferhq/build/build:3.0.0 | |
options: .github/workflows/main/options.posix | |
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.0.0/gafferDependencies-9.0.0-linux-gcc11.tar.gz | |
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB | |
publish: false | |
jobs: 4 | |
- name: windows | |
os: windows-2022 | |
buildType: RELEASE | |
options: .github/workflows/main/options.windows | |
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.0.0/gafferDependencies-9.0.0-windows.zip | |
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB | |
publish: true | |
jobs: 4 | |
- name: windows-debug | |
os: windows-2022 | |
buildType: RELWITHDEBINFO | |
options: .github/workflows/main/options.windows | |
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.0.0/gafferDependencies-9.0.0-windows.zip | |
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB | |
publish: false | |
jobs: 4 | |
- name: macos-arm64 | |
os: macos-14 | |
buildType: RELEASE | |
options: .github/workflows/main/options.posix | |
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.0.0/gafferDependencies-9.0.0-macos-arm64.tar.gz | |
tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB | |
publish: true | |
jobs: 3 | |
runs-on: ${{ matrix.os }} | |
container: ${{ matrix.containerImage }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ilammy/msvc-dev-cmd@v1.13.0 | |
with: | |
sdk: 10.0.17763.0 | |
- name: Install toolchain (Windows) | |
run: | | |
python -m pip install scons | |
echo "PACKAGE_COMMAND=7z a -tzip" >> $env:GITHUB_ENV | |
echo "PACKAGE_EXTENSION=zip" >> $env:GITHUB_ENV | |
if: runner.os == 'Windows' | |
- name: Install toolchain (MacOS) | |
run: | | |
pipx install scons==4.6.0 | |
echo PACKAGE_COMMAND=tar -czf >> $GITHUB_ENV | |
echo PACKAGE_EXTENSION=tar.gz >> $GITHUB_ENV | |
if: runner.os == 'macOS' | |
- name: Install toolchain (Linux) | |
run: | | |
# The Docker container configures bash shells such that they enable the | |
# software collections we want. If we could set GitHub's | |
# `defaults.run.shell` to `bash` then all our build steps would pick up | |
# this environment automatically. But we can't do that because it | |
# breaks the build on Windows, and we can't configure a different shell | |
# per platform because GitHub won't allow it. But we can run _this_ | |
# Linux-only step in bash, and transfer the environment out to be used | |
# in later steps. | |
echo $PATH > $GITHUB_PATH | |
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH >> $GITHUB_ENV | |
echo PACKAGE_COMMAND=tar -czf >> $GITHUB_ENV | |
echo PACKAGE_EXTENSION=tar.gz >> $GITHUB_ENV | |
shell: bash | |
if: runner.os == 'Linux' | |
- name: Install Python Modules | |
run: | | |
python --version | |
pip install PyJWT==1.7.1 PyGitHub==1.45 | |
- name: Set Custom Variables | |
run: | | |
.github/workflows/main/setBuildVars.py | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CORTEX_BUILD_VARIANT: ${{ matrix.name }} | |
shell: bash | |
- name: Install dependencies | |
# The `$GITHUB_ENV` shenanigans creates an environment variable | |
# containing the hash of the archive, for use in the cache key | |
# below. | |
run: | | |
echo CORTEX_DEPENDENCIES_HASH=`python config/installDependencies.py --archiveURL ${{ matrix.dependenciesURL }} --dependenciesDir ${{ env.CORTEX_BUILD_NAME }} --outputFormat "{archiveDigest}"` >> $GITHUB_ENV | |
shell: bash | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: sconsCache | |
key: ${{ runner.os }}-${{ matrix.containerImage }}-${{env.CORTEX_DEPENDENCIES_HASH}}-${{ matrix.buildType }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.containerImage }}-${{env.CORTEX_DEPENDENCIES_HASH}}-${{ matrix.buildType }}- | |
- name: Build | |
run: | | |
scons -j ${{ matrix.jobs }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache | |
# Copy the config log for use in the "Debug Failures" step, because it | |
# gets clobbered by the `scons test*` call below. | |
cp config.log buildConfig.log | |
- name: Test | |
run: | | |
scons ${{ matrix.tests }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache | |
env: | |
IECORE_RTLD_GLOBAL: 0 | |
OCIO: ${{ env.CORTEX_BUILD_NAME }}/openColorIO/config.ocio | |
- name: Build Package | |
run: | | |
scons install BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache | |
${{ env.PACKAGE_COMMAND }} ${{ env.CORTEX_BUILD_NAME }}.${{env.PACKAGE_EXTENSION}} ${{ env.CORTEX_BUILD_NAME }} | |
if: matrix.publish | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.CORTEX_BUILD_NAME }} | |
path: ${{ env.CORTEX_BUILD_NAME }}.${{ env.PACKAGE_EXTENSION }} | |
# Using compression-level 0 avoids compressing our already compressed | |
# package and results in a significantly faster upload. | |
compression-level: 0 | |
if: matrix.publish | |
- name: Publish Release | |
run: | | |
python ./.github/workflows/main/publishRelease.py --archive ${{ env.CORTEX_BUILD_NAME }}.${{ env.PACKAGE_EXTENSION }} --repo ${{ github.repository }} --releaseId ${{ env.CORTEX_GITHUB_RELEASEID }} | |
if: matrix.publish && env.CORTEX_GITHUB_RELEASEID != '' | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Limit cache size | |
run: python ./.github/workflows/main/limitCacheSize.py | |
- name: Debug Failures | |
run: | | |
# Give MacOS crash reporter time to do its thing | |
sleep 20 | |
# Print SCons logs and MacOS crash logs | |
shopt -s nullglob | |
for logFile in config.log buildConfig.log ~/Library/Logs/DiagnosticReports/*.crash | |
do | |
echo $logFile | |
cat $logFile | |
done | |
shell: bash | |
if: failure() |