Skip to content

Commit

Permalink
Windows fix + add ci without ci-openrv from aswf for now
Browse files Browse the repository at this point in the history
Signed-off-by: Cédrik Fuoco <[email protected]>
  • Loading branch information
cedrik-fuoco-adsk committed Oct 23, 2024
1 parent 41ce483 commit 4de1a2f
Show file tree
Hide file tree
Showing 6 changed files with 297 additions and 131 deletions.
4 changes: 3 additions & 1 deletion .github/actions/build-qt5-for-arm64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ runs:
- name: Download Qt ${{ inputs.qt-version }} source
if: steps.arm64-qt.outputs.cache-hit != 'true'
run: |
curl https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/5.15/${{ inputs.qt-version }}/single/qt-everywhere-opensource-src-${{ inputs.qt-version }}.tar.xz -o qt.tar.xz
QT_MAJOR_MINOR=$(echo ${{ inputs.qt-version }} | cut -d '.' -f 1-2)
echo "QT_MAJOR_MINOR=$QT_MAJOR_MINOR" >> $GITHUB_ENV
curl https://www.nic.funet.fi/pub/mirrors/download.qt-project.org/official_releases/qt/${QT_MAJOR_MINOR}/${{ inputs.qt-version }}/single/qt-everywhere-opensource-src-${{ inputs.qt-version }}.tar.xz -o qt.tar.xz
tar xf qt.tar.xz
mv qt-everywhere-src-${{ inputs.qt-version }} qt-src
shell: bash
Expand Down
203 changes: 193 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ on:

env:
SKIP_DEPS_CACHE: 'false'
QT5_MODULES: 'debug_info qtcharts qtdatavis3d qtlottie qtnetworkauth qtquick3d qtquicktimeline qtscript qtwebengine qtwebglplugin'
ROCKY_QT5_ARCHIVES: 'icu qt3d qtbase qtconnectivity qtdeclarative qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtremoteobjects qtscxml qtsensors qtsvg qttools qttranslations qtwayland qtwebchannel qtwebsockets qtwebview qtx11extras qtxmlpatterns'
MACOX_X86_64_QT5_ARCHIVES: 'd3dcompiler_47 opengl32sw qt3d qtactiveqt qtbase qtconnectivity qtdeclarative qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtremoteobjects qtscxml qtsensors qtsvg qttools qttranslations qtwebchannel qtwebsockets qtwebview qtwinextras qtxmlpatterns'
WINDOWS_QT5_ARCHIVES: 'd3dcompiler_47 opengl32sw qt3d qtactiveqt qtbase qtconnectivity qtdeclarative qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtremoteobjects qtscxml qtsensors qtsvg qttools qttranslations qtwebchannel qtwebsockets qtwebview qtwinextras qtxmlpatterns'

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:
Expand Down Expand Up @@ -94,6 +105,48 @@ jobs:
python-version: "3.11.8"
vfx-platform: "CY2023"
extra_repo: "crb"

