From 2f13fad87fa9ca96bd8bda9c4b2be5898f080e66 Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Sun, 8 Sep 2024 10:34:53 -0700 Subject: [PATCH] TRY: add a workflow that builds docs Signed-off-by: Larry Gritz --- .github/workflows/docs.yml | 212 +++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..8eaba0ebfc --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,212 @@ +# Copyright Contributors to the OpenImageIO project. +# SPDX-License-Identifier: Apache-2.0 +# https://github.com/AcademySoftwareFoundation/OpenImageIO + +name: docs + +on: + push: + # Skip jobs when only cpp files are changed. The materials for + # docs are all in md, rst, and .h files. + paths-ignore: + - '**.analysis.yml' + - '**.properties' + - '**.cpp' + pull_request: + paths-ignore: + - '**.analysis.yml' + - '**.properties' + - '**.cpp' + schedule: + # Full nightly build + - cron: "0 8 * * *" + if: github.repository == 'AcademySoftwareFoundation/OpenImageIO' + workflow_dispatch: + # This allows manual triggering of the workflow from the web + +permissions: read-all + + +jobs: + + aswf: + name: "Docs / VFX${{matrix.vfxyear}} ${{matrix.desc}}" + strategy: + fail-fast: false + matrix: + include: + - desc: gcc11/C++17 py3.11 exr3.2 ocio2.3 + nametag: docslinux-vfx2024 + runner: ubuntu-latest + container: aswftesting/ci-osl:2024-clang17 + vfxyear: 2024 + cxx_std: 17 + python_ver: "3.11" + simd: "avx2,f16c" + fmt_ver: 10.1.1 + pybind11_ver: v2.12.0 + + runs-on: ${{ matrix.runner }} + container: + image: ${{ matrix.container }} + env: + CXX: ${{matrix.cxx_compiler}} + CC: ${{matrix.cc_compiler}} + CMAKE_CXX_STANDARD: ${{matrix.cxx_std}} + USE_SIMD: ${{matrix.simd}} + FMT_VERSION: ${{matrix.fmt_ver}} + OPENCOLORIO_VERSION: ${{matrix.opencolorio_ver}} + OPENEXR_VERSION: ${{matrix.openexr_ver}} + PYBIND11_VERSION: ${{matrix.pybind11_ver}} + PYTHON_VERSION: ${{matrix.python_ver}} + ABI_CHECK: ${{matrix.abi_check}} + ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + steps: + # We would like to use harden-runner, but it flags too many false + # positives, every time we download a dependency. We should use it only + # on CI runs where we are producing artifacts that users might rely on. + # - name: Harden Runner + # uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3 + # with: + # egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + # Note: can't upgrade to actions/checkout 4.0 because it needs newer + # glibc than these containers have. + - name: Prepare ccache timestamp + id: ccache_cache_keys + run: echo "date=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" >> $GITHUB_OUTPUT + - name: ccache + id: ccache + uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3 + # Note: can't upgrade to actions/cache 4.0 because it needs newer + # glibc than these containers have. + with: + path: /tmp/ccache + key: ${{github.job}}-${{matrix.nametag}}-${{steps.ccache_cache_keys.outputs.date}} + restore-keys: ${{github.job}}- + - name: Build setup + run: | + ${{matrix.setenvs}} + src/build-scripts/ci-startup.bash + - name: Dependencies + if: 0 + run: | + ${{matrix.depcmds}} + src/build-scripts/gh-installdeps.bash + - name: Build + run: src/build-scripts/ci-build.bash + - name: Testsuite + if: matrix.skip_tests != '1' + run: src/build-scripts/ci-test.bash + - name: Check out ABI standard + if: matrix.abi_check != '' + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{matrix.abi_check}} + path: abi_standard + - name: Build ABI standard + if: matrix.abi_check != '' + run: | + mkdir -p abi_standard/build + pushd abi_standard + src/build-scripts/ci-build.bash + popd + - name: Check ABI + if: matrix.abi_check != '' + run: | + src/build-scripts/ci-abicheck.bash ./build abi_standard/build libOpenImageIO libOpenImageIO_Util + - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + # Note: versions of upload-artifact >= 4.0 can't run on the ASWF + # containers because they need a newer glibc than they have. + with: + name: oiio-docs + path: | + build/sphinx + + + ubuntu: + name: "Docs / Ubuntu ${{matrix.desc}}" + strategy: + fail-fast: false + matrix: + include: + - desc: latest releases gcc12 C++17 avx2 exr3.2 ocio2.3 + nametag: linux-latest-releases + runner: ubuntu-24.04 + cc_compiler: gcc-12 + cxx_compiler: g++-12 + cxx_std: 17 + fmt_ver: 10.1.1 + opencolorio_ver: v2.3.2 + openexr_ver: v3.2.4 + pybind11_ver: v2.12.0 + python_ver: "3.10" + simd: avx2,f16c + skip_tests: 1 + setenvs: export LIBJPEGTURBO_VERSION=3.0.1 + LIBRAW_VERSION=0.21.2 + LIBTIFF_VERSION=v4.6.0 + OPENJPEG_VERSION=v2.4.0 + PTEX_VERSION=v2.4.2 + PUGIXML_VERSION=v1.14 + WEBP_VERSION=v1.4.0 + FREETYPE_VERSION=VER-2-13-2 + EXTRA_DEP_PACKAGES="libboost-dev" + + runs-on: ${{ matrix.runner }} + env: + CXX: ${{matrix.cxx_compiler}} + CC: ${{matrix.cc_compiler}} + CMAKE_CXX_STANDARD: ${{matrix.cxx_std}} + USE_SIMD: ${{matrix.simd}} + FMT_VERSION: ${{matrix.fmt_ver}} + OPENCOLORIO_VERSION: ${{matrix.opencolorio_ver}} + OPENEXR_VERSION: ${{matrix.openexr_ver}} + PYBIND11_VERSION: ${{matrix.pybind11_ver}} + PYTHON_VERSION: ${{matrix.python_ver}} + steps: + # We would like to use harden-runner, but it flags too many false + # positives, every time we download a dependency. We should use it only + # on CI runs where we are producing artifacts that users might rely on. + # - name: Harden Runner + # uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # v1.4.3 + # with: + # egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - name: Prepare ccache timestamp + id: ccache_cache_keys + run: echo "date=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" >> $GITHUB_OUTPUT + - name: ccache + id: ccache + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + with: + path: /tmp/ccache + key: ${{github.job}}-${{matrix.nametag}}-${{ steps.ccache_cache_keys.outputs.date }} + restore-keys: ${{github.job}}- + save-always: true + - name: Build setup + run: | + ${{matrix.setenvs}} + src/build-scripts/ci-startup.bash + # - name: Dependencies + # run: | + # ${{matrix.depcmds}} + # src/build-scripts/gh-installdeps.bash + # - name: Build + # run: src/build-scripts/ci-build.bash + # - name: Testsuite + # if: matrix.skip_tests != '1' + # run: src/build-scripts/ci-test.bash + - name: Build Docs + run: | + cd src/doc + make doxygen + make sphinx + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 + # if: failure() + with: + name: oiio-docs + path: | + build/sphinx +