Skip to content

Commit

Permalink
ci: Use GLPK on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Nov 30, 2024
1 parent ef0b179 commit 7e28378
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/custom/before-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ runs:
echo '_R_CHECK_PKG_SIZES_=FALSE' | tee -a $GITHUB_ENV
shell: bash

- name: Install GLPK on macOS
- name: Install and use GLPK on macOS
if: runner.os == 'macOS'
run: |
brew install glpk
echo -e 'CPPFLAGS = -I/opt/homebrew/include\nLDFLAGS = -L/opt/homebrew/lib' | tee ~/.R/Makevars
shell: bash
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fi

OBJECTS='${SOURCES} ${MINIGMPSOURCES}'

if echo '#include <glpk.h>' | `"${R_HOME}/bin/R" CMD config CC` -E $CPPFLAGS - > /dev/null 2>&1; then
if echo '#include <glpk.h>' | `"${R_HOME}/bin/R" CMD config CC` -E `"${R_HOME}/bin/R" CMD config CPPFLAGS` - > /dev/null 2>&1; then
echo "Using installed GLPK"
PKG_LIBS="$PKG_LIBS -lglpk"
else
Expand Down

0 comments on commit 7e28378

Please sign in to comment.