Skip to content

Commit

Permalink
Merge branch 'coin-or:master' into SolutionAllAsCsv
Browse files Browse the repository at this point in the history
  • Loading branch information
raller09 authored Oct 10, 2024
2 parents 7df838b + a5f753c commit a757c10
Show file tree
Hide file tree
Showing 109 changed files with 3,325 additions and 2,411 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,28 @@ jobs:
flags: [ADD_CXXFLAGS=-fvisibility=hidden]
download_requirements: [sudo apt install -y -qq gfortran liblapack-dev libmetis-dev libnauty2-dev]
include:
- os: macos-12
- os: macos-13
build_static: false
flags: CC=clang OSX=12
flags: CC=clang OSX=13
download_requirements: brew install metis bash
- os: macos-12
- os: macos-13
build_static: false
flags: CC=gcc-11 CXX=g++-11 OSX=12
flags: CC=gcc-13 CXX=g++-13 OSX=13 ADD_CXXFLAGS=-Wl,-ld_classic
download_requirements: brew install metis bash
- os: macos-12
- os: macos-14
arch: arm64
build_static: false
flags: CC=gcc-12 CXX=g++-12 OSX=12
flags: CC=gcc-13 CXX=g++-13 OSX=14 ADD_CXXFLAGS=-Wl,-ld_classic
download_requirements: brew install metis bash
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{ github.event.repository.name }}
- name: Install required packages from package manager
run: ${{ matrix.download_requirements }}
- name: Checkout coinbrew
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: coin-or/coinbrew
path: coinbrew
Expand All @@ -70,11 +71,11 @@ jobs:
cp ${{ github.event.repository.name }}/LICENSE dist/
tar -czvf release.tar.gz -C dist .
- name: Checkout package name generation script
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: coin-or-tools/platform-analysis-tools
path: tools
ref: 0.0.1
ref: 0.0.2
- name: Retrieve platform info
run: |
python3 -m venv venv
Expand All @@ -84,10 +85,9 @@ jobs:
platform_str=`python3 tools/hsf_get_platform.py -b $buildtype`
echo "platform_string=${platform_str}" >> $GITHUB_ENV
- name: Upload Artifact
if: ${{ github.event_name == 'pull_request'}}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{ github.head_ref }}-${{ env.platform_string }}.tar.gz
name: ${{ github.event.repository.name }}-${{ env.platform_string }}.tar.gz
path: release.tar.gz
if-no-files-found: error
- name: Upload package to release
Expand Down
61 changes: 7 additions & 54 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,24 @@ jobs:
include: [
{ os: windows-2019, arch: x86_64, msystem: mingw64, debug: true, suffix: "-dbg" },
{ os: windows-2019, arch: x86_64, msystem: mingw64, debug: false, suffix: "" },
{ os: windows-2019, arch: i686, msystem: mingw32, debug: true, suffix: "-dbg" },
{ os: windows-2019, arch: i686, msystem: mingw32, debug: false, suffix: "" },
{ os: windows-2019, arch: msvc, msystem: mingw64, debug: false, suffix: "-md" },
{ os: windows-2022, arch: msvc, msystem: mingw64, debug: false, suffix: "-md" },
{ os: windows-2022, arch: msvs, msystem: mingw64, debug: false, suffix: "" },
]
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{ github.event.repository.name }}
- name: Checkout coinbrew
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: coin-or/coinbrew
path: coinbrew
- name: Set up msvc
if: ${{ matrix.arch == 'msvc' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Set up for msvs
if: ${{ matrix.arch == 'msvs' }}
uses: microsoft/setup-msbuild@v1.1
- name: Set correct host flag and install requirements
if: ${{ matrix.arch != 'msvc' && matrix.arch != 'msvs' }}
if: ${{ matrix.arch != 'msvc' }}
run: |
echo "host_flag=--host=${{ matrix.arch }}-w64-mingw32" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
C:\msys64\usr\bin\pacman -S mingw-w64-${{ matrix.arch }}-lapack mingw-w64-${{ matrix.arch }}-winpthreads-git mingw-w64-${{ matrix.arch }}-readline mingw-w64-${{ matrix.arch }}-suitesparse mingw-w64-${{ matrix.arch }}-metis --noconfirm
Expand All @@ -59,47 +53,7 @@ jobs:
zip
path-type: inherit
msystem: ${{ matrix.msystem }}
- name: Fetch project for msvs
if: ${{ matrix.arch == 'msvs' }}
run: |
ADD_ARGS=()
ADD_ARGS+=( --skip='ThirdParty/Metis ThirdParty/Mumps ThirdParty/Blas ThirdParty/Lapack' )
./coinbrew/coinbrew fetch ${{ github.event.repository.name }} --skip-update "${ADD_ARGS[@]}"
echo "##################################################"
echo "### Extracting Netlib and Miplib3 if available"
if [ -d "./Data/Netlib/" ]; then gunzip ./Data/Netlib/*.gz; fi
if [ -d "./Data/Miplib3/" ]; then gunzip ./Data/Miplib3/*.gz; fi
echo "##################################################"
shell: msys2 {0}
- name: Build project for msvs
if: ${{ matrix.arch == 'msvs' }}
shell: cmd
run: |
msbuild ${{ github.event.repository.name }}\MSVisualStudio\v17\${{ github.event.repository.name }}.sln /p:Configuration=Release /p:Platform=x64 /m
- name: Test project for msvs
if: ${{ matrix.arch == 'msvs' }}
shell: cmd
run: |
.\${{ github.event.repository.name }}\MSVisualStudio\v17\${{ github.event.repository.name }}Test.cmd .\${{ github.event.repository.name }}\MSVisualStudio\v17\x64\Release .\Data\Sample .\Data\Netlib .\Data\Miplib3
- name: Install project for msvs
if: ${{ matrix.arch == 'msvs' }}
shell: cmd
run: |
mkdir dist
copy ${{ github.event.repository.name }}\README.* dist\.
copy ${{ github.event.repository.name }}\AUTHORS.* dist\.
copy ${{ github.event.repository.name }}\LICENSE.* dist\.
mkdir dist\bin
copy ${{ github.event.repository.name }}\MSVisualStudio\v17\x64\Release\*.exe dist\bin\.
mkdir dist\include\coin
copy ${{ github.event.repository.name }}\src\*.h dist\include\coin\.
copy ${{ github.event.repository.name }}\src\*.hpp dist\include\coin\.
mkdir dist\lib
copy ${{ github.event.repository.name }}\MSVisualStudio\v17\x64\Release\*.lib dist\lib\.
mkdir dist\share\coin\Data
xcopy Data dist\share\coin\Data\. /s /e
- name: Build project using coinbrew
if: ${{ matrix.arch != 'msvs' }}
- name: Build project
run: |
ADD_ARGS=()
ADD_ARGS+=( --skip='ThirdParty/Metis ThirdParty/Mumps ThirdParty/Blas ThirdParty/Lapack' )
Expand All @@ -115,7 +69,7 @@ jobs:
cp ${{ github.event.repository.name }}/LICENSE dist/
shell: msys2 {0}
- name: Upload failed build directory
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os}}-{{ matrix.arch }}-debug=${{ matrix.debug }}-failedbuild
Expand All @@ -132,10 +86,9 @@ jobs:
shell: msys2 {0}
if: ${{ matrix.arch != 'msvc' }}
- name: Upload artifact
if: ${{ github.event_name == 'pull_request'}}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{ github.head_ref }}-${{ env.package_suffix }}
name: ${{ github.event.repository.name }}-${{ env.package_suffix }}
path: dist
if-no-files-found: error
- name: Zip up dist contents for release
Expand Down
113 changes: 113 additions & 0 deletions .github/workflows/windows-msvs-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
name: Windows MSVS build and test
on:
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: [
# Only os: windows-2022 has Visual Studio 2022 (v17) installed with toolset v143, which is required.
# configuration: "Release" or "Debug", platform: "x86" or "x64". See solution Configuration Manager.
{ os: windows-2022, configuration: "Release", platform: "x64" },
]
steps:
- name: Set up environment variables
shell: cmd
# For cmd, dont use double quotes in the echo command and dont put a space before >> %GITHUB_ENV%
run: |
if "${{ matrix.platform }}"=="x64" echo output_dir=x64\${{ matrix.configuration }}>> %GITHUB_ENV%
if "${{ matrix.platform }}"=="x86" echo output_dir=${{ matrix.configuration }}>> %GITHUB_ENV%
echo package_suffix=${{ matrix.os}}-msvs-v17-${{ matrix.configuration }}-${{ matrix.platform }}>> %GITHUB_ENV%
- name: Check environment variables
shell: cmd
run: |
echo Output directory - '${{ env.output_dir }}'
echo Package suffix - '${{ env.package_suffix }}'
if "${{ env.output_dir }}"=="" echo ERROR - No output_dir set, possibly unsupported platform '${{ matrix.platform }}'. Expecting x64 or x86. && exit 1
- name: Checkout source
uses: actions/checkout@v4
with:
path: ${{ github.event.repository.name }}
- name: Checkout coinbrew
uses: actions/checkout@v4
with:
repository: coin-or/coinbrew
path: coinbrew
- name: Set up msbuild
uses: microsoft/setup-msbuild@v2
- name: Set up msys for coinbrew
uses: msys2/setup-msys2@v2
with:
update: true
install: >-
base-devel
git
zip
path-type: inherit
msystem: mingw64
- name: Fetch project
run: |
ADD_ARGS=()
ADD_ARGS+=( --skip='ThirdParty/Metis ThirdParty/Mumps ThirdParty/Blas ThirdParty/Lapack' )
./coinbrew/coinbrew fetch ${{ github.event.repository.name }} --skip-update "${ADD_ARGS[@]}"
echo "##################################################"
echo "### Extracting Netlib and Miplib3 if available"
if [ -d "./Data/Netlib/" ]; then gunzip ./Data/Netlib/*.gz; fi
if [ -d "./Data/Miplib3/" ]; then gunzip ./Data/Miplib3/*.gz; fi
echo "##################################################"
shell: msys2 {0}
- name: Build project
shell: cmd
run: |
msbuild ${{ github.event.repository.name }}\MSVisualStudio\v17\${{ github.event.repository.name }}.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} /m
- name: Test project
shell: cmd
run: |
.\${{ github.event.repository.name }}\MSVisualStudio\v17\${{ github.event.repository.name }}Test.cmd .\${{ github.event.repository.name }}\MSVisualStudio\v17\${{ env.output_dir }} .\Data\Sample .\Data\Netlib .\Data\Miplib3
- name: Install project
shell: cmd
run: |
mkdir dist
copy ${{ github.event.repository.name }}\README.* dist\.
copy ${{ github.event.repository.name }}\AUTHORS.* dist\.
copy ${{ github.event.repository.name }}\LICENSE.* dist\.
mkdir dist\bin
copy ${{ github.event.repository.name }}\MSVisualStudio\v17\${{ env.output_dir }}\*.exe dist\bin\.
mkdir dist\share
if exist .\Data\Sample xcopy .\Data\Sample dist\share\coin-or-sample /i
if exist .\Data\Netlib xcopy .\Data\Netlib dist\share\coin-or-netlib /i
if exist .\Data\Miplib3 xcopy .\Data\Miplib3 dist\share\coin-or-miplib3 /i
- name: Upload artifact
uses: actions/upload-artifact@v4
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
28 changes: 22 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
*~
aclocal*
aclocal.m4*
aclocal.m4.orig*
autom4te*
Cbc/*
*~
Makefile
config.cache
config.log
config.status
libtool
dist

# Ignore VS files
*.suo
*.db
*.bak
*.user
**/.vs/
**/MSVisualStudio/**/Release/
**/MSVisualStudio/**/ReleaseParallel/
**/MSVisualStudio/**/Debug/

# Ignore files created during unit tests
/MSVisualStudio/v17/*.mps
/MSVisualStudio/v17/*.lp
/MSVisualStudio/v17/*.out
**/MSVisualStudio/**/*.mps
**/MSVisualStudio/**/*.lp
**/MSVisualStudio/**/*.out
Loading

0 comments on commit a757c10

Please sign in to comment.