Skip to content

Commit

Permalink
Updating CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tkralphs committed Mar 27, 2024
1 parent 4a9f997 commit 4ed66c0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,23 @@ jobs:
build_static: [true, false]
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
download_requirements: brew install metis bash
- os: macos-12
build_static: false
flags: CC=gcc-12 CXX=g++-12 OSX=12
flags: CC=gcc-13 CXX=g++-13 OSX=13 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 @@ -54,6 +50,7 @@ jobs:
ADD_BUILD_ARGS=()
ADD_BUILD_ARGS+=( --tests main --enable-relocatable )
ADD_BUILD_ARGS+=( --verbosity 2 )
[[ ${{ matrix.os }} == ubuntu* ]] && ADD_ARGS+=( --with-nauty-incdir=/usr/include/x86_64-linux-gnu/nauty --with-nauty-lib="-L/usr/lib/ -lnauty" )
[[ ${{ matrix.build_static }} == "true" ]] && \
ADD_BUILD_ARGS+=( --disable-shared )
bash coinbrew/coinbrew fetch ${{ github.event.repository.name }} --skip-update \
Expand All @@ -69,7 +66,7 @@ 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
Expand All @@ -82,15 +79,11 @@ jobs:
[[ ${{ 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: Remove slash from head ref
run: |
filtered_head_ref=$(echo ${{ github.head_ref }} | awk -F'/' '{print $NF}')
echo "filtered_head_ref=${filtered_head_ref}" >> $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 }}-${{ env.filtered_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
19 changes: 6 additions & 13 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,16 @@ 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" },
]
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
Expand Down Expand Up @@ -63,15 +61,15 @@ jobs:
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 )
[[ ${{ 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@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ matrix.os}}-{{ matrix.arch }}-debug=${{ matrix.debug }}-failedbuild
Expand All @@ -87,16 +85,11 @@ jobs:
echo "package_suffix=${{ matrix.arch }}-w64-${{ matrix.msystem }}${{ matrix.suffix }}" >> $GITHUB_ENV
shell: msys2 {0}
if: ${{ matrix.arch != 'msvc' }}
- name: Remove slash from head ref
run: |
filtered_head_ref=$(echo ${{ github.head_ref }} | awk -F'/' '{print $NF}')
echo "filtered_head_ref=${filtered_head_ref}" >> $GITHUB_ENV
shell: msys2 {0}
- 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 }}-${{ env.filtered_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

0 comments on commit 4ed66c0

Please sign in to comment.