Configuration - Implement VCPKG manifest basis #4
Workflow file for this run
This file contains 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
# 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 }} | |
continue-on-error: true | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, windows-2022, macos-15] | |
build_type: [Debug, Release] | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install required packages (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential curl zip unzip tar | |
- name: Install required packages (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew update | |
brew install cmake ninja nasm | |
- 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 |