# 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.29.8"
python-version: "3.11.8"
vfx-platform: "CY2024"
extra_repo: "powertools"
- 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.29.8"
python-version: "3.11.8"
vfx-platform: "CY2024"
extra_repo: "crb"
- os: "ubuntu-latest"
rocky-version: "8"
image: "amd64/rockylinux:8"
arch-type: "x86_64"
build-type: "Debug"
qt-version: "6.5.3"
cmake-version: "3.29.8"
python-version: "3.11.8"
vfx-platform: "CY2024"
extra_repo: "powertools"
- os: "ubuntu-latest"
rocky-version: "9"
image: "amd64/rockylinux:9"
arch-type: "x86_64"
build-type: "Debug"
qt-version: "6.5.3"
cmake-version: "3.29.8"
python-version: "3.11.8"
vfx-platform: "CY2024"
extra_repo: "crb"
steps:
- name: Display disk space
run: |
Expand All @@ -118,6 +171,7 @@ jobs:
dnf config-manager --set-enabled ${{ matrix.extra_repo }} devel
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 mesa-libOSMesa mesa-libOSMesa-devel meson openssl-devel patch pulseaudio-libs pulseaudio-libs-glib2 ocl-icd ocl-icd-devel opencl-headers python3 python3-devel qt5-qtbase-devel readline-devel sqlite-devel tcl-devel tcsh tk-devel yasm zip zlib-devel wget
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
- name: Install other system dependencies
Expand Down Expand Up @@ -173,6 +227,7 @@ jobs:
mkdir -p "${{ github.workspace }}/deps"
- name: Install Qt ${{ matrix.qt-version }}
if: ${{ matrix.vfx-platform == 'CY2023' }}
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt-version }}'
Expand All @@ -181,8 +236,28 @@ jobs:
arch: 'gcc_64'
dir: "${{ github.workspace }}/deps"
install-deps: 'false'
modules: 'debug_info qtcharts qtdatavis3d qtlottie qtnetworkauth qtquick3d qtquicktimeline qtscript qtwebengine qtwebglplugin'
archives: 'icu qt3d qtbase qtconnectivity qtdeclarative qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtremoteobjects qtscxml qtsensors qtsvg qttools qttranslations qtwayland qtwebchannel qtwebsockets qtwebview qtx11extras qtxmlpatterns'
modules: ${{ env.QT5_MODULES }}
archives: ${{ env.ROCKY_QT5_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.1.*'

- name: Install Qt ${{ matrix.qt-version }}
if: ${{ matrix.vfx-platform == 'CY2024' }}
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'
Expand All @@ -199,9 +274,16 @@ jobs:
# because there is not enough room in the cache (10GB limit) for all platforms.

- name: Configure OpenRV
if: ${{ matrix.vfx-platform == 'CY2023' }}
run: |
export QT_HOME=/__w/OpenRV/OpenRV/deps/Qt/${{ matrix.qt-version}}/gcc_64
cmake -B _build -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT5_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
- name: Configure OpenRV
if: ${{ matrix.vfx-platform == 'CY2024' }}
run: |
export QT_HOME=/__w/OpenRV/OpenRV/deps/Qt/${{ matrix.qt-version}}/gcc_64
cmake -B _build -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT6_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
- name: Build OpenRV dependencies
run: |
Expand Down Expand Up @@ -256,6 +338,32 @@ jobs:
qt-version: "5.15.15"
python-version: "3.11"
vfx-platform: "CY2023"

# VFX2024
- os: "macos-13"
arch-type: "x86_64"
build-type: "Release"
qt-version: "6.5.3"
python-version: "3.11"
vfx-platform: "CY2024"
- os: "macos-14"
arch-type: "arm64"
build-type: "Release"
qt-version: "6.5.3"
python-version: "3.11"
vfx-platform: "CY2024"
- os: "macos-13"
arch-type: "x86_64"
build-type: "Debug"
qt-version: "6.5.3"
python-version: "3.11"
vfx-platform: "CY2024"
- os: "macos-14"
arch-type: "arm64"
build-type: "Debug"
qt-version: "6.5.3"
python-version: "3.11"
vfx-platform: "CY2024"
steps:
- name: Check if it is a schedule job
if: github.event_name == 'schedule'
Expand Down Expand Up @@ -293,7 +401,7 @@ jobs:
mkdir -p "${{ github.workspace }}/deps"
- name: Install Qt ${{ matrix.qt-version }}
if: matrix.arch-type == 'x86_64'
if: matrix.arch-type == 'x86_64' && matrix.vfx-platform == 'CY2023'
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt-version }}'
Expand All @@ -302,8 +410,28 @@ jobs:
arch: 'clang_64'
dir: "${{ github.workspace }}/deps"
install-deps: 'false'
modules: 'debug_info qtcharts qtdatavis3d qtlottie qtnetworkauth qtquick3d qtquicktimeline qtscript qtwebengine qtwebglplugin'
archives: 'd3dcompiler_47 opengl32sw qt3d qtactiveqt qtbase qtconnectivity qtdeclarative qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtremoteobjects qtscxml qtsensors qtsvg qttools qttranslations qtwebchannel qtwebsockets qtwebview qtwinextras qtxmlpatterns'
modules: ${{ env.QT5_MODULES }}
archives: ${{ env.MACOX_X86_64_QT5_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.1.*'

- name: Install Qt ${{ matrix.qt-version }}
if: matrix.arch-type == 'x86_64' && matrix.vfx-platform == 'CY2024'
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt-version }}'
host: 'mac'
target: 'desktop'
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: 'false'
Expand All @@ -313,7 +441,7 @@ jobs:
aqtversion: '==3.1.*'

- name: Patch Qt ${{ matrix.qt-version }}
if: matrix.arch-type == 'x86_64'
if: matrix.arch-type == 'x86_64' && matrix.vfx-platform == 'CY2023'
# There is an issue with Clang15 and Qt < 5.15.15.
run: |
curl -o file.zip https://codereview.qt-project.org/changes/qt%2Fqtbase~503172/revisions/3/files/mkspecs%2Ffeatures%2Ftoolchain.prf/download
Expand All @@ -325,7 +453,7 @@ jobs:
id: build-qt5-for-arm64
uses: ./.github/actions/build-qt5-for-arm64
with:
qt-version: "5.15.15"
qt-version: "${{ matrix.qt-version }}"
python3-version: "3.11.9"
python2-version: "2.7.18"
xcode-version: "14.3.1"
Expand Down Expand Up @@ -377,9 +505,15 @@ jobs:
key: macos-${{ matrix.arch-type }}-dependencies

- name: Configure OpenRV
if: ${{ matrix.vfx-platform == 'CY2023' }}
run: |
cmake -B _build -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT5_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
- name: Configure OpenRV
if: ${{ matrix.vfx-platform == 'CY2024' }}
run: |
cmake -B _build -G "Ninja" -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT6_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
- name: Build OpenRV dependencies
if: steps.cmake-dependencies.outputs.cache-hit != 'true'
run: |
Expand Down Expand Up @@ -432,6 +566,26 @@ jobs:
msvc-component: "14.40.17.10.x86.x64"
msvc-compiler: "14.40.33807"

# VFX2024
- os: "windows-2022"
arch-type: "x86_64"
build-type: "Release"
qt-version: "6.5.3"
python-version: "3.11"
cmake-version: "3.29.8"
vfx-platform: "CY2024"
msvc-component: "14.40.17.10.x86.x64"
msvc-compiler: "14.40.33807"
- os: "windows-2022"
arch-type: "x86_64"
build-type: "Debug"
qt-version: "6.5.3"
python-version: "3.11"
cmake-version: "3.29.8"
vfx-platform: "CY2024"
msvc-component: "14.40.17.10.x86.x64"
msvc-compiler: "14.40.33807"

runs-on: ${{ matrix.os }}
steps:
- name: Check if it is a schedule job
Expand Down Expand Up @@ -538,6 +692,27 @@ jobs:
shell: msys2 {0}

- name: Install Qt ${{ matrix.qt-version }}
if: ${{ matrix.vfx-platform == 'CY2023' }}
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.qt5_modules }}
archives: ${{ env.WINDOWS_QT5_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.1.*'

- name: Install Qt ${{ matrix.qt-version }}
if: ${{ matrix.vfx-platform == 'CY2024' }}
uses: jurplel/install-qt-action@v4
with:
version: '${{ matrix.qt-version }}'
Expand All @@ -546,8 +721,8 @@ jobs:
arch: 'win64_msvc2019_64'
dir: "c:/"
install-deps: 'false'
modules: 'debug_info qtcharts qtdatavis3d qtlottie qtnetworkauth qtquick3d qtquicktimeline qtscript qtwebengine qtwebglplugin'
archives: 'd3dcompiler_47 opengl32sw qt3d qtactiveqt qtbase qtconnectivity qtdeclarative qtgraphicaleffects qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 qtremoteobjects qtscxml qtsensors qtsvg qttools qttranslations qtwebchannel qtwebsockets qtwebview qtwinextras qtxmlpatterns'
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'
Expand Down Expand Up @@ -583,10 +758,18 @@ jobs:
key: windows-dependencies

- name: Configure OpenRV
if: ${{ matrix.vfx-platform == 'CY2023' }}
run: |
export QT_HOME=c:/Qt/${{ matrix.qt-version }}/msvc2019_64
cmake -B _build -G "Visual Studio 17 2022" -A x64 -DRV_DEPS_WIN_PERL_ROOT=c:/Strawberry/perl/bin -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT5_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
shell: msys2 {0}

- name: Configure OpenRV
if: ${{ matrix.vfx-platform == 'CY2024' }}
run: |
export QT_HOME=c:/Qt/${{ matrix.qt-version }}/msvc2019_64
cmake -B _build -G "Visual Studio 17 2022" -A x64 -DRV_DEPS_WIN_PERL_ROOT=c:/Strawberry/perl/bin -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DRV_DEPS_QT6_LOCATION=$QT_HOME -DRV_VFX_PLATFORM=${{ matrix.vfx-platform }}
shell: msys2 {0}

- name: Build OpenRV dependencies
if: steps.cmake-dependencies.outputs.cache-hit != 'true'
Expand Down
2 changes: 2 additions & 0 deletions src/build/make_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ def install() -> None:
).check_returncode()

dst_dir = os.path.join(OUTPUT_DIR, "bin")
libs_dir = os.path.join(OUTPUT_DIR, "libs")
os.makedirs(dst_dir, exist_ok=True)

# bin
Expand Down Expand Up @@ -664,6 +665,7 @@ def install() -> None:
python3xx_lib = f"python{PYTHON_VERSION}_d.lib"

shutil.copy(os.path.join(build_path, python3_lib), os.path.join(dst_dir, python3_lib))
shutil.copy(os.path.join(build_path, python3_lib), os.path.join(libs_dir, python3_lib))
shutil.copy(os.path.join(build_path, python3xx_lib), os.path.join(dst_dir, python3xx_lib))

# Tcl and Tk DLL are not copied by the main.py script in Debug.
Expand Down
9 changes: 8 additions & 1 deletion src/lib/audio/QTAudioRenderer/QTAudioRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,14 @@ QTAudioOutput::setAudioOutputBufferSize()
// This is a temporary mechanism that will unblock our clients
// without introducing an RV preference that would have polluted the RV
// preferences unnecessarily.
const bool audioDeviceIsWASAPI = m_device.realm() == "wasapi";

// Device id may contain backend information (e.g. wasapi or waveout for WinMM).
const QString deviceId = QString::fromUtf8(m_device.id());
// Description may contain useful information.
const QString deviceName = m_device.description();
const bool audioDeviceIsWASAPI = deviceId.contains("wasapi", Qt::CaseInsensitive) ||
deviceName.contains("wasapi", Qt::CaseInsensitive);

if (audioDeviceIsWASAPI && evApplyWasapiFix.getValue())
{
setBufferSize(calcAudioBufferSize(m_format.channelCount(),
Expand Down
Loading

0 comments on commit 4de1a2f

Please sign in to comment.