- Wrap deprecated FFmpeg calls in MSVC warning push/pop pragmas in two source files
- Introduce `.github/workflows/master-validation.yml` and remove several old workflows
- Broadened `if` conditions in `daily-ir-vcpkg-configure.yml` and updated macOS brew deps
--- /dev/null
+name: 'CMake Basic Build'
+description: 'Configure and build OCCT with basic configuration'
+
+inputs:
+ generator:
+ description: 'CMake generator'
+ required: true
+ default: 'Ninja'
+ cc:
+ description: 'C compiler'
+ required: true
+ cxx:
+ description: 'C++ compiler'
+ required: true
+ build-type:
+ description: 'Build type (Debug, Release)'
+ required: false
+ default: 'Release'
+ compiler-flags:
+ description: 'Additional compiler flags'
+ required: false
+ default: ''
+ thirdparty-dir:
+ description: '3rd party directory'
+ required: false
+ default: ''
+ shell-type:
+ description: 'Shell type to use (powershell, msys2, bash)'
+ required: false
+ default: 'auto'
+
+runs:
+ using: "composite"
+ steps:
+ - name: Configure basic build (Unix/MSYS2)
+ if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
+ run: |
+ mkdir -p build
+ cd build
+ cmake -G "${{ inputs.generator }}" \
+ -D CMAKE_C_COMPILER=${{ inputs.cc }} \
+ -D CMAKE_CXX_COMPILER=${{ inputs.cxx }} \
+ ${{ inputs.thirdparty-dir != '' && format('-D 3RDPARTY_DIR={0}', inputs.thirdparty-dir) || '' }} \
+ -D CMAKE_BUILD_TYPE=${{ inputs.build-type }} \
+ ${{ inputs.compiler-flags }} ..
+ shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
+
+ - name: Configure basic build (Windows PowerShell)
+ if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
+ run: |
+ mkdir build
+ cd build
+ cmake -G "${{ inputs.generator }}" `
+ -D CMAKE_C_COMPILER=${{ inputs.cc }} `
+ -D CMAKE_CXX_COMPILER=${{ inputs.cxx }} `
+ ${{ inputs.thirdparty-dir != '' && format('-D 3RDPARTY_DIR={0}', inputs.thirdparty-dir) || '' }} `
+ -D CMAKE_BUILD_TYPE=${{ inputs.build-type }} `
+ ${{ inputs.compiler-flags }} ..
+ shell: pwsh
+
+ - name: Build basic (Unix/MSYS2)
+ if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
+ run: |
+ cd build
+ cmake --build . --config ${{ inputs.build-type }} -- -j 4
+ shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
+
+ - name: Build basic (Windows PowerShell)
+ if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
+ run: |
+ cd build
+ cmake --build . --config ${{ inputs.build-type }}
+ shell: pwsh
+
+ - name: Clean up build (Unix/MSYS2)
+ if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
+ run: rm -rf build
+ shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
+
+ - name: Clean up build (Windows PowerShell)
+ if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
+ run: Remove-Item -Recurse -Force build
+ shell: pwsh
\ No newline at end of file
--- /dev/null
+name: 'CMake Full Build'
+description: 'Configure and build OCCT with full configuration (shared/static)'
+
+inputs:
+ generator:
+ description: 'CMake generator'
+ required: true
+ default: 'Ninja'
+ cc:
+ description: 'C compiler'
+ required: true
+ cxx:
+ description: 'C++ compiler'
+ required: true
+ build-type:
+ description: 'Build type (Debug, Release)'
+ required: false
+ default: 'Release'
+ library-type:
+ description: 'Library type (Shared, Static)'
+ required: false
+ default: 'Shared'
+ opt-profile:
+ description: 'Optimization profile (Production, Default)'
+ required: false
+ default: 'Production'
+ compiler-flags:
+ description: 'Additional compiler flags'
+ required: false
+ default: ''
+ thirdparty-dir:
+ description: '3rd party directory'
+ required: false
+ default: ''
+ rapidjson-dir:
+ description: 'RapidJSON directory'
+ required: false
+ default: ''
+ use-vtk:
+ description: 'Enable VTK'
+ required: false
+ default: 'ON'
+ use-tbb:
+ description: 'Enable TBB'
+ required: false
+ default: 'ON'
+ with-debug:
+ description: 'Enable BUILD_WITH_DEBUG'
+ required: false
+ default: 'OFF'
+ shell-type:
+ description: 'Shell type to use (powershell, msys2, bash)'
+ required: false
+ default: 'auto'
+
+runs:
+ using: "composite"
+ steps:
+ - name: Configure full build (Unix/MSYS2)
+ if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
+ run: |
+ mkdir -p build
+ cd build
+ cmake -G "${{ inputs.generator }}" \
+ -D CMAKE_C_COMPILER=${{ inputs.cc }} \
+ -D CMAKE_CXX_COMPILER=${{ inputs.cxx }} \
+ ${{ inputs.thirdparty-dir != '' && format('-D 3RDPARTY_DIR={0}', inputs.thirdparty-dir) || '' }} \
+ ${{ inputs.rapidjson-dir != '' && format('-D 3RDPARTY_RAPIDJSON_DIR={0}', inputs.rapidjson-dir) || '' }} \
+ -D BUILD_USE_PCH=OFF \
+ -D BUILD_INCLUDE_SYMLINK=ON \
+ -D BUILD_OPT_PROFILE=${{ inputs.opt-profile }} \
+ -D BUILD_LIBRARY_TYPE=${{ inputs.library-type }} \
+ ${{ inputs.with-debug == 'ON' && '-D BUILD_WITH_DEBUG=ON' || '' }} \
+ -D USE_TK=ON \
+ -D CMAKE_BUILD_TYPE=${{ inputs.build-type }} \
+ -D USE_MMGR_TYPE=JEMALLOC \
+ -D INSTALL_DIR=${{ github.workspace }}/install-${{ inputs.build-type }} \
+ -D USE_FREETYPE=ON \
+ -D USE_DRACO=ON \
+ -D USE_FFMPEG=OFF \
+ -D USE_FREEIMAGE=ON \
+ -D USE_GLES2=ON \
+ -D USE_OPENVR=ON \
+ -D USE_VTK=${{ inputs.use-vtk }} \
+ -D USE_TBB=${{ inputs.use-tbb }} \
+ -D USE_RAPIDJSON=ON \
+ -D USE_OPENGL=ON \
+ ${{ inputs.compiler-flags }} ..
+ shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
+
+ - name: Configure full build (Windows PowerShell)
+ if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
+ run: |
+ mkdir build
+ cd build
+ cmake -G "${{ inputs.generator }}" `
+ -D CMAKE_C_COMPILER=${{ inputs.cc }} `
+ -D CMAKE_CXX_COMPILER=${{ inputs.cxx }} `
+ ${{ inputs.thirdparty-dir != '' && format('-D 3RDPARTY_DIR={0}', inputs.thirdparty-dir) || '' }} `
+ ${{ inputs.rapidjson-dir != '' && format('-D 3RDPARTY_RAPIDJSON_DIR={0}', inputs.rapidjson-dir) || '' }} `
+ -D BUILD_USE_PCH=OFF `
+ -D BUILD_INCLUDE_SYMLINK=ON `
+ -D BUILD_OPT_PROFILE=${{ inputs.opt-profile }} `
+ -D BUILD_LIBRARY_TYPE=${{ inputs.library-type }} `
+ ${{ inputs.with-debug == 'ON' && '-D BUILD_WITH_DEBUG=ON' || '' }} `
+ -D USE_TK=ON `
+ -D CMAKE_BUILD_TYPE=${{ inputs.build-type }} `
+ -D USE_MMGR_TYPE=JEMALLOC `
+ -D INSTALL_DIR=${{ github.workspace }}/install-${{ inputs.build-type }} `
+ -D USE_FREETYPE=ON `
+ -D USE_DRACO=ON `
+ -D USE_FFMPEG=OFF `
+ -D USE_FREEIMAGE=ON `
+ -D USE_GLES2=ON `
+ -D USE_OPENVR=ON `
+ -D USE_VTK=${{ inputs.use-vtk }} `
+ -D USE_TBB=${{ inputs.use-tbb }} `
+ -D USE_RAPIDJSON=ON `
+ -D USE_OPENGL=ON `
+ ${{ inputs.compiler-flags }} ..
+ shell: pwsh
+
+ - name: Build full (Unix/MSYS2)
+ if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
+ run: |
+ cd build
+ cmake --build . --target install --config ${{ inputs.build-type }} -- -j 4
+ shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
+
+ - name: Build full (Windows PowerShell)
+ if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
+ run: |
+ cd build
+ cmake --build . --target install --config ${{ inputs.build-type }}
+ shell: pwsh
+
+ - name: Clean up build (Unix/MSYS2)
+ if: runner.os != 'Windows' || inputs.shell-type == 'msys2'
+ run: |
+ rm -rf build
+ rm -rf ${{ github.workspace }}/install-${{ inputs.build-type }}
+ shell: ${{ inputs.shell-type == 'msys2' && 'msys2 {0}' || 'bash' }}
+
+ - name: Clean up build (Windows PowerShell)
+ if: runner.os == 'Windows' && inputs.shell-type != 'msys2'
+ run: |
+ Remove-Item -Recurse -Force build
+ Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ inputs.build-type }}
+ shell: pwsh
\ No newline at end of file
--- /dev/null
+name: 'Setup MSYS2'
+description: 'Setup MSYS2 environment for MinGW builds'
+
+inputs:
+ msystem:
+ description: 'MSYS2 subsystem (MINGW64, CLANG64, UCRT64)'
+ required: true
+ packages:
+ description: 'Packages to install'
+ required: true
+ dependencies:
+ description: 'Additional dependencies to install'
+ required: true
+
+runs:
+ using: "composite"
+ steps:
+ - name: Set up MSYS2
+ uses: msys2/setup-msys2@v2
+ with:
+ msystem: ${{ inputs.msystem }}
+ update: true
+ install: ${{ inputs.packages }} ${{ inputs.dependencies }}
+
+ - name: Setup environment
+ shell: msys2 {0}
+ run: |
+ echo "Setting up environment variables..."
+ echo "$MSYSTEM_PREFIX/bin" >> $GITHUB_PATH
+ echo "CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX" >> $GITHUB_ENV
\ No newline at end of file
--- /dev/null
+name: 'Setup Ubuntu Dependencies'
+description: 'Install Ubuntu dependencies and rapidjson for OCCT builds'
+
+runs:
+ using: "composite"
+ steps:
+ - name: Install dependencies
+ run: sudo apt-get update && sudo apt-get install -y ninja-build tcl-dev tk-dev cmake clang gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev libjemalloc-dev
+ shell: bash
+
+ - name: Install rapidjson
+ run: |
+ wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip
+ unzip rapidjson.zip
+ shell: bash
\ No newline at end of file
--- /dev/null
+name: 'Setup Windows MSVC Dependencies'
+description: 'Download and setup 3rdparty dependencies and Mesa3D for Windows MSVC builds'
+
+runs:
+ using: "composite"
+ steps:
+ - name: Set up MSVC
+ uses: ilammy/msvc-dev-cmd@v1.13.0
+ with:
+ arch: x64
+
+ - name: Download and extract 3rdparty dependencies
+ run: |
+ Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
+ Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
+ Remove-Item 3rdparty-vc14-64.zip
+ shell: pwsh
+
+ - name: Download and extract Mesa3D
+ run: |
+ curl -L -o mesa3d.7z https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z
+ 7z x mesa3d.7z -omesa3d
+ shell: pwsh
+
+ - name: Run system-wide deployment
+ run: |
+ cd mesa3d
+ .\systemwidedeploy.cmd 1
+ .\systemwidedeploy.cmd 5
+ shell: cmd
\ No newline at end of file
libgles2-mesa-dev
shell: bash
+
- name: Install required packages (macOS)
if: runner.os == 'macOS'
run: |
brew update || true
- brew install cmake ninja nasm autoconf automake mono || true
+ brew install cmake ninja nasm autoconf automake mono openexr || true
brew install --cask xquartz || true
shell: bash
+
- name: Set up vcpkg (Unix)
if: runner.os != 'Windows'
run: |
+++ /dev/null
-# This workflow validates the build on Windows using MinGW and MSYS2.
-# It is triggered on pushes to the master branch.
-# The workflow includes steps to install dependencies, configure, build, and clean up the project.
-
-name: MinGW build validation
-
-on:
- push:
- branches:
- - 'master'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
- cancel-in-progress: true
-
-jobs:
- main_job:
- name: Windows MinGW validation
- runs-on: windows-2025
-
- strategy:
- matrix:
- config:
- - {
- name: "GCC",
- cc: "x86_64-w64-mingw32-gcc",
- cxx: "x86_64-w64-mingw32-g++",
- package: "mingw-w64-x86_64-toolchain",
- thirdparty_dir: "/mingw64",
- compiler_flags: "",
- dependencies: "mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-rapidjson mingw-w64-x86_64-freetype mingw-w64-x86_64-draco mingw-w64-x86_64-freeimage mingw-w64-x86_64-tbb mingw-w64-x86_64-tk mingw-w64-x86_64-tcl mingw-w64-x86_64-openvr mingw-w64-x86_64-jemalloc mingw-w64-x86_64-mesa mingw-w64-x86_64-angleproject mingw-w64-x86_64-llvm-openmp mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
- }
- - {
- name: "Clang",
- cc: "clang",
- cxx: "clang++",
- package: "mingw-w64-clang-x86_64-toolchain",
- thirdparty_dir: "/clang64",
- compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Wall -Wextra\"",
- dependencies: "mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-rapidjson mingw-w64-clang-x86_64-freetype mingw-w64-clang-x86_64-draco mingw-w64-clang-x86_64-freeimage mingw-w64-clang-x86_64-tbb mingw-w64-clang-x86_64-tk mingw-w64-clang-x86_64-tcl mingw-w64-clang-x86_64-openvr mingw-w64-clang-x86_64-jemalloc mingw-w64-clang-x86_64-mesa mingw-w64-clang-x86_64-angleproject mingw-w64-clang-x86_64-llvm-openmp mingw-w64-clang-x86_64-winpthreads-git mingw-w64-clang-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
- }
- - {
- name: "UCRT",
- cc: "x86_64-w64-mingw32-gcc",
- cxx: "x86_64-w64-mingw32-g++",
- package: "mingw-w64-ucrt-x86_64-toolchain",
- thirdparty_dir: "/ucrt64",
- compiler_flags: "",
- dependencies: "mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gcc-libs mingw-w64-ucrt-x86_64-omp mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-rapidjson mingw-w64-ucrt-x86_64-freetype mingw-w64-ucrt-x86_64-draco mingw-w64-ucrt-x86_64-freeimage mingw-w64-ucrt-x86_64-tbb mingw-w64-ucrt-x86_64-tk mingw-w64-ucrt-x86_64-tcl mingw-w64-ucrt-x86_64-openvr mingw-w64-ucrt-x86_64-jemalloc mingw-w64-ucrt-x86_64-mesa mingw-w64-ucrt-x86_64-angleproject mingw-w64-ucrt-x86_64-llvm-openmp mingw-w64-ucrt-x86_64-winpthreads-git mingw-w64-ucrt-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
- }
- build_type: [Debug, Release]
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4.1.7
-
- - name: Set up MSYS2
- uses: msys2/setup-msys2@v2
- with:
- msystem: ${{ matrix.config.name == 'Clang' && 'CLANG64' || matrix.config.name == 'UCRT' && 'UCRT64' || 'MINGW64' }}
- update: true
- install: ${{ matrix.config.package }} ${{ matrix.config.dependencies }}
-
- - name: Setup environment
- shell: msys2 {0}
- run: |
- echo "Checking compiler version:"
- ${{ matrix.config.cc }} --version
- echo "Checking CMake version:"
- cmake --version
- echo "Setting up environment variables..."
- echo "$MSYSTEM_PREFIX/bin" >> $GITHUB_PATH
- echo "CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX" >> $GITHUB_ENV
-
- - name: Configure basic
- shell: msys2 {0}
- run: |
- mkdir -p build
- cd build
- cmake -G "Ninja" \
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
- -D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
- -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- ${{ matrix.config.compiler_flags }} ..
-
- - name: Build basic
- shell: msys2 {0}
- run: |
- cd build
- cmake --build . --config ${{ matrix.build_type }} -- -j 4
-
- - name: Clear up after build
- shell: pwsh
- run: |
- Remove-Item -Recurse -Force build
-
- - name: Configure full shared
- shell: msys2 {0}
- run: |
- mkdir -p build
- cd build
- cmake -G "Ninja" \
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
- -D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
- -D BUILD_USE_PCH=OFF \
- -D BUILD_INCLUDE_SYMLINK=ON \
- -D BUILD_OPT_PROFILE=Production \
- -D BUILD_LIBRARY_TYPE=Shared \
- -D USE_TK=ON \
- -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- -D USE_MMGR_TYPE=JEMALLOC \
- -D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
- -D USE_FREETYPE=ON \
- -D USE_DRACO=ON \
- -D USE_FFMPEG=OFF \
- -D USE_FREEIMAGE=ON \
- -D USE_GLES2=ON \
- -D USE_OPENVR=ON \
- -D USE_VTK=OFF \
- -D USE_TBB=OFF \
- -D USE_RAPIDJSON=ON \
- -D USE_OPENGL=ON \
- ${{ matrix.config.compiler_flags }} ..
-
- - name: Build full shared
- shell: msys2 {0}
- run: |
- cd build
- cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
-
- - name: Clear up after build
- shell: pwsh
- run: |
- Remove-Item -Recurse -Force build
- Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}
-
- - name: Configure full static
- shell: msys2 {0}
- run: |
- mkdir -p build
- cd build
- cmake -G "Ninja" \
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
- -D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
- -D BUILD_USE_PCH=OFF \
- -D BUILD_INCLUDE_SYMLINK=ON \
- -D BUILD_OPT_PROFILE=Default \
- -D BUILD_LIBRARY_TYPE=Static \
- -D USE_TK=ON \
- -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- -D USE_MMGR_TYPE=JEMALLOC \
- -D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
- -D USE_FREETYPE=ON \
- -D USE_DRACO=ON \
- -D USE_FFMPEG=OFF \
- -D USE_FREEIMAGE=ON \
- -D USE_GLES2=ON \
- -D USE_OPENVR=ON \
- -D USE_VTK=OFF \
- -D USE_TBB=OFF \
- -D USE_RAPIDJSON=ON \
- -D USE_OPENGL=ON \
- ${{ matrix.config.compiler_flags }} ..
-
- - name: Build full static
- shell: msys2 {0}
- run: |
- cd build
- cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
-
- - name: Clear up after build
- shell: pwsh
- run: |
- Remove-Item -Recurse -Force build
- Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}
-
- - name: Configure full with DEBUG define
- shell: msys2 {0}
- run: |
- mkdir -p build
- cd build
- cmake -G "Ninja" \
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
- -D CMAKE_PREFIX_PATH=$MSYSTEM_PREFIX \
- -D BUILD_WITH_DEBUG=ON \
- -D BUILD_USE_PCH=OFF \
- -D BUILD_INCLUDE_SYMLINK=ON \
- -D BUILD_OPT_PROFILE=Production \
- -D BUILD_LIBRARY_TYPE=Shared \
- -D USE_TK=ON \
- -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- -D INSTALL_DIR="${{ github.workspace }}/install-${{ matrix.build_type }}" \
- -D USE_FREETYPE=ON \
- -D USE_DRACO=ON \
- -D USE_FFMPEG=OFF \
- -D USE_FREEIMAGE=ON \
- -D USE_GLES2=ON \
- -D USE_OPENVR=ON \
- -D USE_VTK=OFF \
- -D USE_TBB=OFF \
- -D USE_RAPIDJSON=ON \
- -D USE_OPENGL=ON \
- ${{ matrix.config.compiler_flags }} ..
-
- - name: Build full with DEBUG define
- shell: msys2 {0}
- run: |
- cd build
- cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
-
- - name: Clear up after build
- shell: pwsh
- run: |
- Remove-Item -Recurse -Force build
- Remove-Item -Recurse -Force ${{ github.workspace }}/install-${{ matrix.build_type }}
+++ /dev/null
-# This workflow validates the build on Windows using MSVC and Clang compilers.
-# It is triggered on pushes to the master branch.
-# The workflow includes steps to install dependencies, configure, build, and clean up the project for different configurations.
-
-name: MSVC build validation
-
-on:
- push:
- branches:
- - 'master'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
- cancel-in-progress: true
-
-jobs:
- main_job:
- name: Windows MSVC/Clang validation
- runs-on: windows-2025
-
- strategy:
- matrix:
- config:
- - {
- name: "MSVC",
- cc: "cl",
- cxx: "cl",
- generator: "Visual Studio 17 2022",
- toolset: "host=x64",
- c_flags: "/W4 /WX",
- cxx_flags: "/W4 /WX"
- }
- - {
- name: "Clang",
- cc: "clang",
- cxx: "clang++",
- generator: "Ninja",
- toolset: "",
- c_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option",
- cxx_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option"
- }
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4.1.7
-
- - name: Set up MSVC
- uses: ilammy/msvc-dev-cmd@v1.13.0
- with:
- arch: x64
-
- - name: Download and extract 3rdparty dependencies
- run: |
- Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip
- Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
- Remove-Item 3rdparty-vc14-64.zip
- shell: pwsh
-
- - name: Download and extract Mesa3D
- run: |
- curl -L -o mesa3d.7z https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z
- 7z x mesa3d.7z -omesa3d
-
- - name: Run system-wide deployment
- run: |
- cd mesa3d
- .\systemwidedeploy.cmd 1
- .\systemwidedeploy.cmd 5
- shell: cmd
-
- - name: Configure basic
- run: |
- mkdir build
- cd build
- cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
- -D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
- -D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
- -D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
- shell: pwsh
-
- - name: Build basic
- run: |
- cd build
- cmake --build . --config Release
- shell: pwsh
-
- - name: Clear up after build
- run: |
- Remove-Item -Recurse -Force build
- shell: pwsh
-
- - name: Configure full shared
- run: |
- mkdir build
- cd build
- cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
- -D BUILD_USE_PCH=OFF `
- -D BUILD_INCLUDE_SYMLINK=ON `
- -D BUILD_OPT_PROFILE=Production `
- -D BUILD_LIBRARY_TYPE=Shared `
- -D CMAKE_BUILD_TYPE=Debug `
- -D INSTALL_DIR=${{ github.workspace }}/install `
- -D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
- -D USE_MMGR_TYPE=JEMALLOC `
- -D USE_FREETYPE=ON `
- -D USE_DRACO=ON `
- -D USE_FFMPEG=ON `
- -D USE_FREEIMAGE=ON `
- -D USE_GLES2=ON `
- -D USE_OPENVR=ON `
- -D USE_VTK=${{ matrix.config.name == 'MSVC' && 'ON' || 'OFF' }} `
- -D USE_TBB=ON `
- -D USE_RAPIDJSON=ON `
- -D USE_OPENGL=ON `
- -D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
- -D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
- shell: pwsh
-
- - name: Build full shared
- run: |
- cd build
- cmake --build . --target install --config Debug
- shell: pwsh
-
- - name: Clear up after build
- run: |
- Remove-Item -Recurse -Force build
- Remove-Item -Recurse -Force ${{ github.workspace }}/install
- shell: pwsh
-
- - name: Configure full static
- run: |
- mkdir build
- cd build
- cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
- -D BUILD_USE_PCH=OFF `
- -D BUILD_INCLUDE_SYMLINK=ON `
- -D BUILD_OPT_PROFILE=Default `
- -D BUILD_LIBRARY_TYPE=Static `
- -D CMAKE_BUILD_TYPE=Debug `
- -D INSTALL_DIR=${{ github.workspace }}/install `
- -D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
- -D USE_MMGR_TYPE=JEMALLOC `
- -D USE_FREETYPE=ON `
- -D USE_DRACO=ON `
- -D USE_FFMPEG=ON `
- -D USE_FREEIMAGE=ON `
- -D USE_GLES2=ON `
- -D USE_OPENVR=ON `
- -D USE_VTK=OFF `
- -D USE_TBB=ON `
- -D USE_RAPIDJSON=ON `
- -D USE_OPENGL=ON `
- -D CMAKE_CXX_FLAGS="${{ matrix.config.cxx_flags }}" `
- -D CMAKE_C_FLAGS="${{ matrix.config.c_flags }}" ..
- shell: pwsh
-
- - name: Build full static
- run: |
- cd build
- cmake --build . --target install --config Debug
- shell: pwsh
-
- - name: Clear up after build
- run: |
- Remove-Item -Recurse -Force build
- Remove-Item -Recurse -Force ${{ github.workspace }}/install
- shell: pwsh
-
- - name: Configure full with DEBUG define
- run: |
- mkdir build
- cd build
- cmake -G "${{ matrix.config.generator }}" ${{ matrix.config.toolset }} `
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} `
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} `
- -D BUILD_WITH_DEBUG=ON `
- -D BUILD_USE_PCH=OFF `
- -D BUILD_INCLUDE_SYMLINK=ON `
- -D BUILD_OPT_PROFILE=Production `
- -D BUILD_LIBRARY_TYPE=Shared `
- -D CMAKE_BUILD_TYPE=Debug `
- -D INSTALL_DIR=${{ github.workspace }}/install `
- -D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 `
- -D USE_FREETYPE=ON `
- -D USE_DRACO=ON `
- -D USE_FFMPEG=ON `
- -D USE_FREEIMAGE=ON `
- -D USE_GLES2=ON `
- -D USE_OPENVR=ON `
- -D USE_VTK=${{ matrix.config.name == 'MSVC' && 'ON' || 'OFF' }} `
- -D USE_TBB=ON `
- -D USE_RAPIDJSON=ON `
- -D USE_OPENGL=ON ` ..
- shell: pwsh
-
- - name: Build full with DEBUG define
- run: |
- cd build
- cmake --build . --target install --config Debug
- shell: pwsh
-
- - name: Clear up after build
- run: |
- Remove-Item -Recurse -Force build
- Remove-Item -Recurse -Force ${{ github.workspace }}/install
- shell: pwsh
\ No newline at end of file
+++ /dev/null
-# This workflow validates the build on the latest Ubuntu version (24.04) using multiple configurations.
-# It is triggered on pushes to the master branch.
-# The workflow includes steps to install dependencies, configure, build, and clean up the project for different configurations.
-
-name: Ubuntu build validation
-
-on:
- push:
- branches:
- - 'master'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
- cancel-in-progress: true
-
-jobs:
- main_job:
- name: Latest ubuntu validation
- runs-on: ubuntu-24.04
-
- strategy:
- matrix:
- config:
- - {
- name: "GCC",
- cc: "gcc",
- cxx: "g++",
- compiler_flags: ""
- }
- - {
- name: "Clang",
- cc: "clang",
- cxx: "clang++",
- compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Werror -Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Werror -Wall -Wextra\""
- }
- build_type: [Debug, Release]
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4.1.7
-
- - name: Install dependencies
- run: sudo apt-get update && sudo apt-get install -y ninja-build tcl-dev tk-dev cmake clang gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev libjemalloc-dev
-
- - name: Install rapidjson
- run: |
- wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip
- unzip rapidjson.zip
-
- - name: Configure basic
- run: |
- mkdir -p build
- cd build
- cmake -G "Ninja" \
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
- -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- ${{ matrix.config.compiler_flags }} ..
-
- - name: Build basic
- run: |
- cd build
- cmake --build . --config ${{ matrix.build_type }} -- -j 4
-
- - name: Clear up after build
- run: |
- rm -rf build
-
- - name: Configure full shared
- run: |
- mkdir -p build
- cd build
- cmake -G "Ninja" \
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
- -D BUILD_USE_PCH=OFF \
- -D BUILD_INCLUDE_SYMLINK=ON \
- -D BUILD_OPT_PROFILE=Production \
- -D BUILD_LIBRARY_TYPE=Shared \
- -D USE_TK=ON \
- -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- -D USE_MMGR_TYPE=JEMALLOC \
- -D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
- -D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
- -D USE_FREETYPE=ON \
- -D USE_DRACO=ON \
- -D USE_FFMPEG=OFF \
- -D USE_FREEIMAGE=ON \
- -D USE_GLES2=ON \
- -D USE_OPENVR=ON \
- -D USE_VTK=ON \
- -D USE_TBB=ON \
- -D USE_RAPIDJSON=ON \
- -D USE_OPENGL=ON \
- ${{ matrix.config.compiler_flags }} ..
-
- - name: Build full shared
- run: |
- cd build
- cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
-
- - name: Clear up after build
- run: |
- rm -rf build
- rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}
-
- - name: Configure full static
- run: |
- mkdir -p build
- cd build
- cmake -G "Ninja" \
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
- -D BUILD_USE_PCH=OFF \
- -D BUILD_INCLUDE_SYMLINK=ON \
- -D BUILD_OPT_PROFILE=Default \
- -D BUILD_LIBRARY_TYPE=Static \
- -D USE_TK=ON \
- -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- -D USE_MMGR_TYPE=JEMALLOC \
- -D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
- -D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
- -D USE_FREETYPE=ON \
- -D USE_DRACO=ON \
- -D USE_FFMPEG=OFF \
- -D USE_FREEIMAGE=ON \
- -D USE_GLES2=ON \
- -D USE_OPENVR=ON \
- -D USE_VTK=OFF \
- -D USE_TBB=ON \
- -D USE_RAPIDJSON=ON \
- -D USE_OPENGL=ON \
- ${{ matrix.config.compiler_flags }} ..
-
- - name: Build full static
- run: |
- cd build
- cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
-
- - name: Clear up after build
- run: |
- rm -rf build
- rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}
-
- - name: Configure full with DEBUG define
- run: |
- mkdir -p build
- cd build
- cmake -G "Ninja" \
- -D CMAKE_C_COMPILER=${{ matrix.config.cc }} \
- -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
- -D BUILD_WITH_DEBUG=ON \
- -D BUILD_USE_PCH=OFF \
- -D BUILD_INCLUDE_SYMLINK=ON \
- -D BUILD_OPT_PROFILE=Production \
- -D BUILD_LIBRARY_TYPE=Shared \
- -D USE_TK=ON \
- -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- -D INSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
- -D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \
- -D USE_FREETYPE=ON \
- -D USE_DRACO=ON \
- -D USE_FFMPEG=OFF \
- -D USE_FREEIMAGE=ON \
- -D USE_GLES2=ON \
- -D USE_OPENVR=ON \
- -D USE_VTK=ON \
- -D USE_TBB=ON \
- -D USE_RAPIDJSON=ON \
- -D USE_OPENGL=ON ..
-
- - name: Build full with DEBUG define
- run: |
- cd build
- cmake --build . --target install --config ${{ matrix.build_type }} -- -j 4
-
- - name: Clear up after build
- run: |
- rm -rf build
- rm -rf ${{ github.workspace }}/install-${{ matrix.build_type }}
+++ /dev/null
-# This workflow validates the WebAssembly build on Ubuntu.
-# It is triggered on pushes to the master branch.
-# The workflow includes steps to install dependencies, configure, build, and clean up the project.
-
-name: WebAssembly build (Ubuntu)
-
-on:
- push:
- branches:
- - 'master'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
- cancel-in-progress: true
-
-env:
- USERNAME: Open-Cascade-SAS
- VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
- FEED_URL: https://nuget.pkg.github.com/Open-Cascade-SAS/index.json
- VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/Open-Cascade-SAS/index.json,readwrite"
- EMSDK_VERSION: 3.1.74
-
-jobs:
- wasm-build:
- name: WebAssembly Build
- runs-on: ubuntu-24.04
-
- strategy:
- matrix:
- build_type: [Debug, Release]
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4.1.7
-
- - name: Install dependencies
- run: |
- sudo apt-get update
- sudo apt-get install -y build-essential ninja-build curl zip unzip tar nasm autoconf mono-complete
- sudo apt-get install -y libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev
-
- - name: Setup vcpkg
- run: |
- git clone https://github.com/microsoft/vcpkg.git
- ./vcpkg/bootstrap-vcpkg.sh
-
- - name: Add NuGet sources
- run: |
- mono $(${VCPKG_EXE} fetch nuget | tail -n 1) \
- sources add \
- -Source "${FEED_URL}" \
- -StorePasswordInClearText \
- -Name GitHubPackages \
- -UserName "${USERNAME}" \
- -Password "${{ secrets.GITHUB_TOKEN }}"
- mono $(${VCPKG_EXE} fetch nuget | tail -n 1) \
- setapikey "${{ secrets.GITHUB_TOKEN }}" \
- -Source "${FEED_URL}"
-
- - name: Setup Emscripten
- run: |
- git clone https://github.com/emscripten-core/emsdk.git
- cd emsdk
- ./emsdk install ${EMSDK_VERSION}
- ./emsdk activate ${EMSDK_VERSION}
- echo "EMSDK=${{ github.workspace }}/emsdk" >> $GITHUB_ENV
- echo "${{ github.workspace }}/emsdk" >> $GITHUB_PATH
- echo "${{ github.workspace }}/emsdk/upstream/emscripten" >> $GITHUB_PATH
-
- - name: Configure OCCT with vcpkg
- run: |
- source "${{ github.workspace }}/emsdk/emsdk_env.sh"
- mkdir -p "build-${{ matrix.build_type }}"
- cd "build-${{ matrix.build_type }}"
- export VCPKG_ROOT="${{ github.workspace }}/vcpkg"
- emcmake cmake -G "Ninja" \
- -DCMAKE_TOOLCHAIN_FILE="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
- -DVCPKG_TARGET_TRIPLET=wasm32-emscripten \
- -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" \
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- -DBUILD_USE_VCPKG=ON \
- -DUSE_MMGR_TYPE=NATIVE \
- -DBUILD_LIBRARY_TYPE=Static \
- -DBUILD_MODULE_Draw=OFF \
- -DUSE_FREETYPE=OFF \
- -DUSE_TK=OFF \
- -DUSE_TCL=OFF \
- -DUSE_DRACO=ON \
- -DUSE_FFMPEG=OFF \
- -DUSE_FREEIMAGE=OFF \
- -DUSE_OPENVR=OFF \
- -DUSE_VTK=OFF \
- -DUSE_TBB=OFF \
- -DUSE_RAPIDJSON=ON \
- -DINSTALL_DIR="${{ github.workspace }}/install-wasm-${{ matrix.build_type }}" \
- -DCMAKE_CXX_FLAGS="-s WASM=1 -s EXPORTED_RUNTIME_METHODS=['ccall','cwrap'] -s ALLOW_MEMORY_GROWTH=1" \
- -DCMAKE_EXECUTABLE_SUFFIX=".js" ..
-
- - name: Build
- run: |
- cd build-${{ matrix.build_type }}
- cmake --build . --config ${{ matrix.build_type }} --target install -- -j4
+++ /dev/null
-# This workflow builds OCCT using vcpkg on multiple platforms (Windows, macOS, Linux).
-# It builds in both Debug and Release modes.
-# All dependencies except the compiler are installed using vcpkg.
-# The workflow includes steps to clone vcpkg, install dependencies, configure and build.
-
-name: Build OCCT with vcpkg
-
-on:
- push:
- branches:
- - 'master'
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
- cancel-in-progress: true
-
-env:
- USERNAME: Open-Cascade-SAS
- VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
- FEED_URL: https://nuget.pkg.github.com/Open-Cascade-SAS/index.json
- VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/Open-Cascade-SAS/index.json,readwrite"
-
-jobs:
- build:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-24.04, ubuntu-22.04, windows-2022, windows-2025, macos-15, macos-14, macos-13, ubuntu-24.04-arm, ubuntu-22.04-arm]
- build_type: [Debug, Release]
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4.1.7
-
- - name: Install required packages (Linux)
- if: runner.os == 'Linux'
- run: |
- sudo apt-get update
- sudo apt-get install -y build-essential ninja-build curl zip unzip tar nasm autoconf mono-complete
- sudo apt-get install -y libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev
-
- - name: Install required packages (macOS)
- if: runner.os == 'macOS'
- run: |
- brew update || true
- brew install cmake ninja nasm autoconf mono || true
- # temporary workaround for missing tcl-tk
- brew install tcl-tk || true
- # Force link any conflicting packages
- brew link --overwrite python@3.12 || true
- brew link --overwrite python@3.13 || true
-
- - name: Install required packages (Windows)
- if: runner.os == 'Windows'
- uses: ilammy/msvc-dev-cmd@v1.13.0
- with:
- arch: x64
-
- - name: Set up vcpkg (Unix)
- if: runner.os != 'Windows'
- run: |
- git clone https://github.com/microsoft/vcpkg.git
- ./vcpkg/bootstrap-vcpkg.sh
- shell: bash
-
- - name: Set up vcpkg (Windows)
- if: runner.os == 'Windows'
- run: |
- git clone https://github.com/microsoft/vcpkg.git
- .\vcpkg\bootstrap-vcpkg.bat
- shell: cmd
-
- - name: Add NuGet sources
- if: runner.os == 'Windows'
- run: |
- .$(${{ env.VCPKG_EXE }} fetch nuget) `
- sources add `
- -Source "${{ env.FEED_URL }}" `
- -StorePasswordInClearText `
- -Name GitHubPackages `
- -UserName "${{ env.USERNAME }}" `
- -Password "${{ secrets.GITHUB_TOKEN }}"
- .$(${{ env.VCPKG_EXE }} fetch nuget) `
- setapikey "${{ secrets.GITHUB_TOKEN }}" `
- -Source "${{ env.FEED_URL }}"
- shell: pwsh
-
- - name: Add NuGet sources
- if: runner.os != 'Windows'
- run: |
- mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
- sources add \
- -Source "${{ env.FEED_URL }}" \
- -StorePasswordInClearText \
- -Name GitHubPackages \
- -UserName "${{ env.USERNAME }}" \
- -Password "${{ secrets.GITHUB_TOKEN }}"
- mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \
- setapikey "${{ secrets.GITHUB_TOKEN }}" \
- -Source "${{ env.FEED_URL }}"
- shell: bash
-
- - name: Configure OCCT ${{ matrix.build_type }} (Unix)
- if: runner.os != 'Windows'
- run: |
- mkdir build-${{ matrix.build_type }}
- cd build-${{ matrix.build_type }}
- cmake -G Ninja \
- -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
- -DBUILD_USE_VCPKG=ON \
- -DUSE_MMGR_TYPE=NATIVE \
- -DUSE_FREETYPE=ON \
- -DUSE_TK=OFF \
- -DBUILD_USE_PCH=ON \
- -DBUILD_INCLUDE_SYMLINK=ON \
- -DBUILD_LIBRARY_TYPE="Static" \
- -DINSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} \
- -DUSE_DRACO=ON \
- -DUSE_FFMPEG=ON \
- -DUSE_FREEIMAGE=ON \
- -DUSE_GLES2=OFF \
- -DUSE_VTK=ON \
- -DUSE_TBB=ON \
- -DUSE_RAPIDJSON=ON \
- -DUSE_OPENGL=ON \
- -DBUILD_MODULE_Draw=OFF \
- -DVCPKG_INSTALL_OPTIONS=--clean-buildtrees-after-build \
- ${{ runner.os != 'macOS' && '-DUSE_OPENVR=ON' || '' }} ..
- shell: bash
-
- - name: Configure OCCT ${{ matrix.build_type }} (Windows)
- if: runner.os == 'Windows'
- run: |
- mkdir build-${{ matrix.build_type }}
- cd build-${{ matrix.build_type }}
- cmake -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ^
- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
- -DBUILD_USE_VCPKG=ON ^
- -DUSE_MMGR_TYPE=JEMALLOC ^
- -DUSE_FREETYPE=ON ^
- -DUSE_TK=OFF ^
- -DBUILD_USE_PCH=ON ^
- -DBUILD_INCLUDE_SYMLINK=ON ^
- -DINSTALL_DIR=${{ github.workspace }}/install-${{ matrix.build_type }} ^
- -DUSE_DRACO=ON ^
- -DUSE_FFMPEG=OFF ^
- -DUSE_FREEIMAGE=ON ^
- -DUSE_GLES2=ON ^
- -DUSE_OPENVR=ON ^
- -DUSE_VTK=ON ^
- -DUSE_TBB=ON ^
- -DUSE_RAPIDJSON=ON ^
- -DVCPKG_INSTALL_OPTIONS=--clean-buildtrees-after-build ^
- -DUSE_OPENGL=ON ..
- shell: cmd
-
- - name: Build OCCT ${{ matrix.build_type }} (Unix)
- if: runner.os != 'Windows'
- run: |
- cd build-${{ matrix.build_type }}
- cmake --build . --target install --config ${{ matrix.build_type }}
- shell: bash
-
- - name: Build OCCT ${{ matrix.build_type }} (Windows)
- if: runner.os == 'Windows'
- run: |
- cd build-${{ matrix.build_type }}
- cmake --build . --target install --config ${{ matrix.build_type }}
- shell: cmd
+++ /dev/null
-# This workflow performs code analysis using both CodeQL and Microsoft C++ Code Analysis.
-# It is triggered on pushes to the 'master' branch and publishes warnings into the security GitHub tab.
-# The workflow includes two jobs: one for CodeQL analysis on Ubuntu and another for MSVC Code Analysis on Windows.
-
-name: Code Analysis
-
-on:
- push:
- branches:
- - 'master'
-
-permissions:
- contents: read
- security-events: write
- packages: read
-
-env:
- # Path to the CMake build directory.
- build: '${{ github.workspace }}/build'
- config: 'Debug'
-
-jobs:
- codeql-analyze:
- name: CodeQL Analyze (C/C++)
- runs-on: ubuntu-latest
-
- steps:
- # Step: Checkout the repository
- - name: Checkout repository
- uses: actions/checkout@v4.1.7
-
- # Step: Install necessary dependencies for building the project
- - name: Install dependencies
- run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev
-
- # Step: Initialize CodeQL for scanning
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v3.26.5
- with:
- languages: c-cpp
- build-mode: manual
-
- # Step: Build the project using CMake and Make
- - name: Build project
- shell: bash
- run: |
- mkdir -p build
- cd build
- cmake -G "Unix Makefiles" \
- -D CMAKE_C_COMPILER=gcc \
- -D CMAKE_CXX_COMPILER=g++ \
- -D USE_FREETYPE=OFF \
- -D CMAKE_BUILD_TYPE=Release ..
- make -j$(nproc)
-
- # Step: Perform CodeQL Analysis
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v3.26.5
- with:
- category: "/language:c-cpp"
-
- msvc-analyze:
- name: Microsoft C++ Code Analysis
- runs-on: windows-latest
-
- steps:
- # Step: Checkout the repository
- - name: Checkout repository
- uses: actions/checkout@v4.1.7
-
- # Step: Install necessary dependencies using Chocolatey
- - name: Install dependencies
- run: |
- choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y
- choco install magicsplat-tcl-tk -y
-
- # Step: Configure the project using CMake
- - name: Configure CMake
- run: |
- mkdir build
- cd build
- cmake -D USE_FREETYPE=OFF -DCMAKE_BUILD_TYPE=${{ env.config }} ..
-
- # Step: Run MSVC Code Analysis
- - name: Run MSVC Code Analysis
- uses: microsoft/msvc-code-analysis-action@v0.1.1
- id: run-analysis
- with:
- cmakeBuildDirectory: ${{ env.build }}
- buildConfiguration: ${{ env.config }}
- ruleset: NativeRecommendedRules.ruleset
-
- # Step: Upload SARIF file to GitHub Code Scanning Alerts
- - name: Upload SARIF to GitHub
- uses: github/codeql-action/upload-sarif@v3.26.5
- with:
- sarif_file: ${{ steps.run-analysis.outputs.sarif }}
configure-windows:
name: Configure OCCT on Windows with MSVC
runs-on: windows-2025
- if: github.ref == 'refs/heads/IR' && github.repository == 'Open-Cascade-SAS/OCCT'
+ if: github.repository == 'Open-Cascade-SAS/OCCT'
steps:
- name: Checkout repository
configure-linux:
name: Configure OCCT on Ubuntu with Clang
runs-on: ubuntu-24.04
- if: github.ref == 'refs/heads/IR' && github.repository == 'Open-Cascade-SAS/OCCT'
+ if: github.repository == 'Open-Cascade-SAS/OCCT'
steps:
- name: Checkout repository
--- /dev/null
+# Master validation workflow that combines multiple build configurations
+# This workflow is triggered only on pushes to the master branch of the main repository
+# It includes Windows (MSVC, MinGW), Ubuntu, vcpkg builds, and code analysis
+
+name: Master Validation
+
+on:
+ push:
+ branches:
+ - master
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}
+ cancel-in-progress: true
+
+jobs:
+ # Windows MSVC/Clang builds
+ windows-msvc:
+ if: github.repository == 'Open-Cascade-SAS/OCCT'
+ name: Windows MSVC/Clang validation
+ runs-on: windows-2025
+
+ strategy:
+ fail-fast: false
+ matrix:
+ config:
+ - {
+ name: "MSVC",
+ cc: "cl",
+ cxx: "cl",
+ generator: "Visual Studio 17 2022",
+ toolset: "host=x64",
+ c_flags: "/W4 /WX",
+ cxx_flags: "/W4 /WX"
+ }
+ - {
+ name: "Clang",
+ cc: "clang",
+ cxx: "clang++",
+ generator: "Ninja",
+ toolset: "",
+ c_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option -Wno-error=cast-function-type-mismatch",
+ cxx_flags: "-Werror -Wall -Wextra -Wno-unknown-warning-option -Wno-error=cast-function-type-mismatch"
+ }
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4.1.7
+
+ - name: Setup Windows MSVC dependencies
+ uses: ./.github/actions/setup-windows-msvc-deps
+
+ - name: Build basic configuration
+ uses: ./.github/actions/cmake-build-basic
+ with:
+ generator: ${{ matrix.config.generator }}
+ cc: ${{ matrix.config.cc }}
+ cxx: ${{ matrix.config.cxx }}
+ build-type: "Release"
+ thirdparty-dir: ${{ github.workspace }}/3rdparty-vc14-64
+ compiler-flags: "${{ matrix.config.toolset != '' && format('-T {0}', matrix.config.toolset) || '' }} -D CMAKE_CXX_FLAGS=\"${{ matrix.config.cxx_flags }}\" -D CMAKE_C_FLAGS=\"${{ matrix.config.c_flags }}\""
+
+ - name: Build full shared configuration
+ uses: ./.github/actions/cmake-build-full
+ with:
+ generator: ${{ matrix.config.generator }}
+ cc: ${{ matrix.config.cc }}
+ cxx: ${{ matrix.config.cxx }}
+ build-type: "Debug"
+ library-type: "Shared"
+ opt-profile: "Production"
+ thirdparty-dir: ${{ github.workspace }}/3rdparty-vc14-64
+ compiler-flags: "${{ matrix.config.toolset != '' && format('-T {0}', matrix.config.toolset) || '' }} -D CMAKE_CXX_FLAGS=\"${{ matrix.config.cxx_flags }}\" -D CMAKE_C_FLAGS=\"${{ matrix.config.c_flags }}\" -D USE_FFMPEG=ON"
+ use-vtk: ${{ matrix.config.name == 'MSVC' && 'ON' || 'OFF' }}
+ use-tbb: "ON"
+
+ # Windows MinGW builds
+ windows-mingw:
+ if: github.repository == 'Open-Cascade-SAS/OCCT'
+ name: Windows MinGW validation
+ runs-on: windows-2025
+
+ strategy:
+ fail-fast: false
+ matrix:
+ config:
+ - {
+ name: "GCC",
+ cc: "x86_64-w64-mingw32-gcc",
+ cxx: "x86_64-w64-mingw32-g++",
+ package: "mingw-w64-x86_64-toolchain",
+ msystem: "MINGW64",
+ compiler_flags: "",
+ dependencies: "mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-rapidjson mingw-w64-x86_64-freetype mingw-w64-x86_64-draco mingw-w64-x86_64-freeimage mingw-w64-x86_64-tbb mingw-w64-x86_64-tk mingw-w64-x86_64-tcl mingw-w64-x86_64-openvr mingw-w64-x86_64-jemalloc mingw-w64-x86_64-mesa mingw-w64-x86_64-angleproject mingw-w64-x86_64-llvm-openmp mingw-w64-x86_64-winpthreads-git mingw-w64-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
+ }
+ - {
+ name: "Clang",
+ cc: "clang",
+ cxx: "clang++",
+ package: "mingw-w64-clang-x86_64-toolchain",
+ msystem: "CLANG64",
+ compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Wall -Wextra\"",
+ dependencies: "mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-ninja mingw-w64-clang-x86_64-rapidjson mingw-w64-clang-x86_64-freetype mingw-w64-clang-x86_64-draco mingw-w64-clang-x86_64-freeimage mingw-w64-clang-x86_64-tbb mingw-w64-clang-x86_64-tk mingw-w64-clang-x86_64-tcl mingw-w64-clang-x86_64-openvr mingw-w64-clang-x86_64-jemalloc mingw-w64-clang-x86_64-mesa mingw-w64-clang-x86_64-angleproject mingw-w64-clang-x86_64-llvm-openmp mingw-w64-clang-x86_64-winpthreads-git mingw-w64-clang-x86_64-libwinpthread-git mingw-w64-cross-mingwarm64-winpthreads"
+ }
+ build_type: [Debug, Release]
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4.1.7
+
+ - name: Setup MSYS2
+ uses: ./.github/actions/setup-msys2
+ with:
+ msystem: ${{ matrix.config.msystem }}
+ packages: ${{ matrix.config.package }}
+ dependencies: ${{ matrix.config.dependencies }}
+
+ - name: Build basic configuration
+ uses: ./.github/actions/cmake-build-basic
+ with:
+ generator: "Ninja"
+ cc: ${{ matrix.config.cc }}
+ cxx: ${{ matrix.config.cxx }}
+ build-type: ${{ matrix.build_type }}
+ shell-type: "msys2"
+ compiler-flags: ${{ matrix.config.compiler_flags }}
+
+ - name: Build full shared configuration
+ uses: ./.github/actions/cmake-build-full
+ with:
+ generator: "Ninja"
+ cc: ${{ matrix.config.cc }}
+ cxx: ${{ matrix.config.cxx }}
+ build-type: ${{ matrix.build_type }}
+ library-type: "Shared"
+ opt-profile: "Production"
+ shell-type: "msys2"
+ compiler-flags: ${{ matrix.config.compiler_flags }}
+ use-vtk: "OFF"
+ use-tbb: "OFF"
+
+ # Ubuntu builds
+ ubuntu:
+ if: github.repository == 'Open-Cascade-SAS/OCCT'
+ name: Ubuntu validation
+ runs-on: ubuntu-24.04
+
+ strategy:
+ fail-fast: false
+ matrix:
+ config:
+ - {
+ name: "GCC",
+ cc: "gcc",
+ cxx: "g++",
+ compiler_flags: ""
+ }
+ - {
+ name: "Clang",
+ cc: "clang",
+ cxx: "clang++",
+ compiler_flags: "-D CMAKE_CXX_FLAGS=\"-Werror -Wall -Wextra\" -D CMAKE_C_FLAGS=\"-Werror -Wall -Wextra\""
+ }
+ build_type: [Debug, Release]
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4.1.7
+
+ - name: Setup Ubuntu dependencies
+ uses: ./.github/actions/setup-ubuntu-deps
+
+ - name: Build basic configuration
+ uses: ./.github/actions/cmake-build-basic
+ with:
+ generator: "Ninja"
+ cc: ${{ matrix.config.cc }}
+ cxx: ${{ matrix.config.cxx }}
+ build-type: ${{ matrix.build_type }}
+ compiler-flags: ${{ matrix.config.compiler_flags }}
+
+ - name: Build full shared configuration
+ uses: ./.github/actions/cmake-build-full
+ with:
+ generator: "Ninja"
+ cc: ${{ matrix.config.cc }}
+ cxx: ${{ matrix.config.cxx }}
+ build-type: ${{ matrix.build_type }}
+ library-type: "Shared"
+ opt-profile: "Production"
+ compiler-flags: ${{ matrix.config.compiler_flags }}
+ rapidjson-dir: ${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53
+ use-vtk: "ON"
+ use-tbb: "ON"
+
+ # vcpkg builds
+ vcpkg:
+ if: github.repository == 'Open-Cascade-SAS/OCCT'
+ name: vcpkg validation
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-24.04, ubuntu-22.04, windows-2022, windows-2025, macos-15, macos-14]
+ build_type: [Debug, Release]
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4.1.7
+
+ - name: Build OCCT with vcpkg
+ uses: ./.github/actions/build-occt
+ with:
+ platform: ${{ runner.os == 'Windows' && 'windows' || runner.os == 'macOS' && 'macos' || 'linux' }}
+ compiler: ${{ runner.os == 'Windows' && 'msvc' || 'clang' }}
+ artifact-name: occt-${{ matrix.os }}-${{ matrix.build_type }}
+ cmake-build-type: ${{ matrix.build_type }}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+
+ # Code analysis
+ codeql-analyze:
+ if: github.repository == 'Open-Cascade-SAS/OCCT'
+ name: CodeQL Analyze (C/C++)
+ runs-on: ubuntu-24.04
+
+ permissions:
+ contents: read
+ security-events: write
+ packages: read
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4.1.7
+
+ - name: Install dependencies
+ run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake gcc g++ make libbtbb-dev libx11-dev libglu1-mesa-dev
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v3.26.5
+ with:
+ languages: c-cpp
+ build-mode: manual
+
+ - name: Build project for analysis
+ uses: ./.github/actions/cmake-build-basic
+ with:
+ generator: "Unix Makefiles"
+ cc: "gcc"
+ cxx: "g++"
+ build-type: "Release"
+ compiler-flags: "-D USE_FREETYPE=OFF"
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v3.26.5
+ with:
+ category: "/language:c-cpp"
+
+ msvc-analyze:
+ if: github.repository == 'Open-Cascade-SAS/OCCT'
+ name: Microsoft C++ Code Analysis
+ runs-on: windows-2025
+
+ permissions:
+ contents: read
+ security-events: write
+ packages: read
+
+ env:
+ build: '${{ github.workspace }}/build'
+ config: 'Debug'
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4.1.7
+
+ - name: Configure OCCT for analysis
+ uses: ./.github/actions/configure-occt
+ with:
+ platform: 'windows'
+ compiler: 'msvc'
+ build-use-pch: 'false'
+ cmake-build-type: ${{ env.config }}
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Run MSVC Code Analysis
+ uses: microsoft/msvc-code-analysis-action@v0.1.1
+ id: run-analysis
+ with:
+ cmakeBuildDirectory: ${{ env.build }}
+ buildConfiguration: ${{ env.config }}
+ ruleset: NativeRecommendedRules.ruleset
+
+ - name: Upload SARIF to GitHub
+ uses: github/codeql-action/upload-sarif@v3.26.5
+ with:
+ sarif_file: ${{ steps.run-analysis.outputs.sarif }}
\ No newline at end of file
return false;
}
#else
- // For older FFmpeg, copy from stream's codec context
+ // For older FFmpeg, copy from stream's codec context
+ #ifdef _MSC_VER
+ #pragma warning(push)
+ #pragma warning(disable : 4996) // deprecated declaration
+ #endif
if (avcodec_copy_context(myCodecCtx, theStream.codec) < 0)
+ #ifdef _MSC_VER
+ #pragma warning(pop)
+ #endif
{
Message::SendFail("Internal error: unable to copy codec context");
Close();
const AVCodecID aCodecId =
theCodecId != AV_CODEC_ID_NONE ? (AVCodecID)theCodecId : theStream.codecpar->codec_id;
#else
+ #ifdef _MSC_VER
+ #pragma warning(push)
+ #pragma warning(disable : 4996) // deprecated declaration
+ #endif
const AVCodecID aCodecId = theCodecId != 0 ? (AVCodecID)theCodecId : theStream.codec->codec_id;
+ #ifdef _MSC_VER
+ #pragma warning(pop)
+ #endif
#endif
myCodec = ffmpeg_find_decoder(aCodecId);
#if FFMPEG_HAVE_AVCODEC_PARAMETERS
if (theStream.codecpar->codec_type == AVMEDIA_TYPE_VIDEO)
#else
+ #ifdef _MSC_VER
+ #pragma warning(push)
+ #pragma warning(disable : 4996) // deprecated declaration
+ #endif
if (theStream.codec->codec_type == AVMEDIA_TYPE_VIDEO)
+ #ifdef _MSC_VER
+ #pragma warning(pop)
+ #endif
#endif
{
myCodecCtx->thread_count =
if (theStream.codecpar->codec_type == AVMEDIA_TYPE_VIDEO
&& (myCodecCtx->width <= 0 || myCodecCtx->height <= 0))
#else
+ #ifdef _MSC_VER
+ #pragma warning(push)
+ #pragma warning(disable : 4996) // deprecated declaration
+ #endif
if (theStream.codec->codec_type == AVMEDIA_TYPE_VIDEO
&& (myCodecCtx->width <= 0 || myCodecCtx->height <= 0))
+ #ifdef _MSC_VER
+ #pragma warning(pop)
+ #endif
#endif
{
Message::SendFail("FFmpeg: video stream has invalid dimensions");
#if FFMPEG_HAVE_AVCODEC_PARAMETERS
&& av_cmp_q(aStream.sample_aspect_ratio, aStream.codecpar->sample_aspect_ratio) != 0)
#else
+ #ifdef _MSC_VER
+ #pragma warning(push)
+ #pragma warning(disable : 4996) // deprecated declaration
+ #endif
&& av_cmp_q(aStream.sample_aspect_ratio, aStream.codec->sample_aspect_ratio) != 0)
+ #ifdef _MSC_VER
+ #pragma warning(pop)
+ #endif
#endif
{
AVRational aDispAspectRatio;