Skip to content

Commit

Permalink
Update linux-ci and windows-ci for outdated actions and build issues
Browse files Browse the repository at this point in the history
For linux-ci, update actions and macos-13 linker error.
See coin-or/COIN-OR-OptimizationSuite#26
For windows-ci, update actions and remove 32-bit builds via mingw32.
See coin-or/COIN-OR-OptimizationSuite#25
  • Loading branch information
jhmgoossens committed Mar 29, 2024
1 parent a81699d commit e4e9e36
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 23 deletions.
22 changes: 9 additions & 13 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 @@ -69,7 +65,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 @@ -84,9 +80,9 @@ jobs:
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
59 changes: 49 additions & 10 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,31 @@ 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" },
#NOT USED{ 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
uses: ilammy/msvc-dev-cmd@v1
if: ${{ matrix.arch == 'msvc' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Set up for msvs
if: ${{ matrix.arch == 'msvs' }}
uses: microsoft/setup-msbuild@v2
- name: Set correct host flag and install requirements
if: ${{ matrix.arch != 'msvc' && matrix.arch != 'msvs' }}
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:
Expand All @@ -55,7 +57,44 @@ jobs:
zip
path-type: inherit
msystem: ${{ matrix.msystem }}
- name: Build project
- 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\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: Build project using coinbrew
if: ${{ matrix.arch != 'msvs' }}
run: |
ADD_ARGS=()
ADD_ARGS+=( --skip='ThirdParty/Metis ThirdParty/Mumps ThirdParty/Blas ThirdParty/Lapack' )
Expand All @@ -71,7 +110,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 @@ -89,9 +128,9 @@ jobs:
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ config.log
config.status
libtool
dist

# Ignore VS files
*.suo
*.db
*.bak
*.user
**/.vs/

0 comments on commit e4e9e36

Please sign in to comment.