Testing - Update CI workflow to build and test on Ubuntu with GCC (#1028)

- Replaced macOS Clang (No PCH) job with Ubuntu GCC (No PCH) job in the workflow dependency list
- Updated the build job to use `ubuntu-24.04` runner with GCC compiler instead of `macos-15` with Clang
- Updated the test job to run on Ubuntu with GCC instead of macOS with Clang
This commit is contained in:
Pasukhin Dmitry
2026-01-24 12:03:19 +00:00
committed by GitHub
parent 3aeb4668f5
commit 1f251bb5ac
15 changed files with 79 additions and 69 deletions
+9 -1
View File
@@ -31,6 +31,10 @@ inputs:
description: 'CMake build type (Release, Debug, etc)'
required: false
default: 'Release'
build-parallel-jobs:
description: 'Number of parallel build jobs (empty for auto)'
required: false
default: ''
github-token:
description: 'GitHub token for vcpkg NuGet package access'
required: true
@@ -75,7 +79,11 @@ runs:
if: ${{ inputs.platform == 'linux' }}
run: |
cd build
cmake --build . --target install --config Release -- -j
if [ -n "${{ inputs.build-parallel-jobs }}" ]; then
cmake --build . --target install --config Release -- -j${{ inputs.build-parallel-jobs }}
else
cmake --build . --target install --config Release -- -j
fi
shell: bash
- name: Upload install directory
@@ -63,7 +63,7 @@ jobs:
- run-gtest-windows-x64
- run-gtest-macos-x64
- run-gtest-linux-clang-x64
- run-gtest-macos-clang-no-pch
- run-gtest-linux-gcc-no-pch
steps:
- name: Checkout repository
@@ -120,10 +120,10 @@ jobs:
artifact-name: install-linux-clang-x64
github-token: ${{ secrets.GITHUB_TOKEN }}
prepare-and-build-macos-clang-no-pch:
name: Prepare and Build on macOS with Clang (No PCH)
needs: prepare-and-build-macos-x64
runs-on: macos-15
prepare-and-build-linux-gcc-no-pch:
name: Prepare and Build on Ubuntu with GCC (No PCH)
needs: prepare-and-build-linux-clang-x64
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
@@ -132,13 +132,14 @@ jobs:
- name: Build OCCT
uses: ./.github/actions/build-occt
with:
platform: macos
compiler: clang
artifact-name: install-macos-clang-no-pch
platform: linux
compiler: gcc
artifact-name: install-linux-gcc-no-pch
build-use-pch: 'false'
build-opt-profile: 'Default'
additional-cmake-flags: '-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wno-error=cast-function-type-mismatch -Wno-error=deprecated-declarations" -D CMAKE_C_FLAGS="-Werror -Wall -Wextra -Wno-error=cast-function-type-mismatch -Wno-error=deprecated-declarations"'
additional-cmake-flags: '-D CMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wno-error=cast-function-type -Wno-error=deprecated-declarations" -D CMAKE_C_FLAGS="-Werror -Wall -Wextra -Wno-error=cast-function-type -Wno-error=deprecated-declarations"'
cmake-build-type: 'Debug'
build-parallel-jobs: '4'
github-token: ${{ secrets.GITHUB_TOKEN }}
test-windows-x64:
@@ -300,10 +301,10 @@ jobs:
install-artifact-name: install-linux-clang-x64
artifact-suffix: x64
run-gtest-macos-clang-no-pch:
name: Run GTest on macOS with Clang (No PCH, Debug)
needs: prepare-and-build-macos-clang-no-pch
runs-on: macos-15
run-gtest-linux-gcc-no-pch:
name: Run GTest on Ubuntu with GCC (No PCH, Debug)
needs: prepare-and-build-linux-gcc-no-pch
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
@@ -312,9 +313,9 @@ jobs:
- name: Run GTests
uses: ./.github/actions/run-gtest
with:
platform: macos
compiler: clang
install-artifact-name: install-macos-clang-no-pch
platform: linux
compiler: gcc
install-artifact-name: install-linux-gcc-no-pch
artifact-suffix: no-pch
test-summary:
@@ -1186,7 +1186,7 @@ TCollection_AsciiString StepData_StepWriter::CleanTextForSend(
if (aThirdChar == '2' || aThirdChar == '4' || aThirdChar == '0')
{
anIsDirective = true;
aDirectiveLength = 4; // Basic directive length: \X2\, \X4\, \X0\
aDirectiveLength = 4; // Basic directive length: \X2\, \X4\, \X0\ (4 chars)
// For \X2 and \X4, find the terminating \X0 sequence
if (aThirdChar == '2' || aThirdChar == '4')
@@ -28,11 +28,11 @@ using namespace MathUtils;
//! Result for vector function integration.
struct SetResult
{
Status Status = Status::NotConverged;
MathUtils::Status Status = MathUtils::Status::NotConverged;
std::optional<math_Vector> Values; //!< Integral of each component
int NbEquations = 0;
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
explicit operator bool() const { return IsDone(); }
};
@@ -30,13 +30,13 @@ using namespace MathUtils;
//! Specialized for symmetric matrices.
struct CroutResult
{
Status Status = Status::NotConverged;
MathUtils::Status Status = MathUtils::Status::NotConverged;
std::optional<math_Matrix> L; //!< Lower triangular matrix (unit diagonal)
std::optional<math_Vector> D; //!< Diagonal elements
std::optional<math_Matrix> Inverse; //!< Inverse matrix (lower triangle only)
std::optional<double> Determinant; //!< Matrix determinant
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
explicit operator bool() const { return IsDone(); }
};
@@ -28,12 +28,12 @@ using namespace MathUtils;
//! Result for eigenvalue decomposition of tridiagonal matrix.
struct EigenResult
{
Status Status = Status::NotConverged;
MathUtils::Status Status = MathUtils::Status::NotConverged;
std::optional<math_Vector> EigenValues; //!< Computed eigenvalues
std::optional<math_Matrix> EigenVectors; //!< Eigenvectors as columns
int Dimension = 0;
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
explicit operator bool() const { return IsDone(); }
};
@@ -30,13 +30,13 @@ using namespace MathUtils;
//! Result for LU decomposition.
struct LUResult
{
Status Status = Status::NotConverged;
MathUtils::Status Status = MathUtils::Status::NotConverged;
std::optional<math_Matrix> LU; //!< Combined L and U matrices
std::optional<math_IntegerVector> Pivot; //!< Pivot indices
std::optional<double> Determinant;
int Sign = 1; //!< Sign from row interchanges
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
explicit operator bool() const { return IsDone(); }
};
@@ -28,12 +28,12 @@ using namespace MathUtils;
//! Result for QR decomposition using Householder reflections.
struct QRResult
{
Status Status = Status::NotConverged;
MathUtils::Status Status = MathUtils::Status::NotConverged;
std::optional<math_Matrix> Q; //!< Orthogonal matrix Q (m x m)
std::optional<math_Matrix> R; //!< Upper triangular matrix R (m x n)
int Rank = 0; //!< Numerical rank
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
explicit operator bool() const { return IsDone(); }
};
@@ -38,13 +38,13 @@ enum class LeastSquaresMethod
//! Result for least squares problems.
struct LeastSquaresResult
{
Status Status = Status::NotConverged;
MathUtils::Status Status = MathUtils::Status::NotConverged;
std::optional<math_Vector> Solution; //!< Least squares solution x
std::optional<double> Residual; //!< ||Ax - b||_2 (L2 norm of residual)
std::optional<double> ResidualSq; //!< ||Ax - b||_2^2 (squared residual)
int Rank = 0; //!< Numerical rank of A (for SVD)
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
explicit operator bool() const { return IsDone(); }
};
@@ -29,13 +29,13 @@ using namespace MathUtils;
//! Result for SVD decomposition.
struct SVDResult
{
Status Status = Status::NotConverged;
MathUtils::Status Status = MathUtils::Status::NotConverged;
std::optional<math_Matrix> U; //!< Left singular vectors (m x n)
std::optional<math_Vector> SingularValues; //!< Singular values (n elements)
std::optional<math_Matrix> V; //!< Right singular vectors (n x n)
int Rank = 0; //!< Numerical rank
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
explicit operator bool() const { return IsDone(); }
};
@@ -29,7 +29,7 @@ using namespace MathUtils;
//! Result for Uzawa constrained optimization.
struct UzawaResult
{
Status Status = Status::NotConverged;
MathUtils::Status Status = MathUtils::Status::NotConverged;
std::optional<math_Vector> Solution; //!< Solution vector X
std::optional<math_Vector> Dual; //!< Dual (Lagrange) variables
std::optional<math_Vector> Error; //!< X - X0 (difference from starting point)
@@ -37,7 +37,7 @@ struct UzawaResult
std::optional<math_Matrix> InverseCTC; //!< (C * C^T)^-1 for gradient computation
int NbIterations = 0;
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
explicit operator bool() const { return IsDone(); }
};
@@ -42,14 +42,14 @@ using namespace MathUtils;
//! Result of 2D Newton iteration.
struct Newton2DResult
{
Status Status = Status::NotConverged; //!< Computation status
double U = 0.0; //!< Solution U coordinate
double V = 0.0; //!< Solution V coordinate
size_t NbIter = 0; //!< Number of iterations performed
double FNorm = 0.0; //!< Final |F| norm
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
double U = 0.0; //!< Solution U coordinate
double V = 0.0; //!< Solution V coordinate
size_t NbIter = 0; //!< Number of iterations performed
double FNorm = 0.0; //!< Final |F| norm
//! Returns true if computation succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
explicit operator bool() const { return IsDone(); }
@@ -43,14 +43,14 @@ enum class Status
//! Contains the found root/minimum location and diagnostic information.
struct ScalarResult
{
Status Status = Status::NotConverged; //!< Computation status
size_t NbIterations = 0; //!< Number of iterations performed
std::optional<double> Root; //!< Found root or minimum location
std::optional<double> Value; //!< Function value at root/minimum
std::optional<double> Derivative; //!< Derivative at root (if computed)
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
size_t NbIterations = 0; //!< Number of iterations performed
std::optional<double> Root; //!< Found root or minimum location
std::optional<double> Value; //!< Function value at root/minimum
std::optional<double> Derivative; //!< Derivative at root (if computed)
//! Returns true if computation succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
//! Example: if (aResult) { use *aResult.Root; }
@@ -61,12 +61,12 @@ struct ScalarResult
//! Supports up to 4 real roots (for quartic equations).
struct PolyResult
{
Status Status = Status::NotConverged; //!< Computation status
size_t NbRoots = 0; //!< Number of real roots found
std::array<double, 4> Roots = {0.0, 0.0, 0.0, 0.0}; //!< Array of real roots (sorted)
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
size_t NbRoots = 0; //!< Number of real roots found
std::array<double, 4> Roots = {0.0, 0.0, 0.0, 0.0}; //!< Array of real roots (sorted)
//! Returns true if computation succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
explicit operator bool() const { return IsDone(); }
@@ -81,7 +81,7 @@ struct PolyResult
//! Contains the solution vector and optional gradient/Jacobian information.
struct VectorResult
{
Status Status = Status::NotConverged; //!< Computation status
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
size_t NbIterations = 0; //!< Number of iterations performed
std::optional<math_Vector> Solution; //!< Solution vector (set by solver on success)
std::optional<double> Value; //!< Function value at solution (if computed)
@@ -89,7 +89,7 @@ struct VectorResult
std::optional<math_Matrix> Jacobian; //!< Jacobian at solution (if computed)
//! Returns true if computation succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
explicit operator bool() const { return IsDone(); }
@@ -99,12 +99,12 @@ struct VectorResult
//! Contains the solution vector and matrix determinant if computed.
struct LinearResult
{
Status Status = Status::NotConverged; //!< Computation status
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
std::optional<math_Vector> Solution; //!< Solution vector X in AX = B (set by solver)
std::optional<double> Determinant; //!< Determinant of matrix (if computed)
//! Returns true if computation succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
explicit operator bool() const { return IsDone(); }
@@ -114,13 +114,13 @@ struct LinearResult
//! Contains eigenvalues and optionally eigenvectors.
struct EigenResult
{
Status Status = Status::NotConverged; //!< Computation status
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
size_t NbIterations = 0; //!< Number of iterations performed
std::optional<math_Vector> EigenValues; //!< Computed eigenvalues (set by solver)
std::optional<math_Matrix> EigenVectors; //!< Computed eigenvectors (set by solver)
//! Returns true if computation succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
explicit operator bool() const { return IsDone(); }
@@ -130,14 +130,14 @@ struct EigenResult
//! Structure depends on decomposition type.
struct DecompResult
{
Status Status = Status::NotConverged; //!< Computation status
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
std::optional<math_Matrix> L; //!< Lower triangular (LU) or left singular vectors (SVD)
std::optional<math_Matrix> U; //!< Upper triangular (LU) or right singular vectors (SVD)
std::optional<math_Vector> D; //!< Diagonal elements or singular values
std::optional<double> Determinant; //!< Matrix determinant (if computed)
//! Returns true if decomposition succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
explicit operator bool() const { return IsDone(); }
@@ -147,15 +147,15 @@ struct DecompResult
//! Contains integral value and error estimates.
struct IntegResult
{
Status Status = Status::NotConverged; //!< Computation status
size_t NbIterations = 0; //!< Number of adaptive iterations
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
size_t NbIterations = 0; //!< Number of adaptive iterations
size_t NbPoints = 0; //!< Total number of quadrature points used
std::optional<double> Value; //!< Computed integral value
std::optional<double> AbsoluteError; //!< Estimated absolute error (if computed)
std::optional<double> RelativeError; //!< Estimated relative error (if computed)
//! Returns true if integration succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
explicit operator bool() const { return IsDone(); }
@@ -165,12 +165,12 @@ struct IntegResult
//! Contains the inverse matrix if computation succeeded.
struct InverseResult
{
Status Status = Status::NotConverged; //!< Computation status
std::optional<math_Matrix> Inverse; //!< Computed inverse matrix
std::optional<double> Determinant; //!< Determinant of matrix (if computed)
MathUtils::Status Status = MathUtils::Status::NotConverged; //!< Computation status
std::optional<math_Matrix> Inverse; //!< Computed inverse matrix
std::optional<double> Determinant; //!< Determinant of matrix (if computed)
//! Returns true if inversion succeeded.
bool IsDone() const { return Status == Status::OK; }
bool IsDone() const { return Status == MathUtils::Status::OK; }
//! Conversion to bool for convenient checking.
explicit operator bool() const { return IsDone(); }
@@ -14,6 +14,7 @@
#include <GeomFill_CorrectedFrenet.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
@@ -146,8 +147,8 @@ TEST(GeomFill_CorrectedFrenet, ActualReproducerCase)
ShapeExtend_WireData anExtend;
for (int i = 2; i <= aPoints.Length(); i++)
{
occ::handle<Geom_Curve> aCurve = GC_MakeSegment(aPoints(i - 1), aPoints(i)).Value();
TopoDS_Edge anEdge = BRepBuilderAPI_MakeEdge(aCurve).Edge();
occ::handle<Geom_TrimmedCurve> aCurve = GC_MakeSegment(aPoints(i - 1), aPoints(i)).Value();
TopoDS_Edge anEdge = BRepBuilderAPI_MakeEdge(aCurve).Edge();
anExtend.Add(anEdge);
}
@@ -240,8 +240,8 @@ NCollection_Array1<gp_Vec> GeomGridEval_Parabola::EvaluateGridDN(
NCollection_Array1<gp_Vec> aResult(1, aNb);
const gp_Parab& aParab = myGeom->Parab();
const gp_Dir& aXDir = aParab.XAxis().Direction();
const gp_Dir& aYDir = aParab.YAxis().Direction();
const gp_Dir aXDir = aParab.XAxis().Direction();
const gp_Dir aYDir = aParab.YAxis().Direction();
const double aFocal = aParab.Focal();
const double aXX = aXDir.X();