Skip to content

Commit

Permalink
Add vs2022 for stable 1.3.1 (#32)
Browse files Browse the repository at this point in the history
* Add VS2022 (v17) to make stable 1.3.1 under EPL-2.0

* update appveyor to safe release_name replacing / by -

* Cleanup examples
  • Loading branch information
jhmgoossens authored Jun 17, 2023
1 parent 662df10 commit 6c345e6
Show file tree
Hide file tree
Showing 98 changed files with 10,137 additions and 3,565 deletions.
7 changes: 7 additions & 0 deletions .coin-or/Dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Data/Sample https://github.com/coin-or-tools/Data-Sample stable/1.2
Data/miplib3 https://github.com/coin-or-tools/Data-miplib3 stable/1.2
CoinUtils https://github.com/coin-or/CoinUtils stable/2.11
Osi https://github.com/coin-or/Osi stable/0.108
Clp https://github.com/coin-or/Clp stable/1.17
Cgl https://github.com/coin-or/Cgl stable/0.60
Cbc https://github.com/coin-or/Cbc stable/2.10
2 changes: 1 addition & 1 deletion .coin-or/projDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</projectShortDescription>
<projectManager>Jan-Willem Goossens</projectManager>
<projectHomePage>https://github.com/coin-or/SONNET</projectHomePage>
<projectLicense>Eclipse Public License 1.0</projectLicense>
<projectLicense>Eclipse Public License 2.0</projectLicense>
<projectLicenseURL>https://opensource.org/licenses/eclipse-1.0</projectLicenseURL>
<coinLinkedProjects>
<coinProject>
Expand Down
132 changes: 132 additions & 0 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
name: Windows build and test
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
release:
types:
- created

jobs:
build_and_test:
name: Build and Test
runs-on: windows-2022
steps:
- name: Setup environment
run: |
echo "builddate=$(Get-Date -format r)" >> $env:GITHUB_ENV
- name: Setup msbuild
uses: microsoft/[email protected]

- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6

- name: Checkout Sonnet source
uses: actions/checkout@v3
with:
path: Sonnet

- name: Checkout dependenies sources
shell: cmd
run: |
for /f "tokens=1,2,3" %%i in (sonnet\.coin-or\Dependencies) do (
echo Cloning project %%i from github %%j at branch %%k
git clone --depth 1 %%j -b %%k
)
7z x -bso0 -oData-miplib3 Data-miplib3\*.gz
erase /f Data-miplib3\*.gz
git clone --depth 1 https://github.com/GerHobbelt/pthread-win32.git -b master ..\pthreads
- name: Prepare for build
shell: pwsh
run: |
echo Built on: ${{ env.builddate }} > Sonnet\BUILD-INFO.txt
echo Version: 1.4.0.${{ github.run_number }} >> Sonnet\BUILD-INFO.txt
echo Ref: ${{ github.ref }} >> Sonnet\BUILD-INFO.txt
echo Ref name: ${{ github.ref_name }} >> Sonnet\BUILD-INFO.txt
echo Commit: ${{ github.sha }} >> Sonnet\BUILD-INFO.txt
Sonnet\build-third-party-license.bat
(Get-Content Sonnet\src\Sonnet\AssemblyInfo.cs).Replace('1.3.1.0','1.3.1.${{ github.run_number }}') | Set-Content Sonnet\src\Sonnet\AssemblyInfo.cs
(Get-Content Sonnet\src\SonnetWrapper\AssemblyInfo.h).Replace('1.3.1.0','1.3.1.${{ github.run_number }}').Replace('1,3,1,0','1,3,1,${{ github.run_number }}') | Set-Content Sonnet\src\SonnetWrapper\AssemblyInfo.h
7z --% a -tzip -r -x!.git "Sonnet-${{ github.ref_name }}-CI-src.zip" .\*
nuget restore Sonnet\MSVisualStudio\v17\Sonnet.sln
- name: Build
shell: cmd
run: |
REM echo Build pthread-win32 as static library
REM msbuild ..\pthreads\windows\VS2022\pthread_lib.2022.vcxproj -p:Configuration=Release -p:Platform=x64 -m
REM mkdir sonnet\lib\x64
REM copy ..\pthreads\windows\VS2022\bin\Release-Unicode-64bit-x64\pthread_static_lib.lib sonnet\lib\x64\.
REM echo.
echo Build Sonnet for x64, not ReleaseParallel
msbuild Sonnet\MSVisualStudio\v17\Sonnet.sln -p:Configuration=Release -p:Platform=x64 -m
- name: Run tests for net4 framework
shell: cmd
run: |
cd Sonnet\MSVisualStudio\v17\SonnetTestNET4\bin\x64\Release\
.\SonnetTest.exe
- name: Run tests for net60
shell: cmd
run: |
cd Sonnet\MSVisualStudio\v17\SonnetTest\bin\x64\Release\net6.0\
.\SonnetTest.exe
- name: Create asset package
if: ${{ github.ref_name == 'master' }}
shell: cmd
run: |
mkdir package\x64\net6.0
copy Sonnet\MSVisualStudio\v17\Sonnet\bin\x64\Release\net6.0\Sonnet.dll package\x64\net6.0\.
copy Sonnet\MSVisualStudio\v17\Sonnet\bin\x64\Release\net6.0\Sonnet.xml package\x64\net6.0\.
copy Sonnet\MSVisualStudio\v17\Sonnet\bin\x64\Release\net6.0\SonnetWrapper.dll package\x64\net6.0\.
copy Sonnet\MSVisualStudio\v17\Sonnet\bin\x64\Release\net6.0\SonnetWrapper.xml package\x64\net6.0\.
copy Sonnet\MSVisualStudio\v17\Sonnet\bin\x64\Release\net6.0\Ijwhost.dll package\x64\net6.0\.
mkdir package\x64\net48
copy Sonnet\MSVisualStudio\v17\SonnetNET4\bin\x64\Release\Sonnet.dll package\x64\net48\.
copy Sonnet\MSVisualStudio\v17\SonnetNET4\bin\x64\Release\Sonnet.xml package\x64\net48\.
copy Sonnet\MSVisualStudio\v17\SonnetNET4\bin\x64\Release\SonnetWrapper.dll package\x64\net48\.
copy Sonnet\MSVisualStudio\v17\SonnetNET4\bin\x64\Release\SonnetWrapper.xml package\x64\net48\.
copy Sonnet\AUTHORS.txt package\.
copy Sonnet\BUILD-INFO.txt package\.
copy Sonnet\CHANGELOG.txt package\.
copy Sonnet\LICENSE.txt package\.
copy Sonnet\NOTICE.txt package\.
copy Sonnet\README.md package\.
copy Sonnet\THIRD-PARTY-LICENSE.txt package\.
copy Sonnet\examples\Example5.cs package\.
cd package
7z a -tzip -r "..\Sonnet-${{ github.ref_name }}-CI-bin.zip" *
cd ..
- name: Update latest release
if: ${{ github.ref_name == 'master' }}
uses: IsaacShelton/[email protected]
with:
release: Sonnet-latest
tag: latest
draft: false
prerelease: true
replace: true
updateTag: true
body: |
Built on: ${{ env.builddate }} (v1.3.1.${{ github.run_number }} )
The Sonnet latest builds are pre-release builds based on the latest code in the master branch. As such, these builds may or may not be stable.
The Sonnet latest builds use the latest code in the [master branch of Cbc](https://github.com/coin-or/cbc) and its dependencies.
The Sonnet latest builds are created automatically at every successful build following a commit to the master branch.
Use the Sonnet-${{ github.ref_name }}-CI-src.zip to get all sources of Sonnet, Cbc and dependencies.
Do not use the 'Source code' assets because it only contains the sources of Sonnet.
token: ${{ secrets.GITHUB_TOKEN }}
files: |
Sonnet-${{ github.ref_name }}-CI-src.zip
Sonnet-${{ github.ref_name }}-CI-bin.zip
39 changes: 22 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,27 @@

*.suo
*.db
/.vs
/MSVisualStudio/v10/.vs
/MSVisualStudio/v10/Sonnet/obj
/MSVisualStudio/v10/SonnetExamples/obj
/MSVisualStudio/v10/SonnetTest/obj
/MSVisualStudio/v16/.vs
/MSVisualStudio/v16/Sonnet/bin
/MSVisualStudio/v16/Sonnet/obj
/MSVisualStudio/v16/SonnetExamples/bin
/MSVisualStudio/v16/SonnetExamples/obj
/MSVisualStudio/v16/SonnetTest/bin
/MSVisualStudio/v16/SonnetTest/obj
/MSVisualStudio/v16/SonnetWrapper/bin
/MSVisualStudio/v16/SonnetWrapper/obj
/MSVisualStudio/v16/x64*
/MSVisualStudio/v16/Win32*
*.bak
*.user
*.user
app.aps

**/.vs/
**/.sonarlint/

#ignore build folders
/MSVisualStudio/**/obj/
/MSVisualStudio/**/bin/
/MSVisualStudio/**/Release/
/MSVisualStudio/**/ReleaseParallel/
/MSVisualStudio/**/Debug/
/MSVisualStudio/**/x64*/
/MSVisualStudio/**/Win32*/

/MSVisualStudio/v16/packages/
/MSVisualStudio/v16/TestResults/
/MSVisualStudio/v16/UpgradeLog.htm
/MSVisualStudio/v16/Sonnet/Properties/launchSettings.json
/MSVisualStudio/v16/SonnetExamples/Properties/launchSettings.json
/MSVisualStudio/v16/SonnetTest/Properties/launchSettings.json

/MSVisualStudio/v17/packages/
18 changes: 14 additions & 4 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ Below are mentioned "[File Version] Product Assembly Version".
The File Version numbers change with every release. In contrast, the Assembly Version numbers are more stable.

[TODO]
- Remove Osi Dependency. In particular OsiCbc is no longer maintained, but still used by Sonnet.
- MIQP. Quadratic objective for MIP. Quadratic objective works with OsiClp (QP) but not

[1.3.0.0]
- MIQP. Quadratic objective for MIP. Quadratic objective works with OsiClp (QP).
Quadratic objectives via OsiCbc does not work well and is disabled. (Unconfirmed for Cbc 2.10.10)

[1.3.1.0] June 2023
Patch release of Sonnet, upgrading to Cbc 2.10.10 and support .NET 6.0 and .NET Framework 4.8.
- Bump to Cbc 2.10.10
- Solution and projects using Visual Studio 2022
- Support .NET 6.0 and .NET Framework 4.8
- Added Cbc Native tests to be run as part of Sonnet Testing
- Support building using AppVeyor and GitHub Actions

[1.3.0.0] Nov 2020
This release contains the complete assemblies to use SONNET (.NET Framework 4) in x86 and x64 builds.
Built-in are the necessary COIN-OR libraries based on Cbc 2.10.5 (8 March 2020).
Sonnet:
- Quadratic expressions supported. For now, only for objective functions.
- Quadratic Program (QP) supported via OsiClp. Quadratic objectives via OsiCbc does not work well and is disabled.
Expand Down
Loading

0 comments on commit 6c345e6

Please sign in to comment.