Skip to content

Commit

Permalink
onemorego
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Jan 4, 2024
1 parent 5419f8a commit fb612e9
Showing 1 changed file with 81 additions and 81 deletions.
162 changes: 81 additions & 81 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,91 +148,91 @@ jobs:
shell: pwsh
if: runner.os == 'Windows'

- name: Cache
uses: actions/cache@v3
with:
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 Gaffer
run: |
scons -j 2 build BUILD_TYPE=${{ matrix.buildType }} OPTIONS=.github/workflows/main/sconsOptions
env:
PYTHONUTF8: 1

- name: Test
# Tests should complete in well under an hour. If they don't it's most likely because
# of a hang, in which case we'd like to know more quickly than the default 6hr timeout
# allows.
timeout-minutes: 60
run: |
echo "::add-matcher::./.github/workflows/main/problemMatchers/unittest.json"
${{ matrix.testRunner }} "${{ env.GAFFER_BUILD_DIR }}/bin/gaffer test ${{ matrix.testArguments }}"
echo "::remove-matcher owner=unittest::"
- name: Build and test Arnold extension
run: |
import subprocess
import sys
import os
for arnoldVersion in [ "7.1.1.0", "7.2.1.0" ] :
arnoldRoot = os.path.join( os.environ["GITHUB_WORKSPACE"], "arnoldRoot", arnoldVersion )
os.environ["ARNOLD_ROOT"] = arnoldRoot
subprocess.check_call(
[
sys.executable,
".github/workflows/main/installArnold.py",
"--version",
arnoldVersion
]
)
#Build Arnold extension
subprocess.check_call( "scons -j 2 build BUILD_TYPE=${{ matrix.buildType }} OPTIONS=.github/workflows/main/sconsOptions", shell = True )
if os.name != "nt" :
# Test Arnold extension
print( "::add-matcher::./.github/workflows/main/problemMatchers/unittest.json" )
subprocess.check_call( "${{ matrix.testRunner }} \"" + os.path.join( os.environ["GAFFER_BUILD_DIR"], "bin", "gaffer" ) + " test IECoreArnoldTest GafferArnoldTest GafferArnoldUITest\"", shell = True )
print( "::remove-matcher owner=unittest::" )
# Publish ARNOLD_ROOT to the environment for subsequent steps,
# so we can build the docs for GafferArnold.
with open( os.environ["GITHUB_ENV"], "a" ) as f :
print( "Setting $ARNOLD_ROOT to '%s'" % arnoldRoot )
f.write( 'ARNOLD_ROOT=%s\n' % arnoldRoot )
env:
PYTHONUTF8: 1
ARNOLD_DOWNLOAD_USER: ${{ secrets.ARNOLD_DOWNLOAD_USER }}
ARNOLD_DOWNLOAD_PASSWORD: ${{ secrets.ARNOLD_DOWNLOAD_PASSWORD }}
shell: python
# We can't build GafferArnold for pull requests from forks, because the
# authentication secrets for downloading Arnold aren't available (this is
# a GitHub security restriction). The core development team can still build
# GafferArnold for pull requests by pushing a branch to the main repo and
# making a pull request from there.
if: ${{ env.ARNOLD_DOWNLOAD_USER != '' }}

- name: Build Docs and Package
# Docs builds should be relatively quick. If there is a problem, this
# aborts them in a more timely fashion than the default 6hr timeout.
timeout-minutes: 20
run: |
# Treats warnings-as-errors so we know about broken links
echo "::add-matcher::./.github/workflows/main/problemMatchers/sphinx.json"
scons -j 2 package BUILD_TYPE=${{ matrix.buildType }} OPTIONS=.github/workflows/main/sconsOptions
echo "::remove-matcher owner=sphinx::"
env:
PYTHONUTF8: 1
if: matrix.publish
# - name: Cache
# uses: actions/cache@v3
# with:
# 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 Gaffer
# run: |
# scons -j 2 build BUILD_TYPE=${{ matrix.buildType }} OPTIONS=.github/workflows/main/sconsOptions
# env:
# PYTHONUTF8: 1

