Skip to content

Commit

Permalink
Merge pull request #25 from ericmehl/gaffer_0.59.0.0
Browse files Browse the repository at this point in the history
Gaffer 0.59.0.0
  • Loading branch information
ericmehl authored Jan 8, 2021
2 parents b54b8e5 + 35d28b7 commit 4adb8b3
Show file tree
Hide file tree
Showing 1,067 changed files with 34,710 additions and 12,579 deletions.
96 changes: 80 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
branches:
- master
- '*_maintenance'
release:
types: [published]

jobs:

Expand Down Expand Up @@ -38,8 +40,10 @@ jobs:
- name: linux
os: ubuntu-16.04
buildType: RELEASE
containerImage: gafferhq/build:1.1.0
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/1.6.0/gafferDependencies-1.6.0-linux.tar.gz
variant: linux-python2
publish: true
containerImage: gafferhq/build:1.2.0
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/2.1.1/gafferDependencies-2.1.1-Python2-linux.tar.gz
# GitHub container builds run as root. This causes failures for tests that
# assert that filesystem permissions are respected, because root doesn't
# respect permissions. So we run the final test suite as a dedicated
Expand All @@ -50,8 +54,10 @@ jobs:
- name: linux-debug
os: ubuntu-16.04
buildType: DEBUG
containerImage: gafferhq/build:1.1.0
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/1.6.0/gafferDependencies-1.6.0-linux.tar.gz
variant: linux-python2
publish: false
containerImage: gafferhq/build:1.2.0
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/2.1.1/gafferDependencies-2.1.1-Python2-linux.tar.gz
testRunner: su testUser -c
# Debug builds are ludicrously big, so we must use a larger cache
# limit. In practice this compresses down to 4-500Mb.
Expand All @@ -60,16 +66,20 @@ jobs:
- name: linux-python3
os: ubuntu-16.04
buildType: RELEASE
containerImage: gafferhq/build:1.1.0
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/2.0.0a5/gafferDependencies-2.0.0-Python3-linux.tar.gz
variant: linux-python3
publish: true
containerImage: gafferhq/build:1.2.0
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/2.1.1/gafferDependencies-2.1.1-Python3-linux.tar.gz
testRunner: su testUser -c
sconsCacheMegabytes: 400

- name: macos
os: macos-10.15
buildType: RELEASE
variant: macos-python2
publish: true
containerImage:
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/1.6.0/gafferDependencies-1.6.0-osx.tar.gz
dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/2.1.1/gafferDependencies-2.1.1-Python2-osx.tar.gz
testRunner: bash -c
sconsCacheMegabytes: 400

Expand All @@ -80,6 +90,8 @@ jobs:
env:
DISPLAY: ":99.0"
ARNOLD_LICENSE_ORDER: none # Don't waste time looking for a license that doesn't exist
GAFFER_BUILD_DIR: "./build"
GAFFER_CACHE_DIR: "./sconsCache"

steps:

Expand All @@ -90,42 +102,94 @@ jobs:
# than `brew install`.
run: |
sudo pip install scons==3.1.2
sudo pip install sphinx==1.8.0 sphinx_rtd_theme==0.4.3 recommonmark==0.5.0 docutils==0.12
sudo pip install sphinx==1.8.1 sphinx_rtd_theme==0.4.3 recommonmark==0.5.0 docutils==0.12
# Force inkscape < 1.0 until SConstruct is updated
brew cask install xquartz https://raw.githubusercontent.com/Homebrew/homebrew-cask/5eafe6e9877c5524100b9ac1c5375fe8a2d039be/Casks/inkscape.rb
if: runner.os == 'macOS'

- name: Install toolchain (Linux)
run: |
echo "::add-path::/opt/rh/devtoolset-6/root/bin"
echo /opt/rh/devtoolset-6/root/bin >> $GITHUB_PATH
Xvfb :99 -screen 0 1280x1024x24 &
metacity&
useradd -m testUser
if: runner.os == 'Linux'

- name: 'Install Python Modules'
run: |
python --version
pip install PyGitHub==1.45
- name: Set Custom Variables
run: |
.github/workflows/main/setBuildVars.py
echo GAFFER_SPHINX=`which sphinx-build` >> $GITHUB_ENV
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GAFFER_BUILD_VARIANT: ${{ matrix.variant }}

- name: Disable macOS PR Docs
run: |
echo GAFFER_SPHINX=doesNotExist >> $GITHUB_ENV
echo GAFFER_VALIDATE_EXTRA_FLAGS=--skipDocs >> $GITHUB_ENV
if: runner.os == 'macOS' && env.GAFFER_GITHUB_RELEASEID == ''

