Configuration - Implement VCPKG manifest basis #5
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: | |
- '**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
matrix: | |
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019, macos-15, macos-14, macos-13, macos-12] | |
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 curl zip unzip tar nasm | |
- 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 Release (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=Release \ | |
-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 Release (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=Release ^ | |
-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 Release (Unix) | |
if: runner.os != 'Windows' | |
run: | | |
cd build | |
cmake --build . --target install --config Release | |
shell: bash | |
- name: Build OCCT Release (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
cd build | |
cmake --build . --target install --config Release | |
shell: cmd | |
- name: Configure OCCT Debug (Unix) | |
if: runner.os != 'Windows' | |
run: | | |
mkdir build-debug | |
cd build-debug | |
cmake -G "Ninja" \ | |
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-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-debug \ | |
-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 Debug (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
mkdir build-debug | |
cd build-debug | |
cmake -G "Ninja" ^ | |
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake ^ | |
-DCMAKE_BUILD_TYPE=Debug ^ | |
-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-debug ^ | |
-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 Debug (Unix) | |
if: runner.os != 'Windows' | |
run: | | |
cd build-debug | |
cmake --build . --target install --config Debug | |
shell: bash | |
- name: Build OCCT Debug (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
cd build-debug | |
cmake --build . --target install --config Debug | |
shell: cmd |