# - name: Test
# # Tests should complete in well under an hour. If they don't it's most likely because
# # of a hang, in which case we'd like to know more quickly than the default 6hr timeout
# # allows.
# timeout-minutes: 60
# run: |
# echo "::add-matcher::./.github/workflows/main/problemMatchers/unittest.json"
# ${{ matrix.testRunner }} "${{ env.GAFFER_BUILD_DIR }}/bin/gaffer test ${{ matrix.testArguments }}"
# echo "::remove-matcher owner=unittest::"

# - name: Build and test Arnold extension
# run: |
# import subprocess
# import sys
# import os

# for arnoldVersion in [ "7.1.1.0", "7.2.1.0" ] :
# arnoldRoot = os.path.join( os.environ["GITHUB_WORKSPACE"], "arnoldRoot", arnoldVersion )
# os.environ["ARNOLD_ROOT"] = arnoldRoot

# subprocess.check_call(
# [
# sys.executable,
# ".github/workflows/main/installArnold.py",
# "--version",
# arnoldVersion
# ]
# )
# #Build Arnold extension
# subprocess.check_call( "scons -j 2 build BUILD_TYPE=${{ matrix.buildType }} OPTIONS=.github/workflows/main/sconsOptions", shell = True )

# if os.name != "nt" :
# # Test Arnold extension
# print( "::add-matcher::./.github/workflows/main/problemMatchers/unittest.json" )
# subprocess.check_call( "${{ matrix.testRunner }} \"" + os.path.join( os.environ["GAFFER_BUILD_DIR"], "bin", "gaffer" ) + " test IECoreArnoldTest GafferArnoldTest GafferArnoldUITest\"", shell = True )
# print( "::remove-matcher owner=unittest::" )

# # Publish ARNOLD_ROOT to the environment for subsequent steps,
# # so we can build the docs for GafferArnold.
# with open( os.environ["GITHUB_ENV"], "a" ) as f :
# print( "Setting $ARNOLD_ROOT to '%s'" % arnoldRoot )
# f.write( 'ARNOLD_ROOT=%s\n' % arnoldRoot )
# env:
# PYTHONUTF8: 1
# ARNOLD_DOWNLOAD_USER: ${{ secrets.ARNOLD_DOWNLOAD_USER }}
# ARNOLD_DOWNLOAD_PASSWORD: ${{ secrets.ARNOLD_DOWNLOAD_PASSWORD }}
# shell: python
# # We can't build GafferArnold for pull requests from forks, because the
# # authentication secrets for downloading Arnold aren't available (this is
# # a GitHub security restriction). The core development team can still build
# # GafferArnold for pull requests by pushing a branch to the main repo and
# # making a pull request from there.
# if: ${{ env.ARNOLD_DOWNLOAD_USER != '' }}

# - name: Build Docs and Package
# # Docs builds should be relatively quick. If there is a problem, this
# # aborts them in a more timely fashion than the default 6hr timeout.
# timeout-minutes: 20
# run: |
# # Treats warnings-as-errors so we know about broken links
# echo "::add-matcher::./.github/workflows/main/problemMatchers/sphinx.json"
# scons -j 2 package BUILD_TYPE=${{ matrix.buildType }} OPTIONS=.github/workflows/main/sconsOptions
# echo "::remove-matcher owner=sphinx::"
# env:
# PYTHONUTF8: 1
# if: matrix.publish

- name: Validate
run: |
echo "::add-matcher::./.github/workflows/main/problemMatchers/validateRelease.json"
python ./config/validateRelease.py --archive ${{ env.GAFFER_BUILD_NAME }}.${{ env.PACKAGE_EXTENSION }} ${{ env.GAFFER_VALIDATE_EXTRA_FLAGS }} ${{ env.ARNOLD_DOWNLOAD_USER == '' && '--skipPaths arnold' || '' }}
python ./config/validateRelease.py --archive ${{ env.GAFFER_BUILD_NAME }}.${{ env.PACKAGE_EXTENSION }} ${{ env.GAFFER_VALIDATE_EXTRA_FLAGS }} ${{ secrets.ARNOLD_DOWNLOAD_USER == '' && '--skipPaths arnold' || '' }}
echo "::remove-matcher owner=validateRelease::"
if: matrix.publish

Expand Down

0 comments on commit fb612e9

Please sign in to comment.