Skip to content

Commit

Permalink
Merge pull request #1802 from ERGO-Code/macos-fortran
Browse files Browse the repository at this point in the history
Macos fortran build fix
  • Loading branch information
galabovaa committed Jun 12, 2024
2 parents b1b3306 + 0a0692c commit 6b6d741
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test-fortran-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test-fortran-macos

on: [push, pull_request]

jobs:
fast_build_release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]

steps:
- uses: actions/checkout@v4

- name: Install GFortran
run: brew install gfortran

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DFORTRAN=ON

- name: Build
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake --build . --parallel

- name: Test
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
ls
./bin/fortrantest
2 changes: 1 addition & 1 deletion .github/workflows/test-fortran-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-fortran
name: test-fortran-ubuntu

on: [push, pull_request]

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ if (BUILD_CXX)
"but it is not supported by the compiler. The check failed with this output:\n"
"${check_ipo_support_output}")
endif()
elseif(NOT ipo_supported)
elseif(NOT ipo_supported OR (APPLE AND FORTRAN))
message(STATUS "IPO / LTO: disabled because it is not supported")
elseif(NOT BUILD_SHARED_LIBS)
# For a static library, we can't be sure whether the final linking will
Expand Down
2 changes: 1 addition & 1 deletion cmake/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
| OS | C++ | Fortran | Python | CSharp Example | .NET |
|:-------- | :---: | :------: | :----: | :----: | :----: |
| Linux | [![Status][linux_cpp_svg]][linux_cpp_link] | [![Status][linux_fortran_svg]][linux_fortran_link] | [![Status][linux_python_svg]][linux_python_link] | *(1)* | [![Status][linux_dotnet_svg]][linux_dotnet_link] |
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | *(2)* | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
| MacOS | [![Status][macos_cpp_svg]][macos_cpp_link] | [![Status][macos_fortran_svg]][macos_fortran_link] | [![Status][macos_python_svg]][macos_python_link] | *(1)* |[![Status][macos_dotnet_svg]][macos_dotnet_link] |
| Windows | [![Status][windows_cpp_svg]][windows_cpp_link] | *(2)* | [![Status][windows_python_svg]][windows_python_link] | [![Status][windows_csharp_svg]][windows_csharp_link] | [![Status][windows_dotnet_svg]][windows_dotnet_link] |

[linux_cpp_svg]: https://github.com/ERGO-Code/HiGHS/actions/workflows/cmake-linux-cpp.yml/badge.svg
Expand Down

0 comments on commit 6b6d741

Please sign in to comment.