Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .coin-or/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Description:
Slug: CoinMP
ShortName: CoinMP
LongName: CoinMP
ShortDescription: A lightweight C API library for Clp, Cbc, and Cgl.
LongDescription: |2
CoinMP is a C-API interface library that supports most of the
functionality of the CLP (Coin LP), CBC (Coin Branch-and-Cut), and CGL
(Cut Generation Library) projects. It can be used as a shared library
(or DLL on Windows) from other C/C++ projects and applications.
Manager: Bjarni Kristjansson
Homepage: https://github.com/coin-or/CoinMP
License: Eclipse Public License 2.0
LicenseURL: http://www.opensource.org/licenses/EPL-2.0
Zenodo:
IncludedIn:
Package: CoinMP
Language:
- C++
Categories:
- Optimization deterministic linear continuous
- Optimization deterministic linear discrete
- Interfaces

Dependencies:
- Description: COIN-OR Utilities
URL: https://github.com/coin-or/CoinUtils
Version: stable/2.11
Required: Required
- Description: Open Solver Interface
URL: https://github.com/coin-or/Osi
Version: stable/0.108
Required: Required
- Description: COIN-OR Linear Programming Solver
URL: https://github.com/coin-or/Clp
Version: stable/1.17
Required: Required
- Description: Cut Generator Library
URL: https://github.com/coin-or/Cgl
Version: stable/0.60
Required: Required
- Description: COIN-OR Branch-and-Cut
URL: https://github.com/coin-or/Cbc
Version: stable/2.10
Required: Required

DevelopmentStatus:
activityStatus: Active
maturityLevel: 5
testedPlatforms:
- operatingSystem: Linux
compiler: gcc
- operatingSystem: Mac OS X
compiler:
- gcc
- clang
- operatingSystem: Microsoft Windows with MSys2
compiler:
- gcc
- cl
53 changes: 53 additions & 0 deletions .coin-or/generate_readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/usr/bin/env bash

# Exit when command fails
set -e
#Attempt to use undefined variable outputs error message, and forces an exit
set -u
#Causes a pipeline to return the exit status of the last command in the pipe
#that returned a non-zero return value.
set -o pipefail
#set -x

source $COINBREW_HOME/scripts/generate_readme

pushd . > /dev/null
cd $(dirname $0)
SCRIPT_DIR=$PWD
popd > /dev/null

create_variables $SCRIPT_DIR/config.yml

make_header

echo "CoinMP is a C-API interface library that supports most of the
functionality of the CLP (Coin LP), CBC (Coin Branch-and-Cut), and CGL (Cut
Generation Library) projects. It is built as a shared library (\`libCoinMP\`,
or \`CoinMP.dll\` on Windows) that can be used from other C/C++ projects and
applications. The header file \`CoinMP/src/CoinMP.h\` contains the prototypes of all
functions of the library."

# Arch's package is called coin-or-mp, Debian's only coinor-libcoinmp-dev, and
# conda-forge's coinmp. There are no current Fedora, linuxbrew, or Homebrew
# packages of CoinMP.
make_build_info | awk '
/^ \* Fedora\/Redhat\/CentOS:/ || /^ \* linuxbrew:/ || /^ \* \*Mac OS X\*:/ { skip = 1; fences = 0; next }
skip { if (/```/ && ++fences == 2) skip = 0; next }
{ print }' | sed -e 's/pacman -S coin-or-coinmp/pacman -S coin-or-mp/' \
-e 's/coinor-coinmp coinor-libcoinmp-dev/coinor-libcoinmp-dev/' \
-e 's/conda install coin-or-coinmp/conda install -c conda-forge coinmp/' \
-e 's|repology.org/project/coin-or-coinmp/|repology.org/project/coinmp/|'

echo "### Example

