fix: SG-43585: Performance improvement of pyevaluate and pyexec #226
Workflow file for this run
This file contains hidden or 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: Conan-OpenRV | |
| on: | |
| schedule: | |
| # Midnight build every day | |
| - cron: "0 0 * * *" | |
| pull_request: | |
| paths: | |
| - '.github/workflows/conan.yml' | |
| - 'openrvcore-conanfile.py' | |
| - 'cmake/dependencies/**' | |
| env: | |
| SKIP_DEPS_CACHE: 'false' | |
| ROCKY_QT6_MODULES: 'debug_info qt3d qt5compat qtcharts qtconnectivity qtdatavis3d qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwaylandcompositor qtwebchannel qtwebengine qtwebsockets qtwebview' | |
| ROCKY_QT6_ARCHIVES: 'icu qtbase qtdeclarative qtsvg qttools qttranslations qtwayland' | |
| MACOX_X86_64_QT6_MODULES: 'debug_info qt3d qt5compat qtcharts qtconnectivity qtdatavis3d qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview' | |
| MACOX_X86_64_QT6_ARCHIVES: 'qtbase qtdeclarative qtsvg qttools qttranslations' | |
| WINDOWS_QT6_MODULES: 'debug_info qt3d qt5compat qtactiveqt qtcharts qtconnectivity qtdatavis3d qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview' | |
| WINDOWS_QT6_ARCHIVES: 'd3dcompiler_47 opengl32sw qtbase qtdeclarative qtsvg qttools qttranslations' | |
| jobs: | |
| rocky-linux: | |
| #if : ${{ github.repository_owner == 'AcademySoftwareFoundation' }} | |
| name: 'Rocky Linux ${{ matrix.rocky-version }} ${{ matrix.vfx-platform }} | |
| <qt=${{ matrix.qt-version }}, | |
| python=${{ matrix.python-version }}, | |
| cmake=${{ matrix.cmake-version }}, | |
| arch=${{ matrix.arch-type }}, | |
| config=${{ matrix.build-type }}>' | |
| runs-on: ${{ matrix.os }} | |
| container: | |
| image: ${{ matrix.image }} | |
| volumes: | |
| - /usr/local/lib/android:/github/home/android | |
| - /usr/share/dotnet:/github/home/dotnet | |
| - /opt/ghc:/github/home/ghc | |
| - /usr/local/.ghcup:/github/home/.ghcup | |
| - /usr/local/graalvm:/github/home/graalvm | |
| - /usr/local/share/powershell:/github/home/powershell | |
| - /usr/local/share/chromium:/github/home/chromium | |
| - /usr/local/lib/node_modules:/github/home/node_modules | |
| - /opt/hostedtoolcache/CodeQL:/github/home/CodeQL | |
| - /usr/local/share/boost:/github/home/boost | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # CY2024 | |
| - os: "ubuntu-latest" | |
| rocky-version: "8" | |
| image: "amd64/rockylinux:8" | |
| arch-type: "x86_64" | |
| build-type: "Release" | |
| qt-version: "6.5.3" | |
| cmake-version: "3.31.6" | |
| python-version: "3.11.8" | |
| vfx-platform: "CY2024" | |
| extra_repo: "powertools" | |
| conan-profile: "x86_64_rocky8" | |
| - os: "ubuntu-latest" | |
| rocky-version: "9" | |
| image: "amd64/rockylinux:9" | |
| arch-type: "x86_64" | |
| build-type: "Release" | |
| qt-version: "6.5.3" | |
| cmake-version: "3.31.6" | |
| python-version: "3.11.8" | |
| vfx-platform: "CY2024" | |
| extra_repo: "crb" | |
| conan-profile: "x86_64_rocky9" | |
| steps: | |
| - name: Display disk space | |
| run: | | |
| df -h / | |
| - name: Clear up some spaces on disk | |
| run: | | |
| # Delete files from host through the volumes | |
| # It will have some "cannot remove" message, but but atleast 10GB will be cleared. | |
| rm -rf /github/home/android || true | |
| rm -rf /github/home/dotnet || true | |
| rm -rf /github/home/ghc || true | |
| rm -rf /github/home/.ghcup || true | |
| rm -rf /github/home/graalvm || true | |
| rm -rf /github/home/powershell || true | |
| rm -rf /github/home/chromium || true | |
| rm -rf /github/home/node_modules || true | |
| rm -rf /github/home/CodeQL || true | |
| rm -rf /github/home/boost || true | |
| - name: Display disk space | |
| run: | | |
| df -h / | |
| - name: Install system dependencies | |
| run: | | |
| dnf install -y epel-release | |
| dnf config-manager --set-enabled ${{ matrix.extra_repo }} devel | |
| dnf install -y which findutils | |
| dnf groupinstall "Development Tools" -y | |
| dnf install -y alsa-lib-devel autoconf automake avahi-compat-libdns_sd-devel bison bzip2-devel cmake-gui curl-devel flex gcc gcc-c++ git libXcomposite libXi-devel libaio-devel libffi-devel nasm ncurses-devel nss libtool libxkbcommon libXcomposite libXdamage libXrandr libXtst libXcursor meson openssl-devel patch pulseaudio-libs pulseaudio-libs-glib2 ocl-icd ocl-icd-devel opencl-headers qt5-qtbase-devel readline-devel sqlite-devel systemd-devel tcl-devel tcsh tk-devel yasm zip zlib-devel wget patchelf pcsc-lite libxkbfile perl-IPC-Cmd perl-Digest-SHA | |
| dnf install -y libX11-devel libXext-devel libXrender-devel libXrandr-devel libXcursor-devel libXi-devel libXxf86vm-devel libxkbcommon-devel | |
| dnf install -y xz-devel mesa-libGLU mesa-libGLU-devel | |
| if [ "${{ matrix.rocky-version }}" = "9" ]; then \ | |
| dnf install -y mesa-compat-libOSMesa mesa-compat-libOSMesa-devel; \ | |
| else \ | |
| dnf install -y mesa-libOSMesa mesa-libOSMesa-devel; \ | |
| fi && \ | |
| dnf clean all | |
| - name: Install other system dependencies | |
| if: ${{ matrix.rocky-version == '9' }} | |
| run: | | |
| dnf install -y perl-CPAN | |
| cpan FindBin | |
| - name: Install GCC 11 toolchain for Rocky Linux 8 | |
| if: ${{ matrix.rocky-version == '8' }} | |
| run: | | |
| retry_count=0 | |
| max_retries=5 | |
| until [ $retry_count -ge $max_retries ]; do | |
| echo "Attempt $((retry_count + 1)) of $max_retries" | |
| if dnf install -y gcc-toolset-11-toolchain; then | |
| echo "GCC 11 toolchain installed successfully" | |
| break | |
| else | |
| retry_count=$((retry_count + 1)) | |
| if [ $retry_count -lt $max_retries ]; then | |
| echo "Attempt $retry_count failed. Retrying in 5 seconds..." | |
| sleep 5 | |
| fi | |
| fi | |
| done | |
| if [ $retry_count -ge $max_retries ]; then | |
| echo "Failed to install GCC 11 toolchain after $max_retries attempts" | |
| exit 1 | |
| fi | |
| - name: Enable GCC 11 toolchain for Rocky Linux 8 | |
| if: ${{ matrix.rocky-version == '8' }} | |
| run: | | |
| source /opt/rh/gcc-toolset-11/enable | |
| echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> $GITHUB_PATH | |
| echo "CC=/opt/rh/gcc-toolset-11/root/usr/bin/gcc" >> $GITHUB_ENV | |
| echo "CXX=/opt/rh/gcc-toolset-11/root/usr/bin/g++" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| gcc --version | |
| g++ --version | |
| - name: Check out repository code | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7 | |
| with: | |
| submodules: recursive | |
| - name: Add repository as safe directory | |
| run: | | |
| git config --global --add safe.directory /__w/OpenRV/OpenRV | |
| - name: Install pyenv | |
| run: | | |
| curl https://pyenv.run | bash | |
| export PYENV_ROOT="$HOME/.pyenv" | |
| echo "$PYENV_ROOT/shims" >> $GITHUB_PATH | |
| echo "$PYENV_ROOT/bin" >> $GITHUB_PATH | |
| - name: Setup pyenv | |
| run: | | |
| echo $PATH | |
| pyenv install ${{ matrix.python-version }} | |
| pyenv global ${{ matrix.python-version }} | |
| - name: Display Python installation location | |
| run: | | |
| python -c "import sys; print(sys.executable)" | |
| - name: Install Ninja | |
| run: | | |
| wget https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip | |
| unzip ninja-linux.zip -d ./ninja | |
| echo "$(pwd)/ninja" >> $GITHUB_PATH | |
| ninja --version | |
| - name: Install CMake | |
| run: | | |
| curl -SL -o cmake.tar.gz https://github.com/Kitware/CMake/releases/download/v${{ matrix.cmake-version }}/cmake-${{ matrix.cmake-version }}-Linux-x86_64.tar.gz | |
| tar -xzf cmake.tar.gz | |
| ls | |
| mv cmake-${{ matrix.cmake-version }}-linux-x86_64 ./cmake-${{ matrix.cmake-version }} | |
| echo "$(pwd)/cmake-${{ matrix.cmake-version }}/bin" >> $GITHUB_PATH | |
| - name: Prepare Qt folder | |
| run: | | |
| mkdir -p "${{ github.workspace }}/deps" | |
| - name: Install Qt ${{ matrix.qt-version }} | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '${{ matrix.qt-version }}' | |
| host: 'linux' | |
| target: 'desktop' | |
| arch: 'gcc_64' | |
| dir: "${{ github.workspace }}/deps" | |
| install-deps: 'false' | |
| modules: ${{ env.ROCKY_QT6_MODULES }} | |
| archives: ${{ env.ROCKY_QT6_ARCHIVES }} | |
| # Caching only save 2 minutes. Keep the cache for longer operations. | |
| cache: false | |
| setup-python: 'false' | |
| tools: 'tools_qtcreator' | |
| set-env: 'true' | |
| tools-only: 'false' | |
| aqtversion: '==3.2.*' | |
| - name: Install Python dependencies | |
| run: | | |
| echo "=== Python Environment Setup ===" | |
| which python3 | |
| python3 -c "import sys; print(f'Python executable: {sys.executable}')" | |
| python3 -c "import sys; print(f'Python prefix: {sys.prefix}')" | |
| python3 -c "import site; print(f'Site packages: {site.getsitepackages()}')" | |
| echo "=== Installing dependencies to pyenv environment ===" | |
| # Install to pyenv environment directly (no --user flag) | |
| python3 -m pip install --upgrade pip setuptools wheel | |
| python3 -m pip install --upgrade -r requirements.txt | |
| python3 -m pip install "six" "patch-ng>=1.18.0,<1.19" "requests>=2.25,<3.0.0" "urllib3>=1.26.6,<2.1" | |
| python3 -m pip install conan | |
| echo "=== Post-installation verification ===" | |
| python3 -c "import sys; print('Python path after installation:'); [print(f' {p}') for p in sys.path]" | |
| - name: Verify Python environment and Conan installation | |
| run: | | |
| echo "=== Python Environment Debug Info ===" | |
| python3 -c "import sys; print(f'Python executable: {sys.executable}')" | |
| python3 -c "import sys; print(f'Python version: {sys.version}')" | |
| python3 -c "import sys; print(f'Python prefix: {sys.prefix}')" | |
| python3 -c "import site; print(f'Site packages dirs: {site.getsitepackages()}')" | |
| echo "=== Installed packages location check ===" | |
| python3 -c "import six; import dateutil; import yaml;" | |
| echo "=== Verifying Conan installation ===" | |
| # Try to find conan in the Python environment first | |
| CONAN_PATH=$(python3 -c "import sys, os; print(os.path.join(sys.prefix, 'bin', 'conan'))" 2>/dev/null) || CONAN_PATH="" | |
| if [ -f "$CONAN_PATH" ]; then | |
| echo "Found Conan in pyenv environment: $CONAN_PATH" | |
| $CONAN_PATH --version | |
| elif [ -f "/github/home/.local/bin/conan" ]; then | |
| echo "Found Conan in user bin: /github/home/.local/bin/conan" | |
| /github/home/.local/bin/conan --version || { | |
| echo "ERROR: Conan in user bin failed, attempting to reinstall to pyenv environment..." | |
| python3 -m pip install --force-reinstall six python-dateutil setuptools | |
| python3 -m pip install --force-reinstall conan | |
| # Try again with pyenv conan | |
| NEW_CONAN_PATH=$(python3 -c "import sys, os; print(os.path.join(sys.prefix, 'bin', 'conan'))" 2>/dev/null) | |
| if [ -f "$NEW_CONAN_PATH" ]; then | |
| $NEW_CONAN_PATH --version | |
| else | |
| echo "ERROR: Could not install Conan to pyenv environment" | |
| exit 1 | |
| fi | |
| } | |
| else | |
| echo "ERROR: Conan not found in expected locations" | |
| exit 1 | |
| fi | |
| - name: Install Rust toolchain | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Verify Rust installation | |
| run: | | |
| source $HOME/.cargo/env | |
| rustc --version | |
| cargo --version | |
| - name: Set Conan Home Path | |
| run: | | |
| echo "=== Determining Conan executable path ===" | |
| # Try to find conan in pyenv environment first | |
| CONAN_PYENV_PATH=$(python3 -c "import sys, os; print(os.path.join(sys.prefix, 'bin', 'conan'))" 2>/dev/null) || CONAN_PYENV_PATH="" | |
| if [ -f "$CONAN_PYENV_PATH" ]; then | |
| echo "Using Conan from pyenv environment: $CONAN_PYENV_PATH" | |
| echo "CONAN_EXECUTABLE=$CONAN_PYENV_PATH" >> $GITHUB_ENV | |
| CONAN_CMD="$CONAN_PYENV_PATH" | |
| elif [ -f "/github/home/.local/bin/conan" ]; then | |
| echo "Using Conan from user bin: /github/home/.local/bin/conan" | |
| echo "CONAN_EXECUTABLE=/github/home/.local/bin/conan" >> $GITHUB_ENV | |
| CONAN_CMD="/github/home/.local/bin/conan" | |
| else | |
| echo "ERROR: Conan executable not found" | |
| exit 1 | |
| fi | |
| echo "=== Setting Conan Home Path ===" | |
| CONAN_HOME_OUTPUT=$($CONAN_CMD config home 2>&1) || { | |
| echo "ERROR: Failed to get Conan home path with $CONAN_CMD" | |
| echo "Conan output: $CONAN_HOME_OUTPUT" | |
| echo "Last attempt - trying to import required modules..." | |
| python3 -c "import six; import dateutil;" | |
| exit 1 | |
| } | |
| echo "Conan home path: $CONAN_HOME_OUTPUT" | |
| echo "CONAN_HOME=$CONAN_HOME_OUTPUT" >> $GITHUB_ENV | |
| - name: Add ASWF Conan remote | |
| # Required so conan/profiles/common [replace_requires] can resolve | |
| # openssl/*@openrv/vfx2024 from the ASWF JFrog Artifactory. | |
| # Anonymous read; no credentials needed for install. Uses aswftesting | |
| # (aswf-conan-dev) for now; swap to the 'aswf' production remote | |
| # once binaries are promoted there. | |
| # Rocky 8 currently has a prebuilt binary; other profiles will | |
| # build from source via the CCI recipe exported under this user/channel. | |
| run: | | |
| $CONAN_EXECUTABLE remote remove aswftesting 2>/dev/null || true | |
| $CONAN_EXECUTABLE remote add aswftesting https://linuxfoundation.jfrog.io/artifactory/api/conan/aswf-conan-dev --index 0 | |
| - name: Export OpenRVCore recipe to Conan's cache | |
| if: ${{ matrix.vfx-platform == 'CY2024' }} | |
| run: | | |
| export QT_HOME=/__w/OpenRV/OpenRV/deps/Qt/${{ matrix.qt-version}}/gcc_64 | |
| echo "QT_HOME=$QT_HOME" >> $GITHUB_ENV | |
| $CONAN_EXECUTABLE export openrvcore-conanfile.py | |
| - name: Build OpenRV dependencies | |
| # openexr (and every other dep covered by [replace_requires] in | |
| # conan/profiles/common) now resolves to @openrv/vfx2024 and is | |
| # pulled prebuilt from the ASWF remote on Rocky 8, built on the | |
| # matching toolchain. The earlier Rocky 8-specific `--build=openexr/*` | |
| # workaround is no longer needed. | |
| run: | | |
| # Rocky 8: force local rebuild of select packages whose Conan Center | |
| # prebuilts target a newer glibc / libstdc++ than Rocky 8 provides. | |
| # - openexr: prebuilt links against a newer libstdc++.so.6 the Rocky 8 | |
| # system lib (GCC 8) cannot satisfy; forcing local build picks up | |
| # gcc-toolset-11's libstdc++_nonshared.a (no dynamic VERNEED on | |
| # GLIBCXX_3.4.26+). | |
| # - b2: prebuilt requires GLIBC_2.32+ and won't run on Rocky 8 (glibc 2.28), | |
| # which fails boost's build step before the toolchain is even invoked. | |
| # TODO: drop these workarounds once we're consuming Conan packages from | |
| # the ASWF Conan registry (or a GitHub-cached Conan store) built on a | |
| # Rocky 8 / VFX Reference Platform compatible base. | |
| BUILD_FLAGS="--build=missing" | |
| if [ "${{ matrix.rocky-version }}" = "8" ]; then | |
| BUILD_FLAGS="--build=missing --build=openexr/* --build=b2/*" | |
| fi | |
| $CONAN_EXECUTABLE install conanfile.py $BUILD_FLAGS -pr:a ./conan/profiles/x86_64_rocky8 | |
| - name: Build OpenRV main executable | |
| run: | | |
| $CONAN_EXECUTABLE build conanfile.py --build=missing -pr:a ./conan/profiles/${{ matrix.conan-profile }} | |
| - name: Tests | |
| run: | | |
| ctest --test-dir build/Release -C ${{ matrix.build-type }} --extra-verbose | |
| - name: Free some spaces for the install steps | |
| run: | | |
| rm -rf build/Release/RV_DEPS_* | |
| rm -rf build/Release/_deps | |
| - name: Install OpenRV | |
| run: | | |
| ls -al build | |
| cmake --install build/Release --prefix $(pwd)/_install --config ${{ matrix.build-type }} | |
| macos: | |
| #if : ${{ github.repository_owner == 'AcademySoftwareFoundation' }} | |
| name: '${{ matrix.os }} ${{ matrix.arch-type }} ${{ matrix.vfx-platform }} | |
| <qt=${{ matrix.qt-version }}, | |
| python=${{ matrix.python-version }}, | |
| arch=${{ matrix.arch-type }}, | |
| config=${{ matrix.build-type }}>' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # VFX2024 | |
| #- os: "macos-13" | |
| #arch-type: "x86_64" | |
| #build-type: "Release" | |
| #qt-version: "6.5.3" | |
| #qt-version-short: "6.5" | |
| #python-version: "3.11" | |
| #cmake-version: "3.31.6" | |
| #vfx-platform: "CY2024" | |
| - os: "macos-14" | |
| arch-type: "arm64" | |
| build-type: "Release" | |
| qt-version: "6.5.3" | |
| qt-version-short: "6.5" | |
| python-version: "3.11" | |
| cmake-version: "3.31.6" | |
| vfx-platform: "CY2024" | |
| steps: | |
| - name: Check if it is a schedule job | |
| if: github.event_name == 'schedule' | |
| run: | | |
| echo "SKIP_DEPS_CACHE='true'" >> $GITHUB_ENV | |
| - name: Display disk space | |
| run: | | |
| df -h / | |
| - name: Clear up some spaces on disk | |
| run: | | |
| # Remove some unused XCode (Default is XCode 15.4). | |
| sudo rm -rf /Applications/Xcode_15.3.app | |
| sudo rm -rf /Applications/Xcode_15.2.app | |
| sudo rm -rf /Applications/Xcode_15.1.app | |
| sudo rm -rf /Applications/Xcode_15.0.1.app | |
| sudo rm -rf /Users/runner/Library/Android | |
| - name: Display disk space | |
| run: | | |
| df -h / | |
| - name: Check out repository code | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7 | |
| with: | |
| submodules: recursive | |
| - name: Add repository as safe directory | |
| run: | | |
| git config --global --add safe.directory /__w/OpenRV/OpenRV | |
| - name: Install cmake | |
| uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2 | |
| with: | |
| cmake-version: "${{ matrix.cmake-version }}" | |
| - name: Prepare Qt folder | |
| run: | | |
| mkdir -p "${{ github.workspace }}/deps" | |
| - name: Install Qt ${{ matrix.qt-version }} | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '${{ matrix.qt-version }}' | |
| host: 'mac' | |
| target: 'desktop' | |
| # clang_64 contains both x86_64 and arm64 for Qt 6. | |
| arch: 'clang_64' | |
| dir: "${{ github.workspace }}/deps" | |
| install-deps: 'false' | |
| modules: ${{ env.MACOX_X86_64_QT6_MODULES }} | |
| archives: ${{ env.MACOX_X86_64_QT6_ARCHIVES }} | |
| # Caching only save 2 minutes. Keep the cache for longer operations. | |
| cache: false | |
| setup-python: true | |
| tools: 'tools_qtcreator' | |
| set-env: 'true' | |
| tools-only: 'false' | |
| aqtversion: '==3.2.*' | |
| - name: Activate Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # 5.2.0 | |
| with: | |
| python-version: '${{ matrix.python-version }}' | |
| - name: Install Python dependencies | |
| run: | | |
| python3 -m pip install --user --upgrade -r requirements.txt | |
| python3 -m pip install --user conan | |
| - name: Install Homebrew dependencies | |
| # icu4c is needed for Qt UIC executable / AUTOUIC. | |
| # Might be to find another way to install icu4c if the icu4c recipe disappear. | |
| run: | | |
| retry_count=0 | |
| max_retries=5 | |
| until [ $retry_count -ge $max_retries ]; do | |
| echo "Attempt $((retry_count + 1)) of $max_retries" | |
| if brew install --formula cmake ninja readline sqlite3 xz zlib tcl-tk@8 python-tk autoconf automake libtool python yasm clang-format black meson nasm pkg-config glew && \ | |
| brew install --formula icu4c; then | |
| echo "Homebrew dependencies installed successfully" | |
| break | |
| else | |
| retry_count=$((retry_count + 1)) | |
| if [ $retry_count -lt $max_retries ]; then | |
| echo "Attempt $retry_count failed. Retrying in 5 seconds..." | |
| sleep 5 | |
| fi | |
| fi | |
| done | |
| if [ $retry_count -ge $max_retries ]; then | |
| echo "Failed to install Homebrew dependencies after $max_retries attempts" | |
| exit 1 | |
| fi | |
| - name: Set QT_HOME | |
| run: | | |
| echo "QT_HOME=${{ github.workspace }}/deps/Qt/${{ matrix.qt-version }}/macos" >> $GITHUB_ENV | |
| - name: Set Conan Home Path | |
| run: echo "CONAN_HOME=$(/Users/runner/Library/Python/3.11/bin/conan config home)" >> $GITHUB_ENV | |
| - name: Add ASWF Conan remote | |
| # See conan.yml Rocky step of the same name for rationale. | |
| run: | | |
| /Users/runner/Library/Python/3.11/bin/conan remote remove aswftesting 2>/dev/null || true | |
| /Users/runner/Library/Python/3.11/bin/conan remote add aswftesting https://linuxfoundation.jfrog.io/artifactory/api/conan/aswf-conan-dev --index 0 | |
| - name: Export OpenRVCore recipe | |
| if: ${{ matrix.vfx-platform == 'CY2024' }} | |
| run: | | |
| /Users/runner/Library/Python/3.11/bin/conan export openrvcore-conanfile.py | |
| - name: Build OpenRV dependencies | |
| run: | | |
| /Users/runner/Library/Python/3.11/bin/conan install conanfile.py --build=missing -pr:a ./conan/profiles/arm64_apple_release | |
| - name: Build OpenRV main executable | |
| run: | | |
| /Users/runner/Library/Python/3.11/bin/conan build conanfile.py --build=missing -pr:a ./conan/profiles/arm64_apple_release | |
| - name: Tests | |
| run: | | |
| ctest --test-dir build/Release -C ${{ matrix.build-type }} --extra-verbose | |
| - name: Free some spaces for the install steps | |
| run: | | |
| rm -rf build/Release/RV_DEPS_* | |
| rm -rf build/Release/_deps | |
| - name: Install OpenRV | |
| run: | | |
| ls -al build | |
| cmake --install build/Release --prefix $(pwd)/_install --config ${{ matrix.build-type }} | |
| windows: | |
| #if : ${{ github.repository_owner == 'AcademySoftwareFoundation' }} | |
| name: 'Windows ${{ matrix.vfx-platform }} | |
| <${{ matrix.os }} | |
| msvc=${{ matrix.msvc-component }}, | |
| qt=${{ matrix.qt-version }}, | |
| python=${{ matrix.python-version }}, | |
| cmake=${{ matrix.cmake-version }}, | |
| arch=${{ matrix.arch-type }}, | |
| config=${{ matrix.build-type }}>' | |
| env: | |
| MSYS2_ENV_CONV_EXCL: "INCLUDE;LIB;LIBPATH" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # VFX2024 | |
| - os: "windows-2022" | |
| arch-type: "x86_64" | |
| build-type: "Release" | |
| qt-version: "6.5.3" | |
| python-version: "3.11" | |
| cmake-version: "3.31.6" | |
| vfx-platform: "CY2024" | |
| msvc-component: "14.40.17.10.x86.x64" | |
| msvc-compiler: "14.40.33807" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7 | |
| with: | |
| submodules: recursive | |
| - name: Install MSVC components ${{ matrix.msvc-component }} | |
| run: | | |
| Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\" | |
| $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" | |
| $componentsToRemove= @( | |
| "Microsoft.VisualStudio.Component.VC.${{ matrix.msvc-component }}" | |
| "Microsoft.VisualStudio.Component.VC.${{ matrix.msvc-component }}.Spectre" | |
| ) | |
| [string]$workloadArgs = $componentsToRemove | ForEach-Object {" --add " + $_} | |
| $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache') | |
| # should be run twice | |
| $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden | |
| $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden | |
| - name: Set up MSVC ${{ matrix.msvc-compiler }} | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| toolset: ${{ matrix.msvc-compiler }} | |
| arch: '${{ matrix.arch-type }}' | |
| - name: Setup msys2 and install dependencies | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| # False because it keep creating new cache entry. | |
| cache: false | |
| install: >- | |
| mingw-w64-x86_64-autotools | |
| mingw-w64-x86_64-cmake | |
| mingw-w64-x86_64-cmake-cmcldeps | |
| mingw-w64-x86_64-glew | |
| mingw-w64-x86_64-libarchive | |
| mingw-w64-x86_64-make | |
| mingw-w64-x86_64-meson | |
| mingw-w64-x86_64-toolchain | |
| autoconf | |
| automake | |
| bison | |
| flex | |
| git | |
| libtool | |
| nasm | |
| p7zip | |
| patch | |
| unzip | |
| zip | |
| - name: Activate Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # 5.2.0 | |
| with: | |
| python-version: '${{ matrix.python-version }}' | |
| - name: Display Python installation location | |
| run: | | |
| python -c "import sys; print(sys.executable)" | |
| $pythonDir = python -c "import sys, os; print(os.path.dirname(sys.executable))" | |
| echo "WIN_PYTHON_DIR=$pythonDir" >> $env:GITHUB_ENV | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@0b1efabc08b657293548b77fb76cc02d26091c7e | |
| with: | |
| toolchain: stable | |
| - name: Cache CMake for Windows | |
| uses: actions/cache@v4 | |
| id: windows-cmake-cache | |
| with: | |
| path: "C:/Program Files/CMake" | |
| key: ${{ runner.os }}-cmake-${{ matrix.cmake-version }} | |
| - name: Install CMake ${{ matrix.cmake-version }} with chocolatey | |
| if: steps.windows-cmake-cache.outputs.cache-hit != 'true' | |
| run: | | |
| choco install cmake --version=${{ matrix.cmake-version }} --allow-downgrade | |
| - name: Install JOM (parallel nmake) | |
| run: choco install jom --yes | |
| shell: powershell | |
| - name: Set PATH environment variable | |
| run: | | |
| CMAKE_BIN=$(cygpath -u "C:/Program Files/CMake/bin") | |
| WIN_PYTHON_DIR=$(cygpath -u "$WIN_PYTHON_DIR") | |
| echo "export PATH=\"$CMAKE_BIN:$WIN_PYTHON_DIR:/c/msys64/mingw64/bin:\$PATH:/c/Strawberry/c/bin:/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/ProgramData/Chocolatey/bin:/c/ProgramData/Chocolatey/lib/jom/tools\"" >> ~/.bash_profile | |
| echo "export WIN_PYTHON_DIR=\"$WIN_PYTHON_DIR\"" >> ~/.bash_profile | |
| shell: msys2 {0} | |
| - name: Set ACLOCAL_PATH environment variable | |
| run: | | |
| echo "export ACLOCAL_PATH=/c/msys64/usr/share/aclocal" >> ~/.bash_profile | |
| shell: msys2 {0} | |
| - name: Add MSVC compiler to PATH for msys2 | |
| run: | | |
| if [ -n "$VCToolsInstallDir" ]; then | |
| MSVC_BIN=$(cygpath -u "$VCToolsInstallDir/bin/Hostx64/x64") | |
| echo "export PATH=\"$MSVC_BIN:\$PATH\"" >> ~/.bash_profile | |
| echo "Added MSVC bin to PATH: $MSVC_BIN" | |
| else | |
| echo "WARNING: VCToolsInstallDir not set, cl.exe will not be on PATH" | |
| fi | |
| shell: msys2 {0} | |
| - name: Add Rust to PATH for msys2 | |
| run: | | |
| echo "export PATH=\"/c/Users/runneradmin/.cargo/bin:\$PATH\"" >> ~/.bash_profile | |
| shell: msys2 {0} | |
| - name: Display environment variables | |
| run: | | |
| echo $PATH | |
| echo $ACLOCAL_PATH | |
| which python | |
| which python3 | |
| which cmake | |
| shell: msys2 {0} | |
| - name: Prepare Qt folder | |
| run: | | |
| mkdir -p /c/qt | |
| shell: msys2 {0} | |
| - name: Install Qt ${{ matrix.qt-version }} | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '${{ matrix.qt-version }}' | |
| host: 'windows' | |
| target: 'desktop' | |
| arch: 'win64_msvc2019_64' | |
| dir: "c:/" | |
| install-deps: 'false' | |
| modules: ${{ env.WINDOWS_QT6_MODULES }} | |
| archives: ${{ env.WINDOWS_QT6_ARCHIVES }} | |
| # Caching only save 2 minutes. Keep the cache for longer operations. | |
| cache: false | |
| setup-python: 'false' | |
| tools: 'tools_qtcreator' | |
| set-env: 'true' | |
| tools-only: 'false' | |
| aqtversion: '==3.2.*' | |
| - name: Install Python dependencies | |
| run: | | |
| python3 -m pip install --user --upgrade -r ./requirements.txt | |
| python3 -m pip install --user conan | |
| PYTHON_SCRIPTS_DIR=$(python3 -c "import site, os; scripts = site.getusersitepackages(); print(os.path.join(os.path.dirname(scripts), 'Scripts'))") | |
| echo "Python user Scripts dir: $PYTHON_SCRIPTS_DIR" | |
| PYTHON_SCRIPTS_MSYS=$(cygpath -u "$PYTHON_SCRIPTS_DIR") | |
| echo "export PATH=\"\$PATH:$PYTHON_SCRIPTS_MSYS\"" >> ~/.bash_profile | |
| ls -al "$PYTHON_SCRIPTS_MSYS" || echo "WARNING: Scripts dir not found at $PYTHON_SCRIPTS_MSYS" | |
| shell: msys2 {0} | |
| - name: Set Conan Home Path | |
| run: | | |
| echo "$PATH" | |
| cat ~/.bash_profile | |
| conan --version | |
| CONAN_HOME_PATH=$(conan config home) | |
| echo "export CONAN_HOME=\"$CONAN_HOME_PATH\"" >> ~/.bash_profile | |
| echo "CONAN_HOME=\"$CONAN_HOME_PATH\"" >> $GITHUB_ENV | |
| shell: msys2 {0} | |
| - name: Set QT_HOME | |
| run: | | |
| echo "export QT_HOME=c:/Qt/${{ matrix.qt-version }}/msvc2019_64" >> ~/.bash_profile | |
| shell: msys2 {0} | |
| - name: Setup PKG_CONFIG_PATH for Windows builds | |
| run: | | |
| # Set PKG_CONFIG_PATH to help FFmpeg find dependency .pc files | |
| # Add common Conan pkg-config paths that will be created during builds | |
| echo 'export PKG_CONFIG_PATH="$CONAN_HOME/p:$PKG_CONFIG_PATH"' >> ~/.bash_profile | |
| echo 'export PKG_CONFIG_PATH="/c/users/runneradmin/.conan2/p:$PKG_CONFIG_PATH"' >> ~/.bash_profile | |
| # Also try to set it for any build that might need it | |
| echo 'export PKG_CONFIG_PATH="${PWD}:$PKG_CONFIG_PATH"' >> ~/.bash_profile | |
| # Suppress MSYS2 warnings about /dev/shm and /dev/mqueue (harmless on Windows) | |
| mkdir -p /tmp/dev 2>/dev/null || true | |
| echo "PKG_CONFIG_PATH setup completed" | |
| cat ~/.bash_profile | tail -5 | |
| shell: msys2 {0} | |
| - name: Add ASWF Conan remote | |
| # See conan.yml Rocky step of the same name for rationale. | |
| run: | | |
| source ~/.bash_profile | |
| conan remote remove aswftesting 2>/dev/null || true | |
| conan remote add aswftesting https://linuxfoundation.jfrog.io/artifactory/api/conan/aswf-conan-dev --index 0 | |
| shell: msys2 {0} | |
| - name: Export OpenRVCore recipe | |
| if: ${{ matrix.vfx-platform == 'CY2024' }} | |
| run: | | |
| conan export openrvcore-conanfile.py | |
| shell: msys2 {0} | |
| - name: Verify compiler and toolchain resolution | |
| run: | | |
| source ~/.bash_profile | |
| echo "=== Toolchain diagnostics ===" | |
| echo "PATH: $PATH" | |
| echo "--- cmake ---" | |
| which cmake && cmake --version || echo "WARNING: cmake not found" | |
| echo "--- cl (MSVC compiler) ---" | |
| command -v cl 2>/dev/null && cl 2>&1 | head -1 || echo "WARNING: cl.exe not found in PATH" | |
| echo "--- MSVC env vars ---" | |
| echo "VCINSTALLDIR=${VCINSTALLDIR:-<not set>}" | |
| echo "VCToolsInstallDir=${VCToolsInstallDir:-<not set>}" | |
| echo "INCLUDE=${INCLUDE:-<not set>}" | |
| echo "LIB=${LIB:-<not set>}" | |
| echo "=== End diagnostics ===" | |
| shell: msys2 {0} | |
| - name: Build and install OpenRV dependencies | |
| run: | | |
| source ~/.bash_profile | |
| conan install conanfile.py --build=missing -pr:a ./conan/profiles/x86_64_windows -c tools.microsoft.bash:path=C:/msys64/usr/bin/bash.exe -c tools.microsoft.bash:subsystem=msys2 | |
| shell: msys2 {0} | |
| - name: Build OpenRV main executable | |
| run: | | |
| conan build conanfile.py --build=missing -pr:a ./conan/profiles/x86_64_windows -c tools.microsoft.bash:path=C:/msys64/usr/bin/bash.exe -c tools.microsoft.bash:subsystem=msys2 | |
| shell: msys2 {0} | |
| - name: Tests | |
| continue-on-error: true | |
| run: | | |
| ls -al build | |
| ls -al build/stage/app/bin | |
| ctest --test-dir build -C ${{ matrix.build-type }} --extra-verbose | |
| shell: msys2 {0} | |
| - name: Install OpenRV | |
| run: | | |
| cmake --install build --prefix $(pwd)/_install --config ${{ matrix.build-type }} | |
| shell: msys2 {0} |