From 966bf4257e71d5759fe4511f21b43c01a0e604b5 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 09:50:33 +0200 Subject: [PATCH 01/20] Update CMakeLists.txt fortrantest linker language --- check/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index 0367e593be..96474eef14 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -3,6 +3,7 @@ include(CTest) if (FORTRAN) set(CMAKE_Fortran_MODULE_DIRECTORY ${HIGHS_BINARY_DIR}/modules) add_executable(fortrantest TestFortranAPI.f90) + set_property(TARGET fortrantest PROPERTY LINKER_LANGUAGE Fortran) if (NOT FAST_BUILD) target_link_libraries(fortrantest libhighs FortranHighs) else() @@ -321,4 +322,4 @@ if (NOT FAST_BUILD OR ALL_TESTS) endforeach(setting) endforeach() -endif() \ No newline at end of file +endif() From 3e8f80a074456dff96cca45013ff2a01b00a69ea Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 10:49:54 +0200 Subject: [PATCH 02/20] Update CMakeLists.txt --- check/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index 96474eef14..2ee995d1f5 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -3,6 +3,7 @@ include(CTest) if (FORTRAN) set(CMAKE_Fortran_MODULE_DIRECTORY ${HIGHS_BINARY_DIR}/modules) add_executable(fortrantest TestFortranAPI.f90) + set(CMAKE_Fortran_LINK_EXECUTABLE " -o ") set_property(TARGET fortrantest PROPERTY LINKER_LANGUAGE Fortran) if (NOT FAST_BUILD) target_link_libraries(fortrantest libhighs FortranHighs) From 86332df6b23c3eefe0bc264c19053c0c907ed5b3 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 10:59:40 +0200 Subject: [PATCH 03/20] Back --- check/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index 2ee995d1f5..dc01a76d93 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -3,8 +3,8 @@ include(CTest) if (FORTRAN) set(CMAKE_Fortran_MODULE_DIRECTORY ${HIGHS_BINARY_DIR}/modules) add_executable(fortrantest TestFortranAPI.f90) - set(CMAKE_Fortran_LINK_EXECUTABLE " -o ") - set_property(TARGET fortrantest PROPERTY LINKER_LANGUAGE Fortran) + # set(CMAKE_Fortran_LINK_EXECUTABLE " -o ") + # set_property(TARGET fortrantest PROPERTY LINKER_LANGUAGE Fortran) if (NOT FAST_BUILD) target_link_libraries(fortrantest libhighs FortranHighs) else() From 627dcca35f59705d908f4871844ae61444f699a9 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:06:59 +0200 Subject: [PATCH 04/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 074e8ac4d5..6e444e5fb5 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -21,7 +21,9 @@ jobs: - name: Configure CMake shell: bash working-directory: ${{runner.workspace}}/build - run: cmake $GITHUB_WORKSPACE -DFORTRAN=ON + run: | + cmake --version + cmake $GITHUB_WORKSPACE -DFORTRAN=ON - name: Build shell: bash From f6fe663af64e19738ae21bd468bf4ec64ab22448 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:11:14 +0200 Subject: [PATCH 05/20] Versions --- .github/workflows/test-fortran-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 6e444e5fb5..75854faf3f 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -23,6 +23,7 @@ jobs: working-directory: ${{runner.workspace}}/build run: | cmake --version + gfortran --version cmake $GITHUB_WORKSPACE -DFORTRAN=ON - name: Build From 9faed4f4cdab627e231622968f181f58c2d52468 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:12:51 +0200 Subject: [PATCH 06/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 75854faf3f..263e24414f 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -23,7 +23,7 @@ jobs: working-directory: ${{runner.workspace}}/build run: | cmake --version - gfortran --version + gfortran-11 --version cmake $GITHUB_WORKSPACE -DFORTRAN=ON - name: Build From ac81b2e4813972e574dd6a192a1fb26dcecc97ca Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:15:31 +0200 Subject: [PATCH 07/20] Symlink --- .github/workflows/test-fortran-macos.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 263e24414f..80759275fb 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -17,7 +17,17 @@ jobs: - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build - + + - name: Symlink gfortran (macOS) + run: | + # make sure gfortran is available + # https://github.com/actions/virtual-environments/issues/2524 + # https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml + sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran + sudo mkdir /usr/local/gfortran + sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib + gfortran --version + - name: Configure CMake shell: bash working-directory: ${{runner.workspace}}/build From 8dc135b92eb5401bf3fe24b4106869929654e305 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:23:34 +0200 Subject: [PATCH 08/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 80759275fb..834b2ee809 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -12,8 +12,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install GFortran - run: brew install gfortran + # - name: Install GFortran + # run: brew install gfortran - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build @@ -23,6 +23,9 @@ jobs: # make sure gfortran is available # https://github.com/actions/virtual-environments/issues/2524 # https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml + gfortran-11 + gcc-11 + gcc sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran sudo mkdir /usr/local/gfortran sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib From 53efec843f9695dd46b924281e522e76512c225a Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:25:33 +0200 Subject: [PATCH 09/20] Versions --- .github/workflows/test-fortran-macos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 834b2ee809..8e7c1306f6 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -23,9 +23,9 @@ jobs: # make sure gfortran is available # https://github.com/actions/virtual-environments/issues/2524 # https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml - gfortran-11 - gcc-11 - gcc + gfortran-11 --version + gcc-11 --version + gcc --version sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran sudo mkdir /usr/local/gfortran sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib From dc24884975b8901233fed024488ecee095f927f6 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:31:47 +0200 Subject: [PATCH 10/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 8e7c1306f6..4da4f74e28 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -12,8 +12,8 @@ jobs: steps: - uses: actions/checkout@v4 - # - name: Install GFortran - # run: brew install gfortran + - name: Install GFortran + run: brew install gfortran gcc - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build From fdabd3dc6eb7a64aeaf9adf04df6bf355e353679 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:33:10 +0200 Subject: [PATCH 11/20] Es --- .github/workflows/test-fortran-macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 4da4f74e28..cf4620bbd1 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -26,6 +26,7 @@ jobs: gfortran-11 --version gcc-11 --version gcc --version + ls /usr/local/Cellar/gcc@11/*/lib/gcc/11 sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran sudo mkdir /usr/local/gfortran sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib From a32db34072bab0ea51a0021b4e980e70cff21eea Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:38:27 +0200 Subject: [PATCH 12/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index cf4620bbd1..b8b6c92969 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -24,7 +24,8 @@ jobs: # https://github.com/actions/virtual-environments/issues/2524 # https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml gfortran-11 --version - gcc-11 --version + gcc-11 --version + whereis gcc-11 gcc --version ls /usr/local/Cellar/gcc@11/*/lib/gcc/11 sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran From 8afad16d116e948d100652a9fe84e43c90b0f4cf Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:51:44 +0200 Subject: [PATCH 13/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 35 ++++++++++-------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index b8b6c92969..cca56c2177 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -4,34 +4,29 @@ on: [push, pull_request] jobs: fast_build_release: - runs-on: ${{ matrix.os }} + runs-on: macos-12 strategy: - matrix: - os: [macos-latest] + toolchain: + - {compiler: gcc, version: 13} steps: - uses: actions/checkout@v4 - - name: Install GFortran - run: brew install gfortran gcc + - uses: fortran-lang/setup-fortran@v1 + id: setup-fortran + with: + compiler: gcc + version: 13 + + - run: | + ${{ env.FC }} ... # environment vars FC, CC, and CXX are set + ${{ steps.setup-fortran.outputs.fc }} ... # outputs work too + + # - name: Install GFortran + # run: brew install gfortran gcc - name: Create Build Environment run: cmake -E make_directory ${{runner.workspace}}/build - - - name: Symlink gfortran (macOS) - run: | - # make sure gfortran is available - # https://github.com/actions/virtual-environments/issues/2524 - # https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml - gfortran-11 --version - gcc-11 --version - whereis gcc-11 - gcc --version - ls /usr/local/Cellar/gcc@11/*/lib/gcc/11 - sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran - sudo mkdir /usr/local/gfortran - sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib - gfortran --version - name: Configure CMake shell: bash From a2e870456a18ede66c8a7a60c2c9f566d95d47d8 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:53:15 +0200 Subject: [PATCH 14/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index cca56c2177..9e4a97ba2b 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -5,9 +5,7 @@ on: [push, pull_request] jobs: fast_build_release: runs-on: macos-12 - strategy: - toolchain: - - {compiler: gcc, version: 13} + steps: - uses: actions/checkout@v4 From fc06a3d4105785f40ba80273ebb3af751b8493b2 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:54:25 +0200 Subject: [PATCH 15/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 9e4a97ba2b..da260cc612 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -16,10 +16,6 @@ jobs: compiler: gcc version: 13 - - run: | - ${{ env.FC }} ... # environment vars FC, CC, and CXX are set - ${{ steps.setup-fortran.outputs.fc }} ... # outputs work too - # - name: Install GFortran # run: brew install gfortran gcc From 4c69faff2901c61cab3083d904ba8e86f4696e7e Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:58:10 +0200 Subject: [PATCH 16/20] Update CMakeLists.txt --- check/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/check/CMakeLists.txt b/check/CMakeLists.txt index dc01a76d93..366a4c5924 100644 --- a/check/CMakeLists.txt +++ b/check/CMakeLists.txt @@ -3,8 +3,6 @@ include(CTest) if (FORTRAN) set(CMAKE_Fortran_MODULE_DIRECTORY ${HIGHS_BINARY_DIR}/modules) add_executable(fortrantest TestFortranAPI.f90) - # set(CMAKE_Fortran_LINK_EXECUTABLE " -o ") - # set_property(TARGET fortrantest PROPERTY LINKER_LANGUAGE Fortran) if (NOT FAST_BUILD) target_link_libraries(fortrantest libhighs FortranHighs) else() From 9471b4b2668239eb663c40e9bc207b89de8626f9 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 11:58:39 +0200 Subject: [PATCH 17/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index da260cc612..7dc74351b6 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -10,11 +10,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: fortran-lang/setup-fortran@v1 + - uses: fortran-lang/setup-fortran@latest id: setup-fortran with: compiler: gcc - version: 13 + version: 11 # - name: Install GFortran # run: brew install gfortran gcc From f491ae63c89b02706b7bc4d3f3d6b1078d4e3083 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 12:34:47 +0200 Subject: [PATCH 18/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 7dc74351b6..7fb3f872ed 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: fortran-lang/setup-fortran@latest + - uses: fortran-lang/setup-fortran@1.6 id: setup-fortran with: compiler: gcc From cfbb54aec78fe6eadcbcf88e33dacfb5dbc320c8 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 12:35:59 +0200 Subject: [PATCH 19/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 7fb3f872ed..001cce2c60 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: fortran-lang/setup-fortran@1.6 + - uses: fortran-lang/setup-fortran@1 id: setup-fortran with: compiler: gcc From 7ca826e0a9253307a685e2449ceffb4f8ed9fd02 Mon Sep 17 00:00:00 2001 From: galabovaa Date: Mon, 1 Jul 2024 12:36:36 +0200 Subject: [PATCH 20/20] Update test-fortran-macos.yml --- .github/workflows/test-fortran-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-fortran-macos.yml b/.github/workflows/test-fortran-macos.yml index 001cce2c60..e90da71869 100644 --- a/.github/workflows/test-fortran-macos.yml +++ b/.github/workflows/test-fortran-macos.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: fortran-lang/setup-fortran@1 + - uses: fortran-lang/setup-fortran@v1.6 id: setup-fortran with: compiler: gcc