diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce6960d7cc1..eb69a06a27a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,7 @@ on: branches: - main - '*_maintenance' + - 'windowsDocs' pull_request: branches: - '*' @@ -28,48 +29,48 @@ jobs: # and then use `include` to define their settings. name: [ - linux-gcc9, - linux-debug-gcc9, - linux-gcc11, + # linux-gcc9, + # linux-debug-gcc9, + # linux-gcc11, windows, ] include: - - name: linux-gcc9 - os: ubuntu-20.04 - buildType: RELEASE - publish: true - containerImage: ghcr.io/gafferhq/build/build:2.1.2 - # 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 - # test user rather than as root. - testRunner: su testUser -c - sconsCacheMegabytes: 400 - - - name: linux-debug-gcc9 - os: ubuntu-20.04 - buildType: DEBUG - publish: false - containerImage: ghcr.io/gafferhq/build/build:2.1.2 - testRunner: su testUser -c - testArguments: -excludedCategories performance - # Debug builds are ludicrously big, so we must use a larger cache - # limit. In practice this compresses down to 4-500Mb. - sconsCacheMegabytes: 2500 - - - name: linux-gcc11 - os: ubuntu-20.04 - buildType: RELEASE - publish: true - containerImage: ghcr.io/gafferhq/build/build:3.0.0 - # 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 - # test user rather than as root. - testRunner: su testUser -c - sconsCacheMegabytes: 400 + # - name: linux-gcc9 + # os: ubuntu-20.04 + # buildType: RELEASE + # publish: true + # containerImage: ghcr.io/gafferhq/build/build:2.1.2 + # # 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 + # # test user rather than as root. + # testRunner: su testUser -c + # sconsCacheMegabytes: 400 + + # - name: linux-debug-gcc9 + # os: ubuntu-20.04 + # buildType: DEBUG + # publish: false + # containerImage: ghcr.io/gafferhq/build/build:2.1.2 + # testRunner: su testUser -c + # testArguments: -excludedCategories performance + # # Debug builds are ludicrously big, so we must use a larger cache + # # limit. In practice this compresses down to 4-500Mb. + # sconsCacheMegabytes: 2500 + + # - name: linux-gcc11 + # os: ubuntu-20.04 + # buildType: RELEASE + # publish: true + # containerImage: ghcr.io/gafferhq/build/build:3.0.0 + # # 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 + # # test user rather than as root. + # testRunner: su testUser -c + # sconsCacheMegabytes: 400 - name: windows os: windows-2019 @@ -100,7 +101,7 @@ jobs: - name: Install toolchain (Windows) run: | - python -m pip install scons + python -m pip install scons sphinx==4.3.1 sphinx_rtd_theme==1.0.0 myst-parser==0.15.2 docutils==0.17.1 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-serializinghtml==1.1.5 sphinxcontrib-qthelp==1.0.3 Invoke-WebRequest -Uri "https://inkscape.org/gallery/item/37363/inkscape-1.2.2_2022-12-09_732a01da63-x64.exe" -OutFile "inkscape.exe" Start-Process .\inkscape.exe /S -NoNewWindow -Wait shell: pwsh @@ -174,15 +175,15 @@ jobs: 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: 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: | diff --git a/.github/workflows/main/sconsOptions b/.github/workflows/main/sconsOptions index c6b108b28f1..c1e2ba9f2e9 100644 --- a/.github/workflows/main/sconsOptions +++ b/.github/workflows/main/sconsOptions @@ -61,4 +61,4 @@ if sys.platform == "win32" : LOCATE_DEPENDENCY_PYTHONPATH=os.path.join(os.environ["GAFFER_BUILD_DIR"], "python") GLEW_LIB_SUFFIX = "32" INKSCAPE = "C:\\Program Files\\Inkscape\\bin\\inkscape.exe" - SPHINX = "noSphinxYet" + SPHINX = "C:\\hostedtoolcache\\windows\\Python\\3.7.9\\x64\\Scripts\\sphinx-build.exe" diff --git a/SConstruct b/SConstruct index 5ab4b445f0b..f9d59d3e2b1 100644 --- a/SConstruct +++ b/SConstruct @@ -2182,13 +2182,15 @@ def generateDocs( target, source, env ) : localFile = os.path.basename( str(source[0]) ) ext = os.path.splitext( localFile )[1] + gafferCmd = shutil.which( "gaffer.cmd" if sys.platform == "win32" else "gaffer", path = env["ENV"]["PATH"] ) + command = [] if localFile == "screengrab.py" : - command = [ "gaffer", "screengrab", "-commandFile", localFile ] + command = [ gafferCmd, "screengrab", "-commandFile", localFile ] elif ext == ".py" : - command = [ "gaffer", "env", "python", localFile ] + command = [ gafferCmd, "env", "python", localFile ] elif ext == ".sh" : - command = [ "gaffer", "env", "./" + localFile ] + command = [ gafferCmd, "env", "sh" if sys.patform == "win32" else "", "./" + localFile ] if command : sys.stdout.write( "Running {0}\n".format( os.path.join( root, localFile ) ) ) subprocess.check_call( command, cwd = root, env = env["ENV"] ) @@ -2257,7 +2259,7 @@ if haveSphinx and haveInkscape : # use host python to avoid needing a matrix of sphinx versions to match Gaffer's # bundled python version. docEnv = env.Clone() - docEnv["ENV"]["PYTHONPATH"] = ":".join( sys.path ) + docEnv["ENV"]["PYTHONPATH"] = os.path.pathsep.join( sys.path ) # Since we don't copy the docs reference scripts, the screengrab # scripts must read them from the source, so we use the reference @@ -2273,9 +2275,9 @@ if haveSphinx and haveInkscape : libraryPathEnvVar = "DYLD_LIBRARY_PATH" if docEnv["PLATFORM"]=="darwin" else "LD_LIBRARY_PATH" if docCommandEnv.subst( "$ARNOLD_ROOT" ) : - docCommandEnv["ENV"]["PATH"] += ":" + docCommandEnv.subst( "$ARNOLD_ROOT/bin" ) - docCommandEnv["ENV"]["PYTHONPATH"] += ":" + docCommandEnv.subst( "$ARNOLD_ROOT/python" ) - docCommandEnv["ENV"][libraryPathEnvVar] = docCommandEnv["ENV"].get( libraryPathEnvVar, "" ) + ":" + docCommandEnv.subst( "$ARNOLD_ROOT/bin" ) + docCommandEnv["ENV"]["PATH"] += os.path.pathsep + docCommandEnv.subst( "$ARNOLD_ROOT/bin" ) + docCommandEnv["ENV"]["PYTHONPATH"] += os.path.pathsep + docCommandEnv.subst( "$ARNOLD_ROOT/python" ) + docCommandEnv["ENV"][libraryPathEnvVar] = docCommandEnv["ENV"].get( libraryPathEnvVar, "" ) + os.path.pathsep + docCommandEnv.subst( "$ARNOLD_ROOT/bin" ) # Docs graphics generation docGraphicsCommands = graphicsCommands( docEnv, "resources/docGraphics.svg", "$BUILD_DIR/doc/gaffer/graphics" ) diff --git a/doc/source/generate.sh b/doc/source/generate.sh index 262cc372f4c..d0d43a48521 100755 --- a/doc/source/generate.sh +++ b/doc/source/generate.sh @@ -4,5 +4,5 @@ set -e -cp ../../resources/GafferLogo.svg _static -cp ../../resources/GafferLogoMini.svg _static +cp $GAFFER_ROOT/graphics/GafferLogo.svg _static +cp $GAFFER_ROOT/graphics/GafferLogoMini.svg _static