Testing - Retesting step for GH Actions #399
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 and tests OCCT on multiple platforms (Windows, macOS, Linux with Clang, and Linux with GCC). | |
# It is triggered on pull requests to any branch. | |
# The workflow includes steps to prepare and build the project on each platform, run tests, and upload the results. | |
# Concurrency is set to ensure that only one instance of the workflow runs per pull request at a time. | |
name: Build and Test OCCT on Multiple Platforms | |
on: | |
pull_request: | |
branches: | |
- '**' | |
push: | |
branches: | |
- 'master' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
jobs: | |
prepare-and-build-windows-x64: | |
name: Prepare and Build on Windows with MSVC (x64) | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Download and extract 3rdparty dependencies | |
run: | | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip | |
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . | |
Remove-Item 3rdparty-vc14-64.zip | |
shell: pwsh | |
- name: Download and extract Mesa3D | |
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 | |
- name: Run system-wide deployment | |
run: | | |
cd mesa3d | |
.\systemwidedeploy.cmd 1 | |
.\systemwidedeploy.cmd 5 | |
shell: cmd | |
- name: Configure OCCT | |
run: | | |
mkdir build | |
cd build | |
cmake -T host=x64 ` | |
-D USE_FREETYPE=ON ` | |
-D USE_TK=OFF ` | |
-D BUILD_USE_PCH=ON ` | |
-D BUILD_OPT_PROFILE=Production ` | |
-D BUILD_INCLUDE_SYMLINK=ON ` | |
-D CMAKE_BUILD_TYPE=Release ` | |
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 ` | |
-D INSTALL_DIR=${{ github.workspace }}/install ` | |
-D USE_DRACO=ON ` | |
-D USE_FFMPEG=ON ` | |
-D USE_FREEIMAGE=ON ` | |
-D USE_GLES2=ON ` | |
-D USE_OPENVR=ON ` | |
-D USE_VTK=ON ` | |
-D USE_TBB=ON ` | |
-D USE_RAPIDJSON=ON ` | |
-D USE_OPENGL=ON ` | |
-D CMAKE_CXX_FLAGS="/W4 /WX" ` | |
-D CMAKE_C_FLAGS="/W4 /WX" .. | |
shell: pwsh | |
- name: Build OCCT | |
run: | | |
cd build | |
cmake --build . --target install --config Release | |
- name: Upload install directory | |
uses: actions/[email protected] | |
with: | |
name: install-windows-x64 | |
path: install | |
retention-days: 7 | |
prepare-and-build-windows-clang-x64: | |
name: Prepare and Build on Windows with Clang (x64) | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Download and extract 3rdparty dependencies | |
run: | | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip | |
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . | |
Remove-Item 3rdparty-vc14-64.zip | |
shell: pwsh | |
- name: Download and extract Mesa3D | |
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 | |
- name: Run system-wide deployment | |
run: | | |
cd mesa3d | |
.\systemwidedeploy.cmd 1 | |
.\systemwidedeploy.cmd 5 | |
shell: cmd | |
- name: Configure OCCT | |
run: | | |
mkdir build | |
cd build | |
cmake -G "Ninja" ` | |
-D CMAKE_C_COMPILER=clang ` | |
-D CMAKE_CXX_COMPILER=clang++ ` | |
-D USE_FREETYPE=ON ` | |
-D USE_TK=OFF ` | |
-D BUILD_USE_PCH=ON ` | |
-D BUILD_OPT_PROFILE=Production ` | |
-D BUILD_INCLUDE_SYMLINK=ON ` | |
-D CMAKE_BUILD_TYPE=Release ` | |
-D 3RDPARTY_DIR=${{ github.workspace }}/3rdparty-vc14-64 ` | |
-D INSTALL_DIR=${{ github.workspace }}/install ` | |
-D USE_DRACO=ON ` | |
-D USE_FFMPEG=ON ` | |
-D USE_FREEIMAGE=ON ` | |
-D USE_GLES2=ON ` | |
-D USE_OPENVR=ON ` | |
-D USE_VTK=OFF ` | |
-D USE_TBB=ON ` | |
-D USE_RAPIDJSON=ON ` | |
-D USE_OPENGL=ON ` | |
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wno-unknown-warning-option" ` | |
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra -Wno-unknown-warning-option" .. | |
shell: pwsh | |
- name: Build OCCT | |
run: | | |
cd build | |
cmake --build . --target install --config Release | |
- name: Upload install directory | |
uses: actions/[email protected] | |
with: | |
name: install-windows-clang-x64 | |
path: install | |
retention-days: 7 | |
prepare-and-build-macos-x64: | |
name: Prepare and Build on macOS with Clang (x64) | |
runs-on: macos-15 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
run: | | |
brew update | |
brew install tcl-tk tbb gl2ps xerces-c \ | |
libxmu libxi libxft libxpm \ | |
glew freeimage draco glfw | |
- name: Install rapidjson | |
run: | | |
wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip | |
unzip rapidjson.zip | |
- name: Configure OCCT | |
run: | | |
mkdir -p build | |
cd build | |
cmake -G "Unix Makefiles" \ | |
-D CMAKE_C_COMPILER=clang \ | |
-D CMAKE_CXX_COMPILER=clang++ \ | |
-D BUILD_USE_PCH=ON \ | |
-D BUILD_INCLUDE_SYMLINK=ON \ | |
-D CMAKE_BUILD_TYPE=Release \ | |
-D INSTALL_DIR=${{ github.workspace }}/install \ | |
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \ | |
-D USE_RAPIDJSON=ON \ | |
-D USE_DRACO=ON \ | |
-D USE_FREETYPE=ON \ | |
-D USE_OPENGL=ON \ | |
-D USE_FREEIMAGE=ON \ | |
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \ | |
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" .. | |
- name: Build OCCT | |
run: | | |
cd build | |
make install -j$(sysctl -n hw.logicalcpu) | |
- name: Upload install directory | |
uses: actions/[email protected] | |
with: | |
name: install-macos-x64 | |
path: install | |
retention-days: 7 | |
prepare-and-build-macos-gcc-x64: | |
name: Prepare and Build on macOS with GCC (x64) | |
runs-on: macos-15 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
run: | | |
brew update | |
brew install tcl-tk tbb gl2ps xerces-c \ | |
libxmu libxi libxft libxpm \ | |
glew freeimage draco glfw | |
- name: Install rapidjson | |
run: | | |
wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip | |
unzip rapidjson.zip | |
- name: Configure OCCT | |
run: | | |
mkdir -p build | |
cd build | |
cmake -G "Unix Makefiles" \ | |
-D CMAKE_C_COMPILER=gcc \ | |
-D CMAKE_CXX_COMPILER=g++ \ | |
-D BUILD_USE_PCH=ON \ | |
-D BUILD_INCLUDE_SYMLINK=ON \ | |
-D CMAKE_BUILD_TYPE=Release \ | |
-D INSTALL_DIR=${{ github.workspace }}/install \ | |
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \ | |
-D USE_RAPIDJSON=ON \ | |
-D USE_DRACO=ON \ | |
-D USE_FREETYPE=ON \ | |
-D USE_OPENGL=ON \ | |
-D USE_FREEIMAGE=ON \ | |
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \ | |
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" .. | |
- name: Build OCCT | |
run: | | |
cd build | |
make install -j$(sysctl -n hw.logicalcpu) | |
- name: Upload install directory | |
uses: actions/[email protected] | |
with: | |
name: install-macos-gcc-x64 | |
path: install | |
retention-days: 7 | |
prepare-and-build-linux-clang-x64: | |
name: Prepare and Build on Ubuntu with Clang (x64) | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang 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 | |
- name: Install rapidjson | |
run: | | |
wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip | |
unzip rapidjson.zip | |
- name: Configure OCCT | |
run: | | |
mkdir -p build | |
cd build | |
cmake -G "Unix Makefiles" \ | |
-D CMAKE_C_COMPILER=clang \ | |
-D CMAKE_CXX_COMPILER=clang++ \ | |
-D BUILD_USE_PCH=ON \ | |
-D BUILD_INCLUDE_SYMLINK=ON \ | |
-D BUILD_OPT_PROFILE=Production \ | |
-D USE_TK=OFF \ | |
-D CMAKE_BUILD_TYPE=Release \ | |
-D INSTALL_DIR=${{ github.workspace }}/install \ | |
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \ | |
-D USE_FREETYPE=ON \ | |
-D USE_DRACO=ON \ | |
-D USE_FFMPEG=OFF \ | |
-D USE_FREEIMAGE=ON \ | |
-D USE_GLES2=ON \ | |
-D USE_OPENVR=ON \ | |
-D USE_VTK=ON \ | |
-D USE_TBB=OFF \ | |
-D USE_RAPIDJSON=ON \ | |
-D USE_OPENGL=ON \ | |
-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra" \ | |
-D CMAKE_C_FLAGS="-Werror -Wall -Wextra" .. | |
- name: Build OCCT | |
run: | | |
cd build | |
cmake --build . --target install --config Release -- -j | |
- name: Upload install directory | |
uses: actions/[email protected] | |
with: | |
name: install-linux-clang-x64 | |
path: install | |
retention-days: 7 | |
prepare-and-build-linux-gcc-x64: | |
name: Prepare and Build on Ubuntu with GCC (x64) | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
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 | |
- name: Install rapidjson | |
run: | | |
wget https://github.com/Tencent/rapidjson/archive/858451e5b7d1c56cf8f6d58f88cf958351837e53.zip -O rapidjson.zip | |
unzip rapidjson.zip | |
- name: Configure OCCT | |
run: | | |
mkdir -p build | |
cd build | |
cmake -G "Unix Makefiles" \ | |
-D CMAKE_C_COMPILER=gcc \ | |
-D CMAKE_CXX_COMPILER=g++ \ | |
-D BUILD_USE_PCH=ON \ | |
-D BUILD_INCLUDE_SYMLINK=ON \ | |
-D BUILD_OPT_PROFILE=Production \ | |
-D USE_TK=OFF \ | |
-D CMAKE_BUILD_TYPE=Release \ | |
-D INSTALL_DIR=${{ github.workspace }}/install \ | |
-D 3RDPARTY_RAPIDJSON_DIR=${{ github.workspace }}/rapidjson-858451e5b7d1c56cf8f6d58f88cf958351837e53 \ | |
-D USE_FREETYPE=ON \ | |
-D USE_DRACO=ON \ | |
-D USE_FFMPEG=OFF \ | |
-D USE_FREEIMAGE=ON \ | |
-D USE_GLES2=ON \ | |
-D USE_OPENVR=ON \ | |
-D USE_VTK=ON \ | |
-D USE_TBB=OFF \ | |
-D USE_RAPIDJSON=ON \ | |
-D USE_OPENGL=ON .. | |
- name: Build OCCT | |
run: | | |
cd build | |
cmake --build . --target install --config Release -- -j | |
- name: Upload install directory | |
uses: actions/[email protected] | |
with: | |
name: install-linux-gcc-x64 | |
path: install | |
retention-days: 7 | |
test-windows-x64: | |
name: Test on Windows (x64) | |
runs-on: windows-2022 | |
needs: prepare-and-build-windows-x64 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Download and extract 3rdparty dependencies | |
run: | | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip | |
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . | |
Remove-Item 3rdparty-vc14-64.zip | |
shell: pwsh | |
- name: Download and extract test data | |
run: | | |
cd data | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip | |
Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath . | |
Remove-Item opencascade-dataset-7.8.0.zip | |
shell: pwsh | |
- name: Download and extract install directory | |
uses: actions/[email protected] | |
with: | |
name: install-windows-x64 | |
path: install | |
- name: Download and extract Mesa3D | |
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 | |
- name: Run system-wide deployment | |
run: | | |
cd mesa3d | |
.\systemwidedeploy.cmd 1 | |
.\systemwidedeploy.cmd 5 | |
shell: cmd | |
- name: Install Visual C++ 2010 Redistributable | |
run: | | |
choco install -y vcredist2010 | |
refreshenv | |
shell: cmd | |
- name: Install CJK Fonts | |
run: | | |
Invoke-WebRequest -Uri https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip -OutFile Noto-hinted.zip | |
Expand-Archive -Path Noto-hinted.zip -DestinationPath $env:windir\Fonts | |
Remove-Item Noto-hinted.zip | |
shell: pwsh | |
- name: Run tests | |
run: | | |
cd install | |
call env.bat vc14 win64 release | |
DRAWEXE.exe -v -c testgrid -outdir results/windows-x64 | |
shell: cmd | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Clean up test results | |
run: | | |
cd install | |
call env.bat vc14 win64 release | |
DRAWEXE.exe -v -c cleanuptest results/windows-x64 | |
shell: cmd | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload test results | |
uses: actions/[email protected] | |
with: | |
name: results-windows-x64 | |
path: | | |
install/results/**/*.log | |
install/results/**/*.png | |
install/results/**/*.html | |
retention-days: 15 | |
retest-windows-x64: | |
name: Regression Test on Windows (x64) | |
runs-on: windows-2022 | |
needs: test-windows-x64 | |
steps: | |
- name: Download previous test results | |
uses: actions/[email protected] | |
with: | |
name: results-windows-x64 | |
path: test-results | |
- name: Check for test failures | |
id: check_failures | |
run: | | |
$failedCount = 0 | |
if (Test-Path "test-results/windows-x64/tests.log") { | |
$content = Get-Content "test-results/windows-x64/tests.log" | |
$totalLine = $content | Select-String "Total cases:" | |
if ($totalLine) { | |
if ($totalLine -match "FAILED") { | |
$failedCount = ($totalLine | ForEach-Object { $_.Line -replace '.*?(\d+) FAILED.*','$1' }) -as [int] | |
} | |
} | |
echo "failed_count=$failedCount" >> $env:GITHUB_OUTPUT | |
if ($failedCount -gt 0) { | |
echo "Tests failed count: $failedCount" | |
} | |
} | |
shell: pwsh | |
- name: Checkout repository | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
- name: Download and extract 3rdparty dependencies | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip | |
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . | |
Remove-Item 3rdparty-vc14-64.zip | |
shell: pwsh | |
- name: Download test data | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd data | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip | |
Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath . | |
Remove-Item opencascade-dataset-7.8.0.zip | |
shell: pwsh | |
- name: Download and extract install directory | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: install-windows-x64 | |
path: install | |
- name: Download previous test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-windows-x64 | |
path: install/results/windows-x64 | |
- name: Download and extract Mesa3D | |
if: steps.check_failures.outputs.failed_count > 0 | |
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 | |
- name: Run system-wide deployment | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd mesa3d | |
.\systemwidedeploy.cmd 1 | |
.\systemwidedeploy.cmd 5 | |
shell: cmd | |
- name: Install Visual C++ 2010 Redistributable | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
choco install -y vcredist2010 | |
refreshenv | |
shell: cmd | |
- name: Install CJK Fonts | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
Invoke-WebRequest -Uri https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip -OutFile Noto-hinted.zip | |
Expand-Archive -Path Noto-hinted.zip -DestinationPath $env:windir\Fonts | |
Remove-Item Noto-hinted.zip | |
shell: pwsh | |
- name: Run regression tests | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install | |
call env.bat vc14 win64 release | |
DRAWEXE.exe -v -c testgrid -regress results/windows-x64 -outdir results/windows-x64-retest -parallel 0 | |
shell: cmd | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Copy retest results back to original location | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/results/windows-x64-retest | |
if (Test-Path -Path "*") { | |
Copy-Item -Force -Recurse * ../windows-x64/ | |
cd ../../ | |
& ./env.bat vc14 win64 release | |
& ./DRAWEXE.exe -v -c "testsummarize results/windows-x64" | |
} else { | |
Write-Output "No retest results to copy - directory is empty" | |
} | |
shell: pwsh | |
- name: Upload updated test results | |
if: ${{ hashFiles('install/results/windows-x64-retest/*') != '' }} | |
uses: actions/[email protected] | |
with: | |
name: results-windows-x64 | |
path: install/results/windows-x64 | |
retention-days: 15 | |
overwrite: true | |
- name: Check test failures | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/results/windows-x64-retest | |
if (Test-Path tests.log) { | |
$failedCount = (Select-String -Path tests.log -Pattern "Total cases:.*FAILED" | ForEach-Object { $_.Matches } | ForEach-Object { $_.Groups[1].Value }) -as [int] | |
if ($failedCount -gt 10) { | |
Write-Error "Number of FAILED tests ($failedCount) exceeds threshold of 10" | |
echo "FAILED_COUNT=$failedCount" >> $env:GITHUB_ENV | |
exit 1 | |
} | |
Write-Output "Found $failedCount FAILED tests" | |
} | |
shell: pwsh | |
test-windows-clang-x64: | |
name: Test on Windows with Clang (x64) | |
runs-on: windows-2022 | |
needs: prepare-and-build-windows-clang-x64 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Download and extract 3rdparty dependencies | |
run: | | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip | |
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . | |
Remove-Item 3rdparty-vc14-64.zip | |
shell: pwsh | |
- name: Download and extract test data | |
run: | | |
cd data | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip | |
Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath . | |
Remove-Item opencascade-dataset-7.8.0.zip | |
shell: pwsh | |
- name: Download and extract install directory | |
uses: actions/[email protected] | |
with: | |
name: install-windows-clang-x64 | |
path: install | |
- name: Download and extract Mesa3D | |
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 | |
- name: Run system-wide deployment | |
run: | | |
cd mesa3d | |
.\systemwidedeploy.cmd 1 | |
.\systemwidedeploy.cmd 5 | |
shell: cmd | |
- name: Install Visual C++ 2010 Redistributable | |
run: | | |
choco install -y vcredist2010 | |
refreshenv | |
shell: cmd | |
- name: Install CJK Fonts | |
run: | | |
Invoke-WebRequest -Uri https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip -OutFile Noto-hinted.zip | |
Expand-Archive -Path Noto-hinted.zip -DestinationPath $env:windir\Fonts | |
Remove-Item Noto-hinted.zip | |
shell: pwsh | |
- name: Run tests | |
run: | | |
cd install | |
call env.bat clang win64 release | |
DRAWEXE.exe -v -c testgrid -outdir results/windows-clang-x64 | |
shell: cmd | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Clean up test results | |
run: | | |
cd install | |
call env.bat clang win64 release | |
DRAWEXE.exe -v -c cleanuptest results/windows-clang-x64 | |
shell: cmd | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload test results | |
uses: actions/[email protected] | |
with: | |
name: results-windows-clang-x64 | |
path: | | |
install/results/**/*.log | |
install/results/**/*.png | |
install/results/**/*.html | |
retention-days: 15 | |
retest-windows-clang-x64: | |
name: Regression Test on Windows with Clang (x64) | |
runs-on: windows-2022 | |
needs: test-windows-clang-x64 | |
steps: | |
- name: Download previous test results | |
uses: actions/[email protected] | |
with: | |
name: results-windows-clang-x64 | |
path: test-results | |
- name: Check for test failures | |
id: check_failures | |
run: | | |
$failedCount = 0 | |
if (Test-Path "test-results/windows-clang-x64/tests.log") { | |
$content = Get-Content "test-results/windows-clang-x64/tests.log" | |
$totalLine = $content | Select-String "Total cases:" | |
if ($totalLine) { | |
if ($totalLine -match "FAILED") { | |
$failedCount = ($totalLine | ForEach-Object { $_.Line -replace '.*?(\d+) FAILED.*','$1' }) -as [int] | |
} | |
} | |
echo "failed_count=$failedCount" >> $env:GITHUB_OUTPUT | |
if ($failedCount -gt 0) { | |
echo "Tests failed count: $failedCount" | |
} | |
} | |
shell: pwsh | |
- name: Checkout repository | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
- name: Download and extract 3rdparty dependencies | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/3rdparty-vc14-64.zip -OutFile 3rdparty-vc14-64.zip | |
Expand-Archive -Path 3rdparty-vc14-64.zip -DestinationPath . | |
Remove-Item 3rdparty-vc14-64.zip | |
shell: pwsh | |
- name: Download test data | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd data | |
Invoke-WebRequest -Uri https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.zip -OutFile opencascade-dataset-7.8.0.zip | |
Expand-Archive -Path opencascade-dataset-7.8.0.zip -DestinationPath . | |
Remove-Item opencascade-dataset-7.8.0.zip | |
shell: pwsh | |
- name: Download and extract install directory | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: install-windows-clang-x64 | |
path: install | |
- name: Download previous test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-windows-clang-x64 | |
path: install/results/windows-clang-x64 | |
- name: Download and extract Mesa3D | |
if: steps.check_failures.outputs.failed_count > 0 | |
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 | |
- name: Run system-wide deployment | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd mesa3d | |
.\systemwidedeploy.cmd 1 | |
.\systemwidedeploy.cmd 5 | |
shell: cmd | |
- name: Install Visual C++ 2010 Redistributable | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
choco install -y vcredist2010 | |
refreshenv | |
shell: cmd | |
- name: Install CJK Fonts | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
Invoke-WebRequest -Uri https://noto-website-2.storage.googleapis.com/pkgs/Noto-hinted.zip -OutFile Noto-hinted.zip | |
Expand-Archive -Path Noto-hinted.zip -DestinationPath $env:windir\Fonts | |
Remove-Item Noto-hinted.zip | |
shell: pwsh | |
- name: Run regression tests | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install | |
call env.bat clang win64 release | |
DRAWEXE.exe -v -c testgrid -regress results/windows-clang-x64 -outdir results/windows-clang-x64-retest -parallel 0 | |
shell: cmd | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Copy retest results back to original location | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/results/windows-clang-x64-retest | |
if (Test-Path -Path "*") { | |
Copy-Item -Force -Recurse * ../windows-clang-x64/ | |
cd ../../ | |
& ./env.bat clang win64 release | |
& ./DRAWEXE.exe -v -c "testsummarize results/windows-clang-x64" | |
} else { | |
Write-Output "No retest results to copy - directory is empty" | |
} | |
shell: pwsh | |
- name: Upload updated test results | |
if: ${{ hashFiles('install/results/windows-clang-x64-retest/*') != '' }} | |
uses: actions/[email protected] | |
with: | |
name: results-windows-clang-x64 | |
path: install/results/windows-clang-x64 | |
retention-days: 15 | |
overwrite: true | |
- name: Check test failures | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/results/windows-clang-x64-retest | |
if (Test-Path tests.log) { | |
$failedCount = (Select-String -Path tests.log -Pattern "Total cases:.*FAILED" | ForEach-Object { $_.Matches } | ForEach-Object { $_.Groups[1].Value }) -as [int] | |
if ($failedCount -gt 9) { | |
Write-Error "Number of FAILED tests ($failedCount) exceeds threshold of 9" | |
echo "FAILED_COUNT=$failedCount" >> $env:GITHUB_ENV | |
exit 1 | |
} | |
Write-Output "Found $failedCount FAILED tests" | |
} | |
shell: pwsh | |
test-macos-x64: | |
name: Test on macOS (x64) | |
runs-on: macos-15 | |
needs: prepare-and-build-macos-x64 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
run: | | |
brew update | |
brew install tcl-tk tbb gl2ps xerces-c \ | |
libxmu libxi libxft libxpm \ | |
glew freeimage draco glfw | |
- name: Download test data | |
run: | | |
cd data | |
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz | |
tar -xf opencascade-dataset-7.8.0.tar.xz | |
- name: Download and extract install directory | |
uses: actions/[email protected] | |
with: | |
name: install-macos-x64 | |
path: install | |
- name: Set LIBGL_ALWAYS_SOFTWARE environment variable | |
run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV | |
- name: Set execute permissions on DRAWEXE | |
run: chmod +x install/bin/DRAWEXE | |
- name: Run tests | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testgrid -outdir results/macos-x64 caf basic | |
shell: bash | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Clean up test results | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c cleanuptest results/macos-x64 | |
shell: bash | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload test results | |
uses: actions/[email protected] | |
with: | |
name: results-macos-x64 | |
path: | | |
install/bin/results/**/*.log | |
install/bin/results/**/*.png | |
install/bin/results/**/*.html | |
retention-days: 15 | |
retest-macos-x64: | |
name: Regression Test on macOS (x64) | |
runs-on: macos-15 | |
needs: test-macos-x64 | |
steps: | |
- name: Download previous test results | |
uses: actions/[email protected] | |
with: | |
name: results-macos-x64 | |
path: test-results | |
- name: Check for test failures | |
id: check_failures | |
run: | | |
failed_count=0 | |
if [ -f "test-results/macos-x64/tests.log" ]; then | |
total_line=$(grep "Total cases:" test-results/macos-x64/tests.log) | |
if [ ! -z "$total_line" ]; then | |
if [[ $total_line =~ "FAILED" ]]; then | |
failed_count=$(echo "$total_line" | grep -o "[0-9]* FAILED" | awk '{print $1}') | |
fi | |
fi | |
echo "failed_count=$failed_count" >> $GITHUB_OUTPUT | |
if [ "$failed_count" -gt 0 ]; then | |
echo "Tests failed count: $failed_count" | |
fi | |
fi | |
shell: bash | |
- name: Checkout repository | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
- name: Install dependencies | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
brew update | |
brew install tcl-tk tbb gl2ps xerces-c \ | |
libxmu libxi libxft libxpm \ | |
glew freeimage draco glfw | |
- name: Download test data | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd data | |
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz | |
tar -xf opencascade-dataset-7.8.0.tar.xz | |
- name: Download and extract install directory | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: install-macos-x64 | |
path: install | |
- name: Download previous test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-macos-x64 | |
path: install/bin/results | |
- name: Set LIBGL_ALWAYS_SOFTWARE environment variable | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV | |
- name: Set execute permissions on DRAWEXE | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: chmod +x install/bin/DRAWEXE | |
- name: Run regression tests | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testgrid -regress results/macos-x64 -outdir results/macos-x64-retest -parallel 0 | |
shell: bash | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Copy retest results back to original location | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/bin/results/macos-x64-retest | |
if [ "$(ls -A)" ]; then | |
cp -rf * ../macos-x64/ | |
cd ../../ | |
source env.sh | |
./DRAWEXE -v -c testsummarize results/macos-x64 | |
else | |
echo "No retest results to copy - directory is empty" | |
fi | |
- name: Upload updated test results | |
if: ${{ hashFiles('install/bin/results/macos-x64-retest/*') != '' }} | |
uses: actions/[email protected] | |
with: | |
name: results-macos-x64 | |
path: install/bin/results/macos-x64 | |
retention-days: 15 | |
overwrite: true | |
- name: Check test failures | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/bin/results/macos-x64-retest | |
if [ -f tests.log ]; then | |
FAILED_COUNT=$(grep "Total cases:" tests.log | grep -o "[0-9]* FAILED" | awk '{print $1}') | |
if [ ! -z "$FAILED_COUNT" ] && [ $FAILED_COUNT -gt 0 ]; then | |
echo "::error::Number of FAILED tests ($FAILED_COUNT) exceeds threshold of 0" | |
echo "FAILED_COUNT=$FAILED_COUNT" >> $GITHUB_ENV | |
exit 1 | |
fi | |
echo "Found $FAILED_COUNT FAILED tests" | |
fi | |
test-macos-gcc-x64: | |
name: Test on macOS with GCC (x64) | |
runs-on: macos-15 | |
needs: prepare-and-build-macos-gcc-x64 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
run: | | |
brew update | |
brew install tcl-tk tbb gl2ps xerces-c \ | |
libxmu libxi libxft libxpm \ | |
glew freeimage draco glfw | |
- name: Download test data | |
run: | | |
cd data | |
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz | |
tar -xf opencascade-dataset-7.8.0.tar.xz | |
- name: Download and extract install directory | |
uses: actions/[email protected] | |
with: | |
name: install-macos-gcc-x64 | |
path: install | |
- name: Set LIBGL_ALWAYS_SOFTWARE environment variable | |
run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV | |
- name: Set execute permissions on DRAWEXE | |
run: chmod +x install/bin/DRAWEXE | |
- name: Run tests | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testgrid -outdir results/macos-gcc-x64 caf basic | |
shell: bash | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Clean up test results | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c cleanuptest results/macos-gcc-x64 | |
shell: bash | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload test results | |
uses: actions/[email protected] | |
with: | |
name: results-macos-gcc-x64 | |
path: | | |
install/bin/results/**/*.log | |
install/bin/results/**/*.png | |
install/bin/results/**/*.html | |
retention-days: 15 | |
retest-macos-gcc-x64: | |
name: Regression Test on macOS with GCC (x64) | |
runs-on: macos-15 | |
needs: test-macos-gcc-x64 | |
steps: | |
- name: Download previous test results | |
uses: actions/[email protected] | |
with: | |
name: results-macos-gcc-x64 | |
path: test-results | |
- name: Check for test failures | |
id: check_failures | |
run: | | |
failed_count=0 | |
if [ -f "test-results/macos-gcc-x64/tests.log" ]; then | |
total_line=$(grep "Total cases:" test-results/macos-gcc-x64/tests.log) | |
if [ ! -z "$total_line" ]; then | |
if [[ $total_line =~ "FAILED" ]]; then | |
failed_count=$(echo "$total_line" | grep -o "[0-9]* FAILED" | awk '{print $1}') | |
fi | |
fi | |
echo "failed_count=$failed_count" >> $GITHUB_OUTPUT | |
if [ "$failed_count" -gt 0 ]; then | |
echo "Tests failed count: $failed_count" | |
fi | |
fi | |
shell: bash | |
- name: Checkout repository | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
- name: Install dependencies | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
brew update | |
brew install tcl-tk tbb gl2ps xerces-c \ | |
libxmu libxi libxft libxpm \ | |
glew draco glfw | |
- name: Download test data | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd data | |
curl -L -O https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz | |
tar -xf opencascade-dataset-7.8.0.tar.xz | |
- name: Download and extract install directory | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: install-macos-gcc-x64 | |
path: install | |
- name: Download previous test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-macos-gcc-x64 | |
path: install/bin/results | |
- name: Set LIBGL_ALWAYS_SOFTWARE environment variable | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV | |
- name: Set execute permissions on DRAWEXE | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: chmod +x install/bin/DRAWEXE | |
- name: Run regression tests | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testgrid -regress results/macos-gcc-x64 -outdir results/macos-gcc-x64-retest -parallel 0 | |
shell: bash | |
env: | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload regression test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-macos-gcc-x64-retest | |
path: install/bin/results/macos-gcc-x64-retest | |
retention-days: 15 | |
- name: Copy retest results back to original location | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/bin/results/macos-gcc-x64-retest | |
if [ "$(ls -A)" ]; then | |
cp -rf * ../macos-gcc-x64/ | |
cd ../../ | |
source env.sh | |
./DRAWEXE -v -c testsummarize results/macos-gcc-x64 | |
else | |
echo "No retest results to copy - directory is empty" | |
fi | |
- name: Upload updated test results | |
if: ${{ hashFiles('install/bin/results/macos-gcc-x64-retest/*') != '' }} | |
uses: actions/[email protected] | |
with: | |
name: results-macos-gcc-x64 | |
path: install/bin/results/macos-gcc-x64 | |
retention-days: 15 | |
overwrite: true | |
- name: Check test failures | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/bin/results/macos-gcc-x64-retest | |
if [ -f tests.log ]; then | |
FAILED_COUNT=$(grep "Total cases:" tests.log | grep -o "[0-9]* FAILED" | awk '{print $1}') | |
if [ ! -z "$FAILED_COUNT" ] && [ $FAILED_COUNT -gt 0 ]; then | |
echo "::error::Number of FAILED tests ($FAILED_COUNT) exceeds threshold of 0" | |
echo "FAILED_COUNT=$FAILED_COUNT" >> $GITHUB_ENV | |
exit 1 | |
fi | |
echo "Found $FAILED_COUNT FAILED tests" | |
fi | |
test-linux-clang-x64: | |
name: Test on Linux with Clang (x64) | |
runs-on: ubuntu-24.04 | |
needs: prepare-and-build-linux-clang-x64 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang 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 fonts-noto-cjk fonts-liberation fonts-ubuntu fonts-liberation fonts-ubuntu fonts-noto-cjk fonts-ipafont-gothic fonts-ipafont-mincho fonts-unfonts-core | |
- name: Install Xvfb and Mesa | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri | |
- name: Start Xvfb | |
run: Xvfb :99 -screen 0 1920x1080x24 & | |
- name: Download test data | |
run: | | |
cd data | |
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz | |
tar -xf opencascade-dataset-7.8.0.tar.xz | |
- name: Download and extract install directory | |
uses: actions/[email protected] | |
with: | |
name: install-linux-clang-x64 | |
path: install | |
- name: Set execute permissions on DRAWEXE | |
run: chmod +x install/bin/DRAWEXE | |
- name: Run tests | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testgrid -outdir results/linux-clang-x64 | |
shell: bash | |
env: | |
DISPLAY: :99 | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Clean up test results | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c cleanuptest results/linux-clang-x64 | |
shell: bash | |
env: | |
DISPLAY: :99 | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload test results | |
uses: actions/[email protected] | |
with: | |
name: results-linux-clang-x64 | |
path: | | |
install/bin/results/**/*.log | |
install/bin/results/**/*.png | |
install/bin/results/**/*.html | |
retention-days: 15 | |
retest-linux-clang-x64: | |
name: Regression Test on Linux with Clang (x64) | |
runs-on: ubuntu-24.04 | |
needs: test-linux-clang-x64 | |
steps: | |
- name: Download previous test results | |
uses: actions/[email protected] | |
with: | |
name: results-linux-clang-x64 | |
path: test-results | |
- name: Check for test failures | |
id: check_failures | |
run: | | |
failed_count=0 | |
if [ -f "test-results/linux-clang-x64/tests.log" ]; then | |
total_line=$(grep "Total cases:" test-results/linux-clang-x64/tests.log) | |
if [ ! -z "$total_line" ]; then | |
if [[ $total_line =~ "FAILED" ]]; then | |
failed_count=$(echo "$total_line" | grep -o "[0-9]* FAILED" | awk '{print $1}') | |
fi | |
fi | |
echo "failed_count=$failed_count" >> $GITHUB_OUTPUT | |
if [ "$failed_count" -gt 0 ]; then | |
echo "Tests failed count: $failed_count" | |
fi | |
fi | |
shell: bash | |
- name: Checkout repository | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
- name: Install dependencies | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: sudo apt-get update && sudo apt-get install -y tcl-dev tk-dev cmake clang 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 fonts-noto-cjk fonts-liberation fonts-ubuntu fonts-liberation fonts-ubuntu fonts-noto-cjk fonts-ipafont-gothic fonts-ipafont-mincho fonts-unfonts-core | |
- name: Install Xvfb and Mesa | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri | |
- name: Start Xvfb | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: Xvfb :99 -screen 0 1920x1080x24 & | |
- name: Download test data | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd data | |
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz | |
tar -xf opencascade-dataset-7.8.0.tar.xz | |
- name: Download and extract install directory | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: install-linux-clang-x64 | |
path: install | |
- name: Download previous test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-linux-clang-x64 | |
path: install/bin/results | |
- name: Set execute permissions on DRAWEXE | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: chmod +x install/bin/DRAWEXE | |
- name: Run regression tests | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testgrid -regress results/linux-clang-x64 -outdir results/linux-clang-x64-retest -parallel 0 | |
shell: bash | |
env: | |
DISPLAY: :99 | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload regression test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-linux-clang-x64-retest | |
path: install/bin/results/linux-clang-x64-retest | |
retention-days: 15 | |
- name: Copy retest results back to original location | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/bin/results/linux-clang-x64-retest | |
if [ "$(ls -A)" ]; then | |
cp -rf * ../linux-clang-x64/ | |
cd ../../ | |
source env.sh | |
./DRAWEXE -v -c testsummarize results/linux-clang-x64 | |
else | |
echo "No retest results to copy - directory is empty" | |
fi | |
- name: Upload updated test results | |
if: ${{ hashFiles('install/bin/results/linux-clang-x64-retest/*') != '' }} | |
uses: actions/[email protected] | |
with: | |
name: results-linux-clang-x64 | |
path: install/bin/results/linux-clang-x64 | |
retention-days: 15 | |
overwrite: true | |
- name: Check test failures | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/bin/results/linux-clang-x64-retest | |
if [ -f tests.log ]; then | |
FAILED_COUNT=$(grep "Total cases:" tests.log | grep -o "[0-9]* FAILED" | awk '{print $1}') | |
if [ ! -z "$FAILED_COUNT" ] && [ $FAILED_COUNT -gt 19 ]; then | |
echo "::error::Number of FAILED tests ($FAILED_COUNT) exceeds threshold of 19" | |
echo "FAILED_COUNT=$FAILED_COUNT" >> $GITHUB_ENV | |
exit 1 | |
fi | |
echo "Found $FAILED_COUNT FAILED tests" | |
fi | |
test-linux-gcc-x64: | |
name: Test on Linux with GCC (x64) | |
runs-on: ubuntu-24.04 | |
needs: prepare-and-build-linux-gcc-x64 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Install dependencies | |
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 fonts-noto-cjk fonts-liberation fonts-ubuntu fonts-liberation fonts-ubuntu fonts-noto-cjk fonts-ipafont-gothic fonts-ipafont-mincho fonts-unfonts-core | |
- name: Install Xvfb and Mesa | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri | |
- name: Start Xvfb | |
run: Xvfb :99 -screen 0 1920x1080x24 & | |
- name: Download test data | |
run: | | |
cd data | |
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz | |
tar -xf opencascade-dataset-7.8.0.tar.xz | |
- name: Download and extract install directory | |
uses: actions/[email protected] | |
with: | |
name: install-linux-gcc-x64 | |
path: install | |
- name: Set execute permissions on DRAWEXE | |
run: chmod +x install/bin/DRAWEXE | |
- name: Run tests | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testgrid -outdir results/linux-gcc-x64 | |
shell: bash | |
env: | |
DISPLAY: :99 | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Clean up test results | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c cleanuptest results/linux-gcc-x64 | |
shell: bash | |
env: | |
DISPLAY: :99 | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload test results | |
uses: actions/[email protected] | |
with: | |
name: results-linux-gcc-x64 | |
path: | | |
install/bin/results/**/*.log | |
install/bin/results/**/*.png | |
install/bin/results/**/*.html | |
retention-days: 15 | |
retest-linux-gcc-x64: | |
name: Regression Test on Linux with GCC (x64) | |
runs-on: ubuntu-24.04 | |
needs: test-linux-gcc-x64 | |
steps: | |
- name: Download previous test results | |
uses: actions/[email protected] | |
with: | |
name: results-linux-gcc-x64 | |
path: test-results | |
- name: Check for test failures | |
id: check_failures | |
run: | | |
failed_count=0 | |
if [ -f "test-results/linux-gcc-x64/tests.log" ]; then | |
total_line=$(grep "Total cases:" test-results/linux-gcc-x64/tests.log) | |
if [ ! -z "$total_line" ]; then | |
if [[ $total_line =~ "FAILED" ]]; then | |
failed_count=$(echo "$total_line" | grep -o "[0-9]* FAILED" | awk '{print $1}') | |
fi | |
fi | |
echo "failed_count=$failed_count" >> $GITHUB_OUTPUT | |
if [ "$failed_count" -gt 0 ]; then | |
echo "Tests failed count: $failed_count" | |
fi | |
fi | |
shell: bash | |
- name: Checkout repository | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
- name: Install dependencies | |
if: steps.check_failures.outputs.failed_count > 0 | |
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 fonts-noto-cjk fonts-liberation fonts-ubuntu fonts-liberation fonts-ubuntu fonts-noto-cjk fonts-ipafont-gothic fonts-ipafont-mincho fonts-unfonts-core | |
- name: Install Xvfb and Mesa | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri | |
- name: Start Xvfb | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: Xvfb :99 -screen 0 1920x1080x24 & | |
- name: Download test data | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd data | |
wget https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_8_0/opencascade-dataset-7.8.0.tar.xz | |
tar -xf opencascade-dataset-7.8.0.tar.xz | |
- name: Download and extract install directory | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: install-linux-gcc-x64 | |
path: install | |
- name: Download previous test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-linux-gcc-x64 | |
path: install/bin/results/ | |
- name: Set execute permissions on DRAWEXE | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: chmod +x install/bin/DRAWEXE | |
- name: Run regression tests | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testgrid -regress results/linux-gcc-x64 -outdir results/linux-gcc-x64-retest -parallel 0 | |
shell: bash | |
env: | |
DISPLAY: :99 | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
CSF_TestScriptsPath: ${{ github.workspace }}/tests | |
CSF_TestDataPath: ${{ github.workspace }}/data | |
- name: Upload regression test results | |
if: steps.check_failures.outputs.failed_count > 0 | |
uses: actions/[email protected] | |
with: | |
name: results-linux-gcc-x64-retest | |
path: install/bin/results/linux-gcc-x64-retest | |
retention-days: 15 | |
- name: Copy retest results back to original location | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/bin/results/linux-gcc-x64-retest | |
if [ "$(ls -A)" ]; then | |
cp -rf * ../linux-gcc-x64/ | |
cd ../../ | |
source env.sh | |
./DRAWEXE -v -c testsummarize results/linux-gcc-x64 | |
else | |
echo "No retest results to copy - directory is empty" | |
fi | |
- name: Upload updated test results | |
if: ${{ hashFiles('install/bin/results/linux-gcc-x64-retest/*') != '' }} | |
uses: actions/[email protected] | |
with: | |
name: results-linux-gcc-x64 | |
path: install/bin/results/linux-gcc-x64 | |
retention-days: 15 | |
overwrite: true | |
- name: Check test failures | |
if: steps.check_failures.outputs.failed_count > 0 | |
run: | | |
cd install/bin/results/linux-gcc-x64-retest | |
if [ -f tests.log ]; then | |
FAILED_COUNT=$(grep "Total cases:" tests.log | grep -o "[0-9]* FAILED" | awk '{print $1}') | |
if [ ! -z "$FAILED_COUNT" ] && [ $FAILED_COUNT -gt 16 ]; then | |
echo "::error::Number of FAILED tests ($FAILED_COUNT) exceeds threshold of 16" | |
echo "FAILED_COUNT=$FAILED_COUNT" >> $GITHUB_ENV | |
exit 1 | |
fi | |
echo "Found $FAILED_COUNT FAILED tests" | |
fi | |
summarize: | |
name: Summarize and Send PR Message | |
runs-on: ubuntu-24.04 | |
if: github.event_name == 'pull_request' | |
needs: [retest-windows-x64, retest-windows-clang-x64, retest-macos-x64, retest-macos-gcc-x64, retest-linux-clang-x64, retest-linux-gcc-x64] | |
steps: | |
- name: Install dependencies | |
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 | |
- name: Install Xvfb and Mesa | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y xvfb mesa-utils libgl1-mesa-dri | |
- name: Start Xvfb | |
run: Xvfb :99 -screen 0 1920x1080x24 & | |
- name: Set DISPLAY environment variable | |
run: echo "DISPLAY=:99" >> $GITHUB_ENV | |
- name: Set LIBGL_ALWAYS_SOFTWARE environment variable | |
run: echo "LIBGL_ALWAYS_SOFTWARE=1" >> $GITHUB_ENV | |
- name: Download and extract install directory | |
uses: actions/[email protected] | |
with: | |
name: install-linux-gcc-x64 | |
path: install | |
- name: Set execute permissions on DRAWEXE | |
run: chmod +x install/bin/DRAWEXE | |
- name: Get latest workflow run ID from target branch | |
id: get_run_id | |
run: | | |
workflow_name="Build and Test OCCT on Multiple Platforms" | |
target_branch="${{ github.event.pull_request.base.ref }}" | |
echo "Fetching latest run ID for workflow: $workflow_name on branch: $target_branch" | |
response=$(curl -s \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
"https://api.github.com/repos/${{ github.repository }}/actions/runs?branch=$target_branch") | |
latest_run_id=$(echo "$response" | jq -r --arg workflow_name "$workflow_name" '.workflow_runs[] | select(.name==$workflow_name) | .id' | head -n 1) | |
echo "latest_run_id=$latest_run_id" >> $GITHUB_ENV | |
- name: Download all test results (Windows x64) from master | |
uses: actions/[email protected] | |
with: | |
name: results-windows-x64 | |
path: install/bin/results/master/ | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ env.latest_run_id }} | |
- name: Download all test results (Windows Clang x64) from master | |
uses: actions/[email protected] | |
with: | |
name: results-windows-clang-x64 | |
path: install/bin/results/master/ | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ env.latest_run_id }} | |
- name: Download all test results (macOS x64) from master | |
uses: actions/[email protected] | |
with: | |
name: results-macos-x64 | |
path: install/bin/results/master/ | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ env.latest_run_id }} | |
- name: Download all test results (macOS GCC x64) from master | |
uses: actions/[email protected] | |
with: | |
name: results-macos-gcc-x64 | |
path: install/bin/results/master/ | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ env.latest_run_id }} | |
- name: Download all test results (Linux Clang x64) from master | |
uses: actions/[email protected] | |
with: | |
name: results-linux-clang-x64 | |
path: install/bin/results/master/ | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ env.latest_run_id }} | |
- name: Download all test results (Linux GCC x64) from master | |
uses: actions/[email protected] | |
with: | |
name: results-linux-gcc-x64 | |
path: install/bin/results/master/ | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
run-id: ${{ env.latest_run_id }} | |
- name: Download all test results (Windows x64) | |
uses: actions/[email protected] | |
with: | |
name: results-windows-x64 | |
path: install/bin/results/current/ | |
- name: Download all test results (Windows Clang x64) | |
uses: actions/[email protected] | |
with: | |
name: results-windows-clang-x64 | |
path: install/bin/results/current/ | |
- name: Download all test results (macOS x64) | |
uses: actions/[email protected] | |
with: | |
name: results-macos-x64 | |
path: install/bin/results/current/ | |
- name: Download all test results (macOS GCC x64) | |
uses: actions/[email protected] | |
with: | |
name: results-macos-gcc-x64 | |
path: install/bin/results/current/ | |
- name: Download all test results (Linux Clang x64) | |
uses: actions/[email protected] | |
with: | |
name: results-linux-clang-x64 | |
path: install/bin/results/current/ | |
- name: Download all test results (Linux GCC x64) | |
uses: actions/[email protected] | |
with: | |
name: results-linux-gcc-x64 | |
path: install/bin/results/current/ | |
- name: Run tests | |
run: | | |
echo "Comparing test results..." | |
cd install | |
cd bin | |
source env.sh | |
./DRAWEXE -v -c testdiff results/current/windows-x64 results/master/windows-x64 & | |
./DRAWEXE -v -c testdiff results/current/windows-clang-x64 results/master/windows-clang-x64 & | |
./DRAWEXE -v -c testdiff results/current/macos-x64 results/master/macos-x64 & | |
./DRAWEXE -v -c testdiff results/current/macos-gcc-x64 results/master/macos-gcc-x64 & | |
./DRAWEXE -v -c testdiff results/current/linux-clang-x64 results/master/linux-clang-x64 & | |
./DRAWEXE -v -c testdiff results/current/linux-gcc-x64 results/master/linux-gcc-x64 & | |
wait | |
shell: bash | |
env: | |
DISPLAY: :99 | |
LIBGL_ALWAYS_SOFTWARE: 1 | |
- name: Upload updated test results (Windows x64) | |
uses: actions/[email protected] | |
with: | |
name: results-windows-x64 | |
overwrite: true | |
path: install/bin/results/current/windows-x64 | |
- name: Upload updated test results (Windows Clang x64) | |
uses: actions/[email protected] | |
with: | |
name: results-windows-clang-x64 | |
overwrite: true | |
path: install/bin/results/current/windows-clang-x64 | |
- name: Upload updated test results (macOS x64) | |
uses: actions/[email protected] | |
with: | |
name: results-macos-x64 | |
overwrite: true | |
path: install/bin/results/current/macos-x64 | |
- name: Upload updated test results (macOS GCC x64) | |
uses: actions/[email protected] | |
with: | |
name: results-macos-gcc-x64 | |
overwrite: true | |
path: install/bin/results/current/macos-gcc-x64 | |
- name: Upload updated test results (Linux Clang x64) | |
uses: actions/[email protected] | |
with: | |
name: results-linux-clang-x64 | |
overwrite: true | |
path: install/bin/results/current/linux-clang-x64 | |
- name: Upload updated test results (Linux GCC x64) | |
uses: actions/[email protected] | |
with: | |
name: results-linux-gcc-x64 | |
overwrite: true | |
path: install/bin/results/current/linux-gcc-x64 | |
- name: Upload test compare result logs | |
uses: actions/[email protected] | |
with: | |
name: test-compare-results | |
overwrite: true | |
path: | | |
install/bin/results/current/**/diff-*.html | |
install/bin/results/current/**/diff-*.log | |
install/bin/results/current/**/summary.html | |
install/bin/results/current/**/tests.log |