The \`CoinMP/examples\` directory has a C program that solves a few small problems
with CoinMP. After building and installing CoinMP, it can be built by running
\`make\` in the corresponding subdirectory of the build directory, e.g.,
\`\`\`
cd build/CoinMP/1.8/examples
make
./example
\`\`\`
"

make_links
102 changes: 102 additions & 0 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
name: Linux build and test
on:
workflow_dispatch:
push:
branches:
- 'master'
- 'stable/*'
pull_request:
branches:
- '**'
release:
types:
- created

jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
build_static: [true, false]
download_requirements: [sudo apt install -y -qq gfortran liblapack-dev libmetis-dev libnauty-dev]
include:
- os: macos-26-intel
build_static: false
flags: CC=clang CXX=clang++
download_requirements: brew install metis bash
- os: macos-26
build_static: false
flags: CC=gcc-15 CXX=g++-15 ADD_CXXFLAGS=-Wl,-ld_classic
download_requirements: brew install metis bash
- os: macos-15
build_static: false
flags: CC=clang CXX=clang++
download_requirements: brew install metis bash

steps:
- name: Checkout source
uses: actions/checkout@v6
with:
path: ${{ github.event.repository.name }}
- name: Install required packages from package manager
run: ${{ matrix.download_requirements }}
- name: Checkout coinbrew
uses: actions/checkout@v6
with:
repository: coin-or/coinbrew
path: coinbrew
- name: Build project
run: |
export ${{ matrix.flags }}
ADD_ARGS=()
ADD_ARGS+=( --skip='ThirdParty/Metis ThirdParty/Mumps ThirdParty/Blas ThirdParty/Lapack' )
ADD_BUILD_ARGS=()
ADD_BUILD_ARGS+=( --tests main --enable-relocatable )
ADD_BUILD_ARGS+=( --verbosity 2 )
[[ ${{ matrix.build_static }} == "true" ]] && \
ADD_BUILD_ARGS+=( --disable-shared )
bash coinbrew/coinbrew fetch ${{ github.event.repository.name }} --skip-update \
"${ADD_ARGS[@]}"
bash coinbrew/coinbrew build ${{ github.event.repository.name }} \
"${ADD_ARGS[@]}" "${ADD_BUILD_ARGS[@]}" \
ADD_CXXFLAGS="${ADD_CXXFLAGS}" CC=${CC} CXX=${CXX}
[[ ${CC} ]] && CC="${CC}" || CC=""
echo "CC=${CC}" >> $GITHUB_ENV
- name: Archive dist contents
run: |
cp ${{ github.event.repository.name }}/README.md dist/
cp ${{ github.event.repository.name }}/LICENSE dist/
tar -czvf release.tar.gz -C dist .
- name: Checkout package name generation script
uses: actions/checkout@v6
with:
repository: coin-or-tools/platform-analysis-tools
path: tools
ref: 0.0.2
- name: Retrieve platform info
run: |
python3 -m venv venv
source venv/bin/activate
pip install -r tools/requirements.txt
[[ ${{ matrix.build_static }} == "true" ]] && buildtype=static || buildtype=
platform_str=`python3 tools/hsf_get_platform.py -b $buildtype`
echo "platform_string=${platform_str}" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v6
with:
name: ${{ github.event.repository.name }}-${{ env.platform_string }}.tar.gz
path: release.tar.gz
if-no-files-found: error
- name: Upload package to release
if: ${{ github.event_name == 'release'}}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./release.tar.gz
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-${{ env.platform_string }}.tar.gz
asset_content_type: application/gzip
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Create Release

on:
push:
tags:
- 'releases/*'

jobs:
create_release:
runs-on: ubuntu-latest
steps:
- uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TKRALPHS_RELEASE }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
123 changes: 123 additions & 0 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
name: Windows build and test
on:
workflow_dispatch:
push:
branches:
- 'master'
- 'stable/*'
pull_request:
branches:
- '**'
release:
types:
- created

jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include: [
{ os: windows-2022, arch: x86_64, msystem: ucrt64, debug: true, suffix: "-dbg" },
{ os: windows-2025, arch: x86_64, msystem: ucrt64, debug: false, suffix: "" },
{ os: windows-2022, arch: msvc, msystem: ucrt64, debug: true, suffix: "-dbg" },
{ os: windows-2025, arch: msvc, msystem: ucrt64, debug: false, suffix: "-md" },
]
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
path: ${{ github.event.repository.name }}
- name: Checkout coinbrew
uses: actions/checkout@v6
with:
repository: coin-or/coinbrew
path: coinbrew
- name: Set up msvc
if: ${{ matrix.arch == 'msvc' }}
uses: egor-tensin/vs-shell@v2
- name: Set correct host flag
if: ${{ matrix.arch != 'msvc' }}
run: |
echo "host_flag=--host=${{ matrix.arch }}-w64-mingw32" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Set up msys with ${{ matrix.msystem }}
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
base-devel
git
zip
path-type: inherit
msystem: ${{ matrix.msystem }}
# setup-msys2 creates a fresh MSYS2 installation, so the requirements have
# to be installed into it (not into C:\msys64). The gcc toolchain and
# pkgconf are installed too, so that the compiler, pkg-config, and the
# libraries all come from the same MSYS2 environment, instead of from
# the runner's C:\mingw64 and Strawberry Perl. The MSYS pkgconf is used
# rather than ${MINGW_PACKAGE_PREFIX}-pkgconf, because the latter reports
# Windows-style paths (D:/...), with which libtool sets up a broken PATH
# for running the tests. gcc-fortran is installed because some configure
# scripts look for a Fortran compiler, and the runner's does not work
# with MSYS2's gcc.
- name: Install requirements
if: ${{ matrix.arch != 'msvc' }}
run: |
pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-gcc ${MINGW_PACKAGE_PREFIX}-gcc-fortran pkgconf ${MINGW_PACKAGE_PREFIX}-lapack ${MINGW_PACKAGE_PREFIX}-winpthreads ${MINGW_PACKAGE_PREFIX}-readline ${MINGW_PACKAGE_PREFIX}-suitesparse ${MINGW_PACKAGE_PREFIX}-metis
shell: msys2 {0}
- name: Build project
run: |
ADD_ARGS=()
ADD_ARGS+=( --skip='ThirdParty/Metis ThirdParty/Mumps ThirdParty/Blas ThirdParty/Lapack' )
ADD_BUILD_ARGS=()
ADD_BUILD_ARGS+=( --build=x86_64-w64-mingw32 --tests main --enable-relocatable --disable-pkg-config )
ADD_BUILD_ARGS+=( --verbosity 2 )
[[ ${{ matrix.debug }} == "true" ]] && ADD_BUILD_ARGS+=( --enable-debug )
[[ ${{ matrix.arch }} == "msvc" ]] && ADD_BUILD_ARGS+=( --enable-msvc=MD )
./coinbrew/coinbrew fetch ${{ github.event.repository.name }} --skip-update "${ADD_ARGS[@]}"
./coinbrew/coinbrew build ${{ github.event.repository.name }} ${{ env.host_flag }} \
"${ADD_ARGS[@]}" "${ADD_BUILD_ARGS[@]}"
cp ${{ github.event.repository.name }}/README.md dist/
cp ${{ github.event.repository.name }}/LICENSE dist/
shell: msys2 {0}
- name: Upload failed build directory
uses: actions/upload-artifact@v6
if: failure()
with:
name: ${{ matrix.os}}-${{ matrix.arch }}-debug=${{ matrix.debug }}-failedbuild
# coinbrew builds in build-debug with --enable-debug
path: ${{ matrix.debug && 'build-debug' || 'build' }}
- name: Generate package name for msvc
run: |
msvc_version=${VisualStudioVersion%.*}
echo "package_suffix=w64-msvc${msvc_version}${{ matrix.suffix }}" >> $GITHUB_ENV
shell: msys2 {0}
if: ${{ matrix.arch == 'msvc' }}
- name: Generate package name
run: |
echo "package_suffix=${{ matrix.arch }}-w64-${{ matrix.msystem }}${{ matrix.suffix }}" >> $GITHUB_ENV
shell: msys2 {0}
if: ${{ matrix.arch != 'msvc' }}
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: ${{ github.event.repository.name }}-${{ env.package_suffix }}
path: dist
if-no-files-found: error
- name: Zip up dist contents for release
if: ${{ github.event_name == 'release'}}
run: cd dist && zip -r ../release.zip *
shell: msys2 {0}
- name: Upload package to release
if: ${{ github.event_name == 'release'}}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./release.zip
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}-${{ env.package_suffix }}.zip
asset_content_type: application/gzip
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

Loading
Loading