Skip to content

Updated build for external dependencies (mods-latest)#2989

Draft
mathgeekcoder wants to merge 27 commits intoERGO-Code:mods-latestfrom
mathgeekcoder:mods-latest-luke
Draft

Updated build for external dependencies (mods-latest)#2989
mathgeekcoder wants to merge 27 commits intoERGO-Code:mods-latestfrom
mathgeekcoder:mods-latest-luke

Conversation

@mathgeekcoder
Copy link
Copy Markdown
Contributor

Note: this PR is for mods-latest branch

  • Includes significant improvement to how we use vcpkg
  • Currently uses vcpkg for highspy build - I want to test this on CI/CD
  • NOTE: sdist packages shouldn't use vcpkg unless the user already has it installed

Other changes

  • Added RPATH for linux/osx to find library
  • Support for vcpkg BLAS on linux (OpenBLAS) and osx (no vcpkg needed, uses accelerate)
  • Fixed type redefinition warning on metis
  • Fixed template-depth compile warning on C (not C++) files
  • Minor code cleanup (e.g., removed debug messages)
  • Added thread safety for dependency loading
  • Added highspy._core.getExtrasLoadStatus for debugging the library load
  • Added highspy COMPONENT to avoid pointless copy of header files
  • Tested with BUILD_SHARED_LIBS=ON/OFF and BUILD_SHARED_EXTRAS_LIB=ON/OFF and HIPO=ON/OFF (windows and linux)
  • Tested highspy and highspy-extras (windows and linux)

* Added RPATH for linux/osx to find library
* Support for vcpkg BLAS on linux (OpenBLAS) and osx (accelerate, not tested - might not actually work as is)
* Fixed type redefinition warning on metis
* Fixed `template-depth` compile warning on C (not C++) files
* Minor code cleanup (e.g., removed debug messages)
* Added thread safety for dependency loading
* Added `highspy._core.getExtrasLoadStatus` for debugging the library load
* Added highspy COMPONENT to avoid pointless copy of header files
* Tested with BUILD_SHARED_LIBS=ON/OFF and BUILD_SHARED_EXTRAS_LIB=ON/OFF and HIPO=ON/OFF  (windows and linux)
* Tested highspy and highspy-extras (windows and linux)
* Entirely optional for regular build (only uses if vcpkg installed)
* Currently used by highspy build (can be easily reverted)
* Uses github commit SHA for specific openblas version (reproducibility)
* highspy-extras build seems faster on windows (fresh 20mins -> 5mins) and 30s with cached openblas
* Should also work when creating highs as a vcpkg package
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 83.72093% with 7 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (mods-latest@9aaf141). Learn more about missing BASE report.

Files with missing lines Patch % Lines
check/TestHighsExternalDeps.cpp 82.35% 3 Missing ⚠️
highs/HighsExternalDeps.cpp 50.00% 3 Missing ⚠️
highs/HighsExternalDeps.h 80.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             mods-latest    #2989   +/-   ##
==============================================
  Coverage               ?   75.07%           
==============================================
  Files                  ?      376           
  Lines                  ?    97122           
  Branches               ?    15521           
==============================================
  Hits                   ?    72914           
  Misses                 ?    23932           
  Partials               ?      276           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mathgeekcoder mathgeekcoder marked this pull request as draft April 23, 2026 04:44
@galabovaa galabovaa self-requested a review April 23, 2026 09:57
…uld be github.workspace)

* Fixed issue with HIPO=OFF and copyright linking

* Hopefully fixed issue with vcpkg for highspy-extras
Since cibuildwheel on linux uses a container, need to point to host system's vcpkg instead.
* Updated sdist workflow to build highspy_extras in ./dist
* Updated vcpkg.cmake to use VCPKG_INSTALLATION_ROOT if VCPKG_ROOT not set
* fixed formatting issue
* fixed sdist build for highspy-extras
…extras

* changed test-python-win workflow to point to correct tests directory
* Updated vcpkg to treat VCPKG_ROOT="" as undefined
* Removed vcpkg support for i686 and musllinux, uses BUILD_OPENBLAS instead
* Fixed path issue with nuget tests
* Static link libhighs_extras into libhighs for julia build
* Fix venv paths for macos python
* Fix path warning for win pipx
* Removed vcpkg for workflow that specifically shouldn't use it
* Added verbose logging for debugging
* Fixed openblas path issue
…uild times

* Removed vcpkg from highspy build (not extras)
* Fixed issue with openblas_set_num_threads not included in build
* Formatting HighsExternalDeps
* Attempt at making highspy_extras build faster by building all on same VM (per image) and caching the vcpkg installs - should save hours of compute effort.
* Fix issue with vcpkg linux not using cache (missing zip/unzip)
* Fixed linker warnings with highs_extras on windows
* Improve hipo workflow build times
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants