mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-07-15 12:35:51 +03:00
Testing - Daily vcpkg package validation (#605)
- Introduce `.github/workflows/daily-ir-vcpkg-configure.yml` to run OCCT configuration daily on the IR branch for Windows, macOS, and Ubuntu. - Create a `configure-occt` composite action to encapsulate vcpkg setup and CMake configuration per platform. - Update the `build-occt` action to reuse the new `configure-occt` step instead of duplicating configuration logic.
This commit is contained in:
parent
675d75d134
commit
5643d5c34a
136
.github/actions/build-occt/action.yml
vendored
136
.github/actions/build-occt/action.yml
vendored
@ -38,136 +38,18 @@ inputs:
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/vcpkg-setup
|
||||
- name: Configure OCCT
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: ${{ inputs.platform }}
|
||||
compiler: ${{ inputs.compiler }}
|
||||
additional-cmake-flags: ${{ inputs.additional-cmake-flags }}
|
||||
use-vtk: ${{ inputs.use-vtk }}
|
||||
build-use-pch: ${{ inputs.build-use-pch }}
|
||||
build-opt-profile: ${{ inputs.build-opt-profile }}
|
||||
cmake-build-type: ${{ inputs.cmake-build-type }}
|
||||
github-token: ${{ inputs.github-token }}
|
||||
|
||||
- name: Download and extract Mesa3D (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
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 (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
cd mesa3d
|
||||
.\systemwidedeploy.cmd 1
|
||||
.\systemwidedeploy.cmd 5
|
||||
shell: cmd
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: sudo apt-get update && sudo apt-get install -y cmake ${{ inputs.compiler == 'clang' && 'clang' || 'gcc g++' }} make libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev
|
||||
shell: bash
|
||||
|
||||
- name: Install required packages (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
brew update || 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
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -T ${{ inputs.compiler == 'msvc' && 'host=x64' || 'ClangCL' }} `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_TK=ON `
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} `
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D BUILD_USE_VCPKG=ON `
|
||||
-D VCPKG_TARGET_TRIPLET=x64-windows `
|
||||
-D USE_D3D=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=${{ inputs.use-vtk }} `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
-D BUILD_GTEST=ON `
|
||||
-D BUILD_CPP_STANDARD=C++17 `
|
||||
-D INSTALL_GTEST=ON `
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure OCCT (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.compiler == 'clang' && 'clang' || 'gcc' }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.compiler == 'clang' && 'clang++' || 'g++' }} \
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install \
|
||||
-D BUILD_USE_VCPKG=ON \
|
||||
-D VCPKG_TARGET_TRIPLET=arm64-osx-dynamic \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D BUILD_GTEST=ON \
|
||||
-D BUILD_CPP_STANDARD=C++17 \
|
||||
-D INSTALL_GTEST=ON \
|
||||
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
# Set environment to help vcpkg find system libraries
|
||||
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"
|
||||
export CMAKE_PREFIX_PATH="/usr:/usr/local:$CMAKE_PREFIX_PATH"
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.compiler == 'clang' && 'clang' || 'gcc' }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.compiler == 'clang' && 'clang++' || 'g++' }} \
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install \
|
||||
-D BUILD_USE_VCPKG=ON \
|
||||
-D BUILD_LIBRARY_TYPE=Shared \
|
||||
-D VCPKG_TARGET_TRIPLET=x64-linux-dynamic \
|
||||
-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=${{ inputs.use-vtk }} \
|
||||
-D USE_TBB=ON \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
-D BUILD_GTEST=ON \
|
||||
-D BUILD_CPP_STANDARD=C++17 \
|
||||
-D INSTALL_GTEST=ON \
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
shell: bash
|
||||
|
||||
- name: Upload vcpkg cache
|
||||
uses: ./.github/actions/upload-vcpkg-cache
|
||||
with:
|
||||
|
169
.github/actions/configure-occt/action.yml
vendored
Normal file
169
.github/actions/configure-occt/action.yml
vendored
Normal file
@ -0,0 +1,169 @@
|
||||
name: 'Configure OCCT'
|
||||
description: 'Setup vcpkg and configure OCCT on a specific platform without building'
|
||||
|
||||
inputs:
|
||||
platform:
|
||||
description: 'Platform (windows, macos, linux)'
|
||||
required: true
|
||||
compiler:
|
||||
description: 'Compiler (msvc, clang, gcc)'
|
||||
required: true
|
||||
additional-cmake-flags:
|
||||
description: 'Additional CMake flags'
|
||||
required: false
|
||||
default: ''
|
||||
use-vtk:
|
||||
description: 'Enable VTK'
|
||||
required: false
|
||||
default: 'true'
|
||||
build-use-pch:
|
||||
description: 'Enable precompiled headers'
|
||||
required: false
|
||||
default: 'true'
|
||||
build-opt-profile:
|
||||
description: 'Build optimization profile'
|
||||
required: false
|
||||
default: 'Production'
|
||||
cmake-build-type:
|
||||
description: 'CMake build type (Release, Debug, etc)'
|
||||
required: false
|
||||
default: 'Release'
|
||||
github-token:
|
||||
description: 'GitHub token for vcpkg NuGet package access'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/vcpkg-setup
|
||||
with:
|
||||
github-token: ${{ inputs.github-token }}
|
||||
|
||||
- name: Download and extract Mesa3D (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
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 (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
cd mesa3d
|
||||
.\systemwidedeploy.cmd 1
|
||||
.\systemwidedeploy.cmd 5
|
||||
shell: cmd
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: sudo apt-get update && sudo apt-get install -y cmake ${{ inputs.compiler == 'clang' && 'clang' || 'gcc g++' }} make libglu1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev
|
||||
shell: bash
|
||||
|
||||
- name: Install required packages (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
brew update || 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
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT (Windows)
|
||||
if: ${{ inputs.platform == 'windows' }}
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -T ${{ inputs.compiler == 'msvc' && 'host=x64' || 'ClangCL' }} `
|
||||
-D USE_FREETYPE=ON `
|
||||
-D USE_TK=ON `
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} `
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} `
|
||||
-D BUILD_INCLUDE_SYMLINK=ON `
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} `
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install `
|
||||
-D BUILD_USE_VCPKG=ON `
|
||||
-D VCPKG_TARGET_TRIPLET=x64-windows `
|
||||
-D USE_D3D=ON `
|
||||
-D USE_DRACO=ON `
|
||||
-D USE_FFMPEG=ON `
|
||||
-D USE_FREEIMAGE=ON `
|
||||
-D USE_GLES2=ON `
|
||||
-D USE_OPENVR=ON `
|
||||
-D USE_VTK=${{ inputs.use-vtk }} `
|
||||
-D USE_TBB=ON `
|
||||
-D USE_RAPIDJSON=ON `
|
||||
-D USE_OPENGL=ON `
|
||||
-D BUILD_GTEST=ON `
|
||||
-D BUILD_CPP_STANDARD=C++17 `
|
||||
-D INSTALL_GTEST=ON `
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
echo "Configuration completed successfully for Windows"
|
||||
shell: pwsh
|
||||
|
||||
- name: Configure OCCT (macOS)
|
||||
if: ${{ inputs.platform == 'macos' }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.compiler == 'clang' && 'clang' || 'gcc' }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.compiler == 'clang' && 'clang++' || 'g++' }} \
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install \
|
||||
-D BUILD_USE_VCPKG=ON \
|
||||
-D VCPKG_TARGET_TRIPLET=arm64-osx-dynamic \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_DRACO=ON \
|
||||
-D USE_FREETYPE=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
-D USE_FREEIMAGE=ON \
|
||||
-D BUILD_GTEST=ON \
|
||||
-D BUILD_CPP_STANDARD=C++17 \
|
||||
-D INSTALL_GTEST=ON \
|
||||
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
echo "Configuration completed successfully for macOS"
|
||||
shell: bash
|
||||
|
||||
- name: Configure OCCT (Linux)
|
||||
if: ${{ inputs.platform == 'linux' }}
|
||||
run: |
|
||||
mkdir -p build
|
||||
cd build
|
||||
# Set environment to help vcpkg find system libraries
|
||||
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"
|
||||
export CMAKE_PREFIX_PATH="/usr:/usr/local:$CMAKE_PREFIX_PATH"
|
||||
cmake -G "Unix Makefiles" \
|
||||
-D CMAKE_C_COMPILER=${{ inputs.compiler == 'clang' && 'clang' || 'gcc' }} \
|
||||
-D CMAKE_CXX_COMPILER=${{ inputs.compiler == 'clang' && 'clang++' || 'g++' }} \
|
||||
-D BUILD_USE_PCH=${{ inputs.build-use-pch }} \
|
||||
-D BUILD_INCLUDE_SYMLINK=ON \
|
||||
-D BUILD_OPT_PROFILE=${{ inputs.build-opt-profile }} \
|
||||
-D USE_TK=ON \
|
||||
-D CMAKE_BUILD_TYPE=${{ inputs.cmake-build-type }} \
|
||||
-D INSTALL_DIR=${{ github.workspace }}/install \
|
||||
-D BUILD_USE_VCPKG=ON \
|
||||
-D BUILD_LIBRARY_TYPE=Shared \
|
||||
-D VCPKG_TARGET_TRIPLET=x64-linux-dynamic \
|
||||
-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=${{ inputs.use-vtk }} \
|
||||
-D USE_TBB=ON \
|
||||
-D USE_RAPIDJSON=ON \
|
||||
-D USE_OPENGL=ON \
|
||||
-D BUILD_GTEST=ON \
|
||||
-D BUILD_CPP_STANDARD=C++17 \
|
||||
-D INSTALL_GTEST=ON \
|
||||
${{ inputs.additional-cmake-flags }} ..
|
||||
echo "Configuration completed successfully for Linux"
|
||||
shell: bash
|
81
.github/workflows/daily-ir-vcpkg-configure.yml
vendored
Normal file
81
.github/workflows/daily-ir-vcpkg-configure.yml
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
# This workflow runs daily on the IR branch to configure OCCT with vcpkg packages.
|
||||
# It only performs configuration without building or installing, using vcpkg for dependency management.
|
||||
|
||||
name: Daily IR Branch vcpkg Configure
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run daily at 02:00 UTC
|
||||
- cron: '0 2 * * *'
|
||||
workflow_dispatch:
|
||||
# Allow manual triggering
|
||||
|
||||
jobs:
|
||||
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'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
- name: Configure OCCT
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: windows
|
||||
compiler: msvc
|
||||
cmake-build-type: Release
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Verify configuration output
|
||||
run: |
|
||||
echo "::notice::Successfully configured OCCT on Windows with vcpkg packages"
|
||||
|
||||
configure-macos:
|
||||
name: Configure OCCT on macOS with Clang
|
||||
runs-on: macos-15
|
||||
if: github.ref == 'refs/heads/IR' && github.repository == 'Open-Cascade-SAS/OCCT'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
- name: Configure OCCT
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: macos
|
||||
compiler: clang
|
||||
cmake-build-type: Release
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Verify configuration output
|
||||
run: |
|
||||
echo "::notice::Successfully configured OCCT on macOS with vcpkg packages"
|
||||
|
||||
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'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4.1.7
|
||||
with:
|
||||
ref: IR
|
||||
|
||||
- name: Configure OCCT
|
||||
uses: ./.github/actions/configure-occt
|
||||
with:
|
||||
platform: linux
|
||||
compiler: clang
|
||||
cmake-build-type: Release
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Verify configuration output
|
||||
run: |
|
||||
echo "::notice::Successfully configured OCCT on Linux with vcpkg packages"
|
Loading…
x
Reference in New Issue
Block a user