1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-01 17:36:21 +03:00
Pasukhin Dmitry c29c19bb0a
Coding - Migration of Inspector to own repository #438
New repository for Inspector: https://github.com/Open-Cascade-SAS/Inspector
Documentation and all build process are fully migrated.
"tools" folder keep to share information for some time.
Keep building inspector as before to keep control of API changes via GitHub actions.
2025-03-18 19:25:03 +00:00

94 lines
3.2 KiB
YAML

name: 'Build TInspector'
description: 'Build TInspector using OCCT installation as a separate job'
inputs:
platform:
description: 'Build platform (windows/linux)'
required: true
install-artifact-name:
description: 'OCCT installation artifact name'
required: true
thirdparty_url:
description: 'URL to download 3rdparty dependencies'
required: false
default: 'https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_0_beta1/3rdparty-vc14-64.zip'
runs:
using: "composite"
steps:
- name: Download OCCT installation
uses: actions/download-artifact@v4.1.7
with:
name: ${{ inputs.install-artifact-name }}
path: occt-install
- name: Install Windows dependencies
if: inputs.platform == 'windows'
shell: pwsh
run: |
Invoke-WebRequest -Uri ${{ inputs.thirdparty_url }} -OutFile 3rdparty-vc14-64.zip
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath .
Remove-Item 3rdparty-vc14-64.zip
- name: Install Linux dependencies
if: inputs.platform == 'linux'
shell: bash
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 tcllib tcl-thread tcl libvtk9-dev libopenvr-dev libdraco-dev libfreeimage-dev libegl1-mesa-dev libgles2-mesa-dev libfreetype-dev qtbase5-dev qt5-qmake qtbase5-dev-tools qtdeclarative5-dev qttools5-dev qttools5-dev-tools
- name: Checkout TInspector
shell: bash
run: |
git clone https://github.com/Open-Cascade-SAS/Inspector.git inspector
cd inspector
git checkout 6da9ba776ef72a17dca3331974df4200024c7f34
- name: Configure TInspector - Windows
if: inputs.platform == 'windows'
shell: pwsh
run: |
cd inspector
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 `
-D CMAKE_BUILD_TYPE=Release `
-D BUILD_SHARED_LIBS=ON `
-D 3RDPARTY_DIR=${{ github.workspace }}//3rdparty-vc14-64 `
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install `
-D INSTALL_DIR=${{ github.workspace }}/inspector/install `
..
- name: Configure TInspector - Linux
if: inputs.platform == 'linux'
shell: bash
run: |
cd inspector
mkdir build
cd build
cmake -G "Unix Makefiles" \
-D CMAKE_BUILD_TYPE=Release \
-D BUILD_SHARED_LIBS=ON \
-D OpenCASCADE_DIR=${{ github.workspace }}/occt-install \
-D INSTALL_DIR=${{ github.workspace }}/inspector/install \
..
- name: Build TInspector - Windows
if: inputs.platform == 'windows'
shell: pwsh
run: |
cd inspector/build
cmake --build . --config Release --target install
- name: Build TInspector - Linux
if: inputs.platform == 'linux'
shell: bash
run: |
cd inspector/build
make install -j$(nproc)
- name: Upload TInspector installation
uses: actions/upload-artifact@v4.4.3
with:
name: inspector-${{ inputs.platform }}-x64
path: inspector/install
retention-days: 7