Skip to content

Configuration - Implement VCPKG manifest basis #3

Configuration - Implement VCPKG manifest basis

Configuration - Implement VCPKG manifest basis #3

# 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'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, windows-2022, macos-15]
build_type: [Debug, Release]
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.7
- 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: Configure OCCT (Unix)
if: runner.os != 'Windows'
run: |
mkdir build
cd build
cmake -G "Ninja" \
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_USE_VCPKG=ON \
-DUSE_FREETYPE=ON \
-DUSE_TK=OFF \
-DBUILD_USE_PCH=ON \
-DBUILD_OPT_PROFILE=Production \
-DBUILD_INCLUDE_SYMLINK=ON \
-DINSTALL_DIR=${{ github.workspace }}/install \
-DUSE_DRACO=ON \
-DUSE_FFMPEG=ON \
-DUSE_FREEIMAGE=ON \
-DUSE_GLES2=ON \
-DUSE_VTK=ON \
-DUSE_TBB=ON \
-DUSE_RAPIDJSON=ON \
-DUSE_OPENGL=ON \
${{ runner.os != 'macOS' && '-DUSE_OPENVR=ON' || '' }} ..
shell: bash
- name: Configure OCCT (Windows)
if: runner.os == 'Windows'
run: |
mkdir build
cd build
cmake -G "Ninja" ^
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ^
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ^
-DBUILD_USE_VCPKG=ON ^
-DUSE_FREETYPE=ON ^
-DUSE_TK=OFF ^
-DBUILD_USE_PCH=ON ^
-DBUILD_OPT_PROFILE=Production ^
-DBUILD_INCLUDE_SYMLINK=ON ^
-DINSTALL_DIR=${{ github.workspace }}/install ^
-DUSE_DRACO=ON ^
-DUSE_FFMPEG=ON ^
-DUSE_FREEIMAGE=ON ^
-DUSE_GLES2=ON ^
-DUSE_OPENVR=ON ^
-DUSE_VTK=ON ^
-DUSE_TBB=ON ^
-DUSE_RAPIDJSON=ON ^
-DUSE_OPENGL=ON ..
shell: cmd
- name: Build OCCT (Unix)
if: runner.os != 'Windows'
run: |
cd build
cmake --build . --target install --config ${{ matrix.build_type }}
shell: bash
- name: Build OCCT (Windows)
if: runner.os == 'Windows'
run: |
cd build
cmake --build . --target install --config ${{ matrix.build_type }}
shell: cmd