Skip to content

Commit

Permalink
Merging master
Browse files Browse the repository at this point in the history
  • Loading branch information
tkralphs committed Dec 27, 2021
2 parents 91ba216 + 43129ba commit 06aff49
Show file tree
Hide file tree
Showing 12 changed files with 279 additions and 251 deletions.
5 changes: 0 additions & 5 deletions .ci/.travis.pre

This file was deleted.

11 changes: 0 additions & 11 deletions .ci/appveyor.pre

This file was deleted.

2 changes: 1 addition & 1 deletion .coin-or/Dependencies
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ThirdParty/ASL https://github.com/coin-or-tools/ThirdParty-ASL stable/2.0
ThirdParty/Mumps https://github.com/coin-or-tools/ThirdParty-Mumps stable/2.1
ThirdParty/Mumps https://github.com/coin-or-tools/ThirdParty-Mumps stable/3.0
ThirdParty/Glpk https://github.com/coin-or-tools/ThirdParty-Glpk master
Data/Netlib https://github.com/coin-or-tools/Data-Netlib master
Data/Sample https://github.com/coin-or-tools/Data-Sample master
Expand Down
6 changes: 2 additions & 4 deletions .coin-or/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ Description:
License: Eclipse Public License 2.0
LicenseURL: http://www.opensource.org/licenses/EPL-2.0
Zenodo: 173496299
Appveyor:
Status: h3daf7woiig6n176
Bintray:
IncludedIn:
Package: Clp
Language:
- C++
Expand All @@ -41,7 +39,7 @@ Dependencies:
Required: Optional
- Description: ThirdParty wrapper for building Mumps
URL: https://github.com/coin-or-tools/ThirdParty-Mumps
Version: 2.1
Version: 3.0
Required: Optional
- Description: ThirdParty wrapper for building Glpk
URL: https://github.com/coin-or-tools/ThirdParty-Glpk
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
name: Linux build and test
on:
push:
branches:
- 'master'
- 'stable/*'
pull_request:
branches:
- '*'
release:
types:
- created

jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
build_static: [true, false]
flags: [ADD_CXXFLAGS=-fvisibility=hidden]
download_requirements: [sudo apt install -y -qq gfortran liblapack-dev libmetis-dev libnauty2-dev]
include:
- os: macos-10.15
build_static: false
flags: CC=clang OSX=10.15
download_requirements: brew install metis bash
- os: macos-10.15
build_static: false
flags: CC=gcc-9 CXX=g++-9 OSX=10.15
download_requirements: brew install metis bash
- os: macos-10.15
build_static: false
flags: CC=gcc-10 CXX=g++-10 OSX=10.15
download_requirements: brew install metis bash
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
path: ${{ github.event.repository.name }}
- name: Install required packages from package manager
run: ${{ matrix.download_requirements }}
- name: Checkout coinbrew
uses: actions/checkout@v2
with:
repository: coin-or/coinbrew
path: coinbrew
- name: Build project
run: |
export ${{ matrix.flags }}
ADD_ARGS=()
ADD_ARGS+=( --no-prompt )
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+=( --static --with-lapack='-llapack -lblas -lgfortran -lquadmath -lm' )
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@v2
with:
repository: coin-or-tools/platform-analysis-tools
path: tools
ref: 0.0.1
- 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
if: ${{ github.event_name == 'pull_request'}}
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ github.head_ref }}-${{ 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:
- '*'

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
113 changes: 113 additions & 0 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
name: Windows 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: [
{ 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: true, suffix: "-mdd" },
{ os: windows-2019, arch: msvc, msystem: mingw64, debug: false, suffix: "-md" },
{ os: windows-2016, arch: msvc, msystem: mingw64, debug: true, suffix: "-mdd" },
{ os: windows-2016, arch: msvc, msystem: mingw64, debug: false, suffix: "-md" },
]
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
path: ${{ github.event.repository.name }}
- name: Checkout coinbrew
uses: actions/checkout@v2
with:
repository: coin-or/coinbrew
path: coinbrew
- name: Set up msvc
uses: ilammy/msvc-dev-cmd@v1
if: ${{ matrix.arch == 'msvc' }}
- name: Set correct host flag and install requirements
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
if: ${{ matrix.arch != 'msvc' }}
- 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 }}
- name: Build project
run: |
ADD_ARGS=()
ADD_ARGS+=( --no-prompt )
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 )
ADD_BUILD_ARGS+=( --verbosity 2 )
[[ ${{ matrix.debug }} == "true" ]] && ADD_BUILD_ARGS+=( --enable-debug )
[[ ${{ matrix.arch }} == "msvc" ]] && ADD_BUILD_ARGS+=( --enable-msvc )
./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@v2
if: failure()
with:
name: ${{ matrix.os}}-{{ matrix.arch }}-debug=${{ matrix.debug }}-failedbuild
path: 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
if: ${{ github.event_name == 'pull_request'}}
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ github.head_ref }}-${{ 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
Loading

0 comments on commit 06aff49

Please sign in to comment.