- name: Install dependencies
# The `::set-env` shenanigans creates an environment variable
# The `$GITHUB_ENV` shenanigans creates an environment variable
# containing the hash of the archive, for use in the cache key
# below.
run: |
python .github/workflows/main/installDependencies.py --archiveURL ${{ matrix.dependenciesURL }} --dependenciesDir ./build --outputFormat "::set-env name=GAFFER_DEPENDENCIES_HASH::{archiveDigest}"
echo GAFFER_DEPENDENCIES_HASH=`python .github/workflows/main/installDependencies.py --archiveURL ${{ matrix.dependenciesURL }} --dependenciesDir ${{ env.GAFFER_BUILD_DIR }} --outputFormat "{archiveDigest}"` >> $GITHUB_ENV
./config/installArnold.sh
./config/installDelight.sh
echo ::set-env name=DELIGHT::$GITHUB_WORKSPACE/3delight
echo ARNOLD_ROOT=$GITHUB_WORKSPACE/arnoldRoot >> $GITHUB_ENV
echo DELIGHT=$GITHUB_WORKSPACE/3delight >> $GITHUB_ENV
- name: Cache
uses: actions/cache@v1
with:
path: sconsCache
path: ${{ env.GAFFER_CACHE_DIR }}
key: ${{ runner.os }}-${{ matrix.containerImage }}-${{env.GAFFER_DEPENDENCIES_HASH}}-${{ matrix.buildType }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.containerImage }}-${{env.GAFFER_DEPENDENCIES_HASH}}-${{ matrix.buildType }}-
- name: Build
- name: Build Gaffer
run: |
scons -j 2 build ENV_VARS_TO_IMPORT=PATH BUILD_TYPE=${{ matrix.buildType }} DELIGHT_ROOT=$DELIGHT ARNOLD_ROOT= BUILD_DIR=./build BUILD_CACHEDIR=sconsCache
scons -j 2 build BUILD_TYPE=${{ matrix.buildType }} OPTIONS=.github/workflows/main/sconsOptions
- name: Test
run: |
${{ matrix.testRunner }} "./build/bin/gaffer test"
echo "::add-matcher::./.github/workflows/main/problemMatchers/unittest.json"
${{ matrix.testRunner }} "${{ env.GAFFER_BUILD_DIR }}/bin/gaffer test"
echo "::remove-matcher owner=unittest::"
- name: Build Docs and Package
# We currently experience sporadic hangs in the docs builds (mac), this
# aborts them in a more timely fashion than the default 6hr timeout.
timeout-minutes: 20
run: |
scons -j 2 package BUILD_TYPE=${{ matrix.buildType }} OPTIONS=.github/workflows/main/sconsOptions
if: matrix.publish

- name: Validate
run: |
echo "::add-matcher::./.github/workflows/main/problemMatchers/validateRelease.json"
./config/validateRelease.py --archive ${{ env.GAFFER_BUILD_NAME }}.tar.gz ${{ env.GAFFER_VALIDATE_EXTRA_FLAGS }}
echo "::remove-matcher owner=validateRelease::"
if: matrix.publish

- uses: actions/upload-artifact@v2
with:
name: ${{ env.GAFFER_BUILD_NAME }}
path: ${{ env.GAFFER_BUILD_NAME }}.tar.gz
if: matrix.publish && env.GAFFER_GITHUB_RELEASEID == ''

- name: Publish Release
run: |
./config/publishRelease.py --archive ${{ env.GAFFER_BUILD_NAME }}.tar.gz --repo ${{ github.repository }} --releaseId ${{ env.GAFFER_GITHUB_RELEASEID }}
if: matrix.publish && env.GAFFER_GITHUB_RELEASEID != ''
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Limit cache size
# GitHub has a limit of 5G for all caches in a repository. Because we write new
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main/installDependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# Determine default archive URL.

platform = "osx" if sys.platform == "darwin" else "linux"
defaultURL = "https://github.com/GafferHQ/dependencies/releases/download/1.6.0/gafferDependencies-1.6.0-" + platform + ".tar.gz"
defaultURL = "https://github.com/GafferHQ/dependencies/releases/download/2.1.1/gafferDependencies-2.1.1-Python2-" + platform + ".tar.gz"

# Parse command line arguments.

Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/main/problemMatchers/unittest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "unittest",
"severity": "error",
"pattern": [
{
"regexp": "^=+$",
},
{
"regexp": "^((ERROR|FAIL):\\s.+)$",
"message": 1
}
]
}
]
}
14 changes: 14 additions & 0 deletions .github/workflows/main/problemMatchers/validateRelease.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"problemMatcher": [
{
"owner": "validateRelease",
"pattern": [
{
"regexp": "^((ERROR|WARNING).+)$",
"message": 1,
"severity": 2
}
]
}
]
}
51 changes: 51 additions & 0 deletions .github/workflows/main/sconsOptions
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
##########################################################################
#
# Copyright (c) 2020, Cinesite VFX Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above
# copyright notice, this list of conditions and the following
# disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided with
# the distribution.
#
# * Neither the name of Cinesite VFX Ltd. nor the names of
# any other contributors to this software may be used to endorse or
# promote products derived from this software without specific prior
# written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
##########################################################################

import os

ENV_VARS_TO_IMPORT = "PATH"

BUILD_CACHEDIR = os.environ["GAFFER_CACHE_DIR"]

ARNOLD_ROOT = os.environ["ARNOLD_ROOT"]
DELIGHT_ROOT = os.environ["DELIGHT"]

BUILD_DIR = os.environ["GAFFER_BUILD_DIR"]
INSTALL_DIR = os.path.join( "install", os.environ["GAFFER_BUILD_NAME"] )

PACKAGE_FILE = "%s.tar.gz" % os.environ["GAFFER_BUILD_NAME"]

SPHINX = os.environ["GAFFER_SPHINX"]
Loading

0 comments on commit 4adb8b3

Please sign in to comment.