BUG: Fix out of range array access in ctkPythonConsole #473
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: CI (Build) | |
| on: | |
| # Triggers the workflow on push or pull request events | |
| push: | |
| branches: | |
| - "master" | |
| pull_request: | |
| branches: | |
| - "*" | |
| # Allows running this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runs-on: ["ubuntu-latest"] | |
| qt-major-version: [5, 6] | |
| steps: | |
| - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | |
| - name: Setup CMake | |
| uses: jwlawson/actions-setup-cmake@959f1116cf9f1ae42fff8ec1a4aaae6d4a0e348b # v2.0.1 | |
| with: | |
| cmake-version: "3.20.6" | |
| - name: Display CMake version | |
| run: | | |
| cmake --version | |
| - name: Retrieve new lists of APT packages | |
| run: sudo apt-get update | |
| - name: Install Qt 5 | |
| if: ${{ matrix.qt-major-version == 5 }} | |
| run: | | |
| sudo apt-get install -y \ | |
| qtbase5-dev \ | |
| qtmultimedia5-dev \ | |
| qttools5-dev \ | |
| libqt5xmlpatterns5-dev \ | |
| libqt5svg5-dev \ | |
| qtwebengine5-dev \ | |
| qtscript5-dev \ | |
| qtbase5-private-dev \ | |
| libqt5x11extras5-dev \ | |
| libxt-dev | |
| - name: Install VTK (Qt 5) | |
| if: ${{ matrix.runs-on == 'ubuntu-latest' && matrix.qt-major-version == 5 }} | |
| run: | | |
| sudo apt-get install -y \ | |
| libvtk9-dev \ | |
| libvtk9-qt-dev | |
| - name: Install Qt 6 | |
| if: ${{ matrix.qt-major-version == 6 }} | |
| run: | | |
| sudo apt-get install -y \ | |
| qt6-base-dev \ | |
| qt6-base-private-dev \ | |
| qt6-5compat-dev \ | |
| qt6-multimedia-dev \ | |
| qt6-scxml-dev \ | |
| qt6-tools-dev \ | |
| qt6-tools-dev-tools \ | |
| qt6-svg-dev \ | |
| qt6-webengine-dev \ | |
| libqt6openglwidgets6 \ | |
| libxt-dev | |
| - name: Configure CTK | |
| run: | | |
| cmake \ | |
| -DCTK_QT_VERSION:STRING=${{ matrix.qt-major-version }} \ | |
| -DCTK_ENABLE_Widgets:BOOL=ON \ | |
| -DCTK_USE_SYSTEM_VTK:BOOL=$CTK_USE_VTK \ | |
| -DCTK_LIB_Visualization/VTK/Widgets:BOOL=$CTK_USE_VTK \ | |
| -DCTK_LIB_Visualization/VTK/Widgets_USE_TRANSFER_FUNCTION_CHARTS:BOOL=$CTK_USE_VTK \ | |
| -DCTK_APP_ctkDICOM:BOOL=ON \ | |
| -DCTK_LIB_DICOM/Core:BOOL=ON \ | |
| -DCTK_LIB_DICOM/Widgets:BOOL=ON \ | |
| -DCTK_LIB_Scripting/Python/Core:BOOL=ON \ | |
| -DCTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK:BOOL=$CTK_USE_VTK \ | |
| -DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTCORE:BOOL=ON \ | |
| -DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTGUI:BOOL=ON \ | |
| -DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTUITOOLS:BOOL=ON \ | |
| -DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTNETWORK:BOOL=ON \ | |
| -DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTMULTIMEDIA:BOOL=ON \ | |
| -DCTK_LIB_Scripting/Python/Core_PYTHONQT_WRAP_QTWEBKIT:BOOL=OFF \ | |
| -DCTK_LIB_Scripting/Python/Widgets:BOOL=ON \ | |
| -DCTK_ENABLE_Python_Wrapping:BOOL=ON \ | |
| -B CTK-build \ | |
| -S . | |
| env: | |
| CTK_USE_VTK: "${{ matrix.runs-on == 'ubuntu-latest' && matrix.qt-major-version == 5 && 'ON' || 'OFF' }}" | |
| - name: Display Qt_DIR | |
| run: | | |
| echo "Qt5_DIR:" | |
| cat CTK-build/CMakeCache.txt | grep '^Qt5_DIR' || true | |
| echo "Qt6_DIR:" | |
| cat CTK-build/CMakeCache.txt | grep '^Qt6_DIR' || true | |
| - name: Build CTK | |
| run: | | |
| cmake \ | |
| --build CTK-build -- -j4 |