forked from coin-or/Clp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
279 additions
and
251 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.