From f9e33e1f8a33623c38c8d983c0782ca3222d1772 Mon Sep 17 00:00:00 2001 From: nbelakovski Date: Tue, 19 Dec 2023 23:43:18 -0800 Subject: [PATCH 1/5] Fix issue with installation of gfortran 11 On my own repo I had issues running programs compiled with gfortran 11 in CI. It turned out they were being compiled with gfortran 11, but were picking up libgfortran-5.dll from /c/mingw64/bin, which is from gcc 12, at runtime, and would crash. I've modified hw.90 to reproduce the problem as minimally as I can, although perhaps someone else can make it more minimal. I've temporarily added an intentionally failing action to demonstrate the issue, obviously we would remove that ahead of merging. I also added gcc 12 to the test matrix. It claims to be supported so it seems only logical to test it in addition to 11 and 13. --- .github/actions/test-fc/action.yml | 16 ++++++++++++++++ .github/workflows/test.yml | 2 ++ hw.f90 | 25 ++++++++++++++++++++++--- setup-fortran.sh | 1 + 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.github/actions/test-fc/action.yml b/.github/actions/test-fc/action.yml index 33df26df..38788896 100644 --- a/.github/actions/test-fc/action.yml +++ b/.github/actions/test-fc/action.yml @@ -42,7 +42,23 @@ runs: args="-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" fi fi + + ${{ env.FC }} $args -o hw hw.f90 + output=$(./hw '2>&1') + [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program output: $output"; exit 1) + rm hw + + - name: Test compile (bash) (intentionally failing) + if: ${{ runner.os == 'Windows' && inputs.compiler == 'gcc' && inputs.version == '11' }} + shell: bash + run: | + set -x + # Move the old libgfortran-5.dll back to its original place. + mv "$RUNNER_TEMP/mingw64/libgfortran-5.dll" /c/mingw64/bin/libgfortran-5.dll + # Confirm that we find the gcc12 one ahead of the gcc11 one. + which -a libgfortran-5.dll + ${{ env.FC }} $args -o hw hw.f90 output=$(./hw '2>&1') [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program output: $output"; exit 1) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b778fae5..e16f1ace 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,6 +30,8 @@ jobs: - windows-2022 - windows-2019 toolchain: + - {compiler: gcc, version: 11} + - {compiler: gcc, version: 12} - {compiler: gcc, version: 13} - {compiler: intel, version: '2023.2'} - {compiler: intel-classic, version: '2021.10'} diff --git a/hw.f90 b/hw.f90 index a285bd44..935ba7d9 100644 --- a/hw.f90 +++ b/hw.f90 @@ -1,3 +1,22 @@ -program hello - print *, "hello world" -end program hello \ No newline at end of file +program bobyqa_exmp +implicit none + +logical :: parent_logical_array(20) +integer(4), allocatable :: locations(:) + +locations = true_locations(parent_logical_array) +print *, "hello world" + +contains + +function true_locations(logical_array) result(location_array) +implicit none +logical, intent(in) :: logical_array(:) +integer(4), allocatable :: location_array(:) +integer(4) :: n, monotone_array(size(logical_array)) +n = count(logical_array) +allocate(location_array(1:n)) +location_array = pack(monotone_array, mask=logical_array) + +end function true_locations +end program bobyqa_exmp diff --git a/setup-fortran.sh b/setup-fortran.sh index ab899a9e..b9411c26 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -100,6 +100,7 @@ install_gcc_choco() # otherwise hide preinstalled mingw compilers mkdir "$RUNNER_TEMP/mingw64" mv /c/mingw64/bin/gfortran "$RUNNER_TEMP/mingw64/gfortran" + mv /c/mingw64/bin/libgfortran-5.dll "$RUNNER_TEMP/mingw64/libgfortran-5.dll" mv /c/mingw64/bin/gcc "$RUNNER_TEMP/mingw64/gcc" mv /c/mingw64/bin/g++ "$RUNNER_TEMP/mingw64/g++" # ...and install selected version From 57973e5c3598d2e6c1f392866975a3b7fdb73895 Mon Sep 17 00:00:00 2001 From: Nickolai Belakovski Date: Fri, 29 Dec 2023 17:52:01 -0800 Subject: [PATCH 2/5] Move entire mingw64 folder mv the whole mingw64 folder instead of moving things piecemeal. An investigation of how the windows image installs mingw64 (https://github.com/actions/runner-images/blob/main/images/windows/scripts/build/Install-Mingw64.ps1) shows that it just extracts the whole thing to /c/mingw64, so it should be safe and complete to mv the whole folder. --- .github/actions/test-fc/action.yml | 3 ++- setup-fortran.sh | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/actions/test-fc/action.yml b/.github/actions/test-fc/action.yml index 38788896..f1a98e87 100644 --- a/.github/actions/test-fc/action.yml +++ b/.github/actions/test-fc/action.yml @@ -55,7 +55,8 @@ runs: set -x # Move the old libgfortran-5.dll back to its original place. - mv "$RUNNER_TEMP/mingw64/libgfortran-5.dll" /c/mingw64/bin/libgfortran-5.dll + mkdir -p /c/mingw64/bin/ + [ -f "$RUNNER_TEMP/mingw64/bin/libgfortran-5.dll" ] && mv "$RUNNER_TEMP/mingw64/bin/libgfortran-5.dll" /c/mingw64/bin/libgfortran-5.dll # Confirm that we find the gcc12 one ahead of the gcc11 one. which -a libgfortran-5.dll diff --git a/setup-fortran.sh b/setup-fortran.sh index b9411c26..6a6a5ff6 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -98,11 +98,7 @@ install_gcc_choco() echo "GCC $version already installed" else # otherwise hide preinstalled mingw compilers - mkdir "$RUNNER_TEMP/mingw64" - mv /c/mingw64/bin/gfortran "$RUNNER_TEMP/mingw64/gfortran" - mv /c/mingw64/bin/libgfortran-5.dll "$RUNNER_TEMP/mingw64/libgfortran-5.dll" - mv /c/mingw64/bin/gcc "$RUNNER_TEMP/mingw64/gcc" - mv /c/mingw64/bin/g++ "$RUNNER_TEMP/mingw64/g++" + mv /c/mingw64 "$RUNNER_TEMP/" # ...and install selected version case $version in 13) From 63fa3dd0268e62b01707da9aa435e2ae05cc7cb8 Mon Sep 17 00:00:00 2001 From: w-bonelli Date: Sun, 14 Jan 2024 17:46:11 -0500 Subject: [PATCH 3/5] prep to merge - remove reproduction test case - comprehensive test on all trigger events - move scripts and test programs to subdirs - move bobyqa test program to separate file - fix testing schedule: weekly not monthly --- .github/actions/test-cc/action.yml | 1 + .github/actions/test-cxx/action.yml | 1 + .github/actions/test-fc/action.yml | 25 ++--- .github/workflows/test.yml | 91 ++----------------- .../update_compat_table.py | 0 .../wide_compat_reports.py | 0 hw.f90 => test/bobyqa.f90 | 0 hw.c => test/hw.c | 0 hw.cpp => test/hw.cpp | 0 test/hw.f90 | 3 + 10 files changed, 21 insertions(+), 100 deletions(-) rename update_compat_table.py => scripts/update_compat_table.py (100%) rename wide_compat_reports.py => scripts/wide_compat_reports.py (100%) rename hw.f90 => test/bobyqa.f90 (100%) rename hw.c => test/hw.c (100%) rename hw.cpp => test/hw.cpp (100%) create mode 100644 test/hw.f90 diff --git a/.github/actions/test-cc/action.yml b/.github/actions/test-cc/action.yml index 0c58f142..bb930ed0 100644 --- a/.github/actions/test-cc/action.yml +++ b/.github/actions/test-cc/action.yml @@ -30,6 +30,7 @@ runs: [[ "$ccv" == ${{ inputs.version }}* ]] && (echo "found ${{ env.CC }} version: $ccv") || (echo "unexpected ${{ env.CC }} version: $ccv"; exit 1) - name: Test compile (bash) + working-directory: test shell: bash run: | ${{ env.CC }} -o hw hw.c diff --git a/.github/actions/test-cxx/action.yml b/.github/actions/test-cxx/action.yml index 76f20f1c..f7b3ae71 100644 --- a/.github/actions/test-cxx/action.yml +++ b/.github/actions/test-cxx/action.yml @@ -30,6 +30,7 @@ runs: [[ "$cxxv" == ${{ matrix.toolchain.version }}* ]] && (echo "found ${{ env.CXX }} version: $cxxv") || (echo "unexpected ${{ env.CXX }} version: $cxxv"; exit 1) - name: Test compile (bash) + working-directory: test shell: bash run: | ${{ env.CXX }} -o hw hw.cpp diff --git a/.github/actions/test-fc/action.yml b/.github/actions/test-fc/action.yml index f1a98e87..c1400b3d 100644 --- a/.github/actions/test-fc/action.yml +++ b/.github/actions/test-fc/action.yml @@ -30,6 +30,7 @@ runs: [[ "$fcv" == ${{ inputs.version }}* ]] && (echo "found ${{ env.FC }} version: $fcv") || (echo "unexpected ${{ env.FC }} version: $fcv"; exit 1) - name: Test compile (bash) + working-directory: test shell: bash run: | # macos-13/gfortran 7-9 compatibility workaround @@ -43,29 +44,19 @@ runs: fi fi + # hello world program ${{ env.FC }} $args -o hw hw.f90 output=$(./hw '2>&1') [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program output: $output"; exit 1) rm hw - - name: Test compile (bash) (intentionally failing) - if: ${{ runner.os == 'Windows' && inputs.compiler == 'gcc' && inputs.version == '11' }} - shell: bash - run: | - set -x - - # Move the old libgfortran-5.dll back to its original place. - mkdir -p /c/mingw64/bin/ - [ -f "$RUNNER_TEMP/mingw64/bin/libgfortran-5.dll" ] && mv "$RUNNER_TEMP/mingw64/bin/libgfortran-5.dll" /c/mingw64/bin/libgfortran-5.dll - # Confirm that we find the gcc12 one ahead of the gcc11 one. - which -a libgfortran-5.dll - - ${{ env.FC }} $args -o hw hw.f90 - output=$(./hw '2>&1') - [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program output: $output"; exit 1) - rm hw + # program reproducing https://github.com/fortran-lang/setup-fortran/pull/51 + # expect crash at runtime so don't run, just compile. see link for details + ${{ env.FC }} $args -o bobyqa bobyqa.f90 + rm bobyqa - name: Test compile Fortran (pwsh) + working-directory: test if: ${{ (success() || failure()) && runner.os == 'Windows' }} shell: pwsh run: | @@ -80,6 +71,7 @@ runs: rm hw.exe - name: Test compile Fortran (powershell) + working-directory: test if: ${{ (success() || failure()) && runner.os == 'Windows' }} shell: powershell run: | @@ -94,6 +86,7 @@ runs: rm hw.exe - name: Test compile Fortran (cmd) + working-directory: test if: ${{ (success() || failure()) && runner.os == 'Windows' }} shell: cmd run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e16f1ace..e6c44019 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,90 +11,11 @@ on: paths-ignore: - '**.md' schedule: - - cron: '0 0 1 * *' + - cron: '0 0 * * 0' jobs: - test_latest: - name: Test latest versions - if: github.event_name != 'schedule' - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: - - ubuntu-22.04 - - ubuntu-20.04 - - macos-13 - - macos-12 - - macos-11 - - windows-2022 - - windows-2019 - toolchain: - - {compiler: gcc, version: 11} - - {compiler: gcc, version: 12} - - {compiler: gcc, version: 13} - - {compiler: intel, version: '2023.2'} - - {compiler: intel-classic, version: '2021.10'} - - {compiler: nvidia-hpc, version: '23.11'} - exclude: - # ifx not available for mac - - os: macos-13 - toolchain: {compiler: intel} - - os: macos-12 - toolchain: {compiler: intel} - - os: macos-11 - toolchain: {compiler: intel} - # nvidia-hpc not available for mac - - os: macos-13 - toolchain: {compiler: nvidia-hpc} - - os: macos-12 - toolchain: {compiler: nvidia-hpc} - - os: macos-11 - toolchain: {compiler: nvidia-hpc} - # nvidia-hpc not available for windows - - os: windows-2022 - toolchain: {compiler: nvidia-hpc} - - os: windows-2019 - toolchain: {compiler: nvidia-hpc} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Fortran - id: setup-fortran - continue-on-error: true - uses: ./ - with: - compiler: ${{ matrix.toolchain.compiler }} - version: ${{ matrix.toolchain.version }} - - - name: Test Fortran compiler - if: steps.setup-fortran.outcome == 'success' - uses: ./.github/actions/test-fc - with: - compiler: ${{ matrix.toolchain.compiler }} - version: ${{ matrix.toolchain.version }} - - - name: Test C compiler - continue-on-error: true - if: steps.setup-fortran.outcome == 'success' - uses: ./.github/actions/test-cc - with: - compiler: ${{ matrix.toolchain.compiler }} - version: ${{ matrix.toolchain.version }} - - - name: Test C++ compiler - continue-on-error: true - if: steps.setup-fortran.outcome == 'success' - uses: ./.github/actions/test-cxx - with: - compiler: ${{ matrix.toolchain.compiler }} - version: ${{ matrix.toolchain.version }} - - test_full: - name: Full compatibility test - if: github.event_name == 'schedule' + test: + name: Test runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -235,8 +156,8 @@ jobs: compat: name: Report compatibility - if: github.event_name == 'schedule' - needs: test_full + if: github.event_name != 'pull_request' + needs: test runs-on: ubuntu-latest permissions: contents: write @@ -266,6 +187,7 @@ jobs: cat compat/*.csv >> long_compat.csv - name: Make wide CSV and MD table + working-directory: scripts run: python wide_compat_reports.py "long_compat.csv" "compat.csv" - name: Upload artifacts @@ -295,6 +217,7 @@ jobs: fi - name: Update README + working-directory: scripts if: ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }} run: python update_compat_table.py "compat.md" "README.md" diff --git a/update_compat_table.py b/scripts/update_compat_table.py similarity index 100% rename from update_compat_table.py rename to scripts/update_compat_table.py diff --git a/wide_compat_reports.py b/scripts/wide_compat_reports.py similarity index 100% rename from wide_compat_reports.py rename to scripts/wide_compat_reports.py diff --git a/hw.f90 b/test/bobyqa.f90 similarity index 100% rename from hw.f90 rename to test/bobyqa.f90 diff --git a/hw.c b/test/hw.c similarity index 100% rename from hw.c rename to test/hw.c diff --git a/hw.cpp b/test/hw.cpp similarity index 100% rename from hw.cpp rename to test/hw.cpp diff --git a/test/hw.f90 b/test/hw.f90 new file mode 100644 index 00000000..a285bd44 --- /dev/null +++ b/test/hw.f90 @@ -0,0 +1,3 @@ +program hello + print *, "hello world" +end program hello \ No newline at end of file From 542b3df34283bdd83814b4ea53d1e481abbc39b5 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 18 Jan 2024 23:53:42 -0500 Subject: [PATCH 4/5] dynamic job matrix, assert/report mode based on trigger, version long_compat.csv, reorganize in .github/compat/, update compatibility files and readme to reflect nvidia support --- .github/actions/test-fc/action.yml | 6 +- .github/compat/compat.csv | 10 + .github/compat/long_compat.csv | 209 ++++++++++++++++++ .github/compat/matrix.yml | 83 +++++++ .github/compat/matrix_json_from_csv.py | 24 ++ .../compat}/update_compat_table.py | 2 +- .../compat}/wide_compat_reports.py | 2 +- .github/workflows/test.yml | 174 ++++++--------- .gitignore | 4 + README.md | 18 +- compat.csv | 10 - requirements.txt | 2 + 12 files changed, 415 insertions(+), 129 deletions(-) create mode 100644 .github/compat/compat.csv create mode 100644 .github/compat/long_compat.csv create mode 100644 .github/compat/matrix.yml create mode 100644 .github/compat/matrix_json_from_csv.py rename {scripts => .github/compat}/update_compat_table.py (87%) rename {scripts => .github/compat}/wide_compat_reports.py (97%) create mode 100644 .gitignore delete mode 100644 compat.csv create mode 100644 requirements.txt diff --git a/.github/actions/test-fc/action.yml b/.github/actions/test-fc/action.yml index c1400b3d..2a728575 100644 --- a/.github/actions/test-fc/action.yml +++ b/.github/actions/test-fc/action.yml @@ -47,12 +47,12 @@ runs: # hello world program ${{ env.FC }} $args -o hw hw.f90 output=$(./hw '2>&1') - [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program output: $output"; exit 1) + [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program 'hw' output: $output"; exit 1) rm hw - # program reproducing https://github.com/fortran-lang/setup-fortran/pull/51 - # expect crash at runtime so don't run, just compile. see link for details ${{ env.FC }} $args -o bobyqa bobyqa.f90 + output=$(./bobyqa '2>&1') + [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program 'bobyqa' output: $output"; exit 1) rm bobyqa - name: Test compile Fortran (pwsh) diff --git a/.github/compat/compat.csv b/.github/compat/compat.csv new file mode 100644 index 00000000..a04edb67 --- /dev/null +++ b/.github/compat/compat.csv @@ -0,0 +1,10 @@ +compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc,nvidia-hpc +version,10,11,12,13,7,8,9,2021.1,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7.1,2021.7,2021.8,2021.9,2021.1.2,2021.1.2,2021.1,2021.2,2021.4,2022.0,2022.1,2022.2.1,2022.2,2023.0,2023.1,2023.2,20.11,21.11,22.1,22.11,23.11,23.3,23.5,23.7,23.9 +runner,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +macos-11,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +macos-12,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +macos-13,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +ubuntu-20.04,✓,✓,,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ +ubuntu-22.04,✓,✓,✓,✓,,,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ +windows-2019,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,,,,,,,,, +windows-2022,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,,,,,,,,, diff --git a/.github/compat/long_compat.csv b/.github/compat/long_compat.csv new file mode 100644 index 00000000..93113538 --- /dev/null +++ b/.github/compat/long_compat.csv @@ -0,0 +1,209 @@ +runner,compiler,version,support +macos-11,gcc,10,✓ +macos-11,gcc,11,✓ +macos-11,gcc,12,✓ +macos-11,gcc,13,✓ +macos-11,gcc,6, +macos-11,gcc,7,✓ +macos-11,gcc,8,✓ +macos-11,gcc,9,✓ +macos-11,intel-classic,2021.1.2, +macos-11,intel-classic,2021.1,✓ +macos-11,intel-classic,2021.10,✓ +macos-11,intel-classic,2021.2,✓ +macos-11,intel-classic,2021.3,✓ +macos-11,intel-classic,2021.4,✓ +macos-11,intel-classic,2021.5,✓ +macos-11,intel-classic,2021.6,✓ +macos-11,intel-classic,2021.7.1,✓ +macos-11,intel-classic,2021.7,✓ +macos-11,intel-classic,2021.8,✓ +macos-11,intel-classic,2021.9,✓ +macos-12,gcc,10,✓ +macos-12,gcc,11,✓ +macos-12,gcc,12,✓ +macos-12,gcc,13,✓ +macos-12,gcc,6, +macos-12,gcc,7,✓ +macos-12,gcc,8,✓ +macos-12,gcc,9,✓ +macos-12,intel-classic,2021.1.2, +macos-12,intel-classic,2021.1,✓ +macos-12,intel-classic,2021.10,✓ +macos-12,intel-classic,2021.2,✓ +macos-12,intel-classic,2021.3,✓ +macos-12,intel-classic,2021.4,✓ +macos-12,intel-classic,2021.5,✓ +macos-12,intel-classic,2021.6,✓ +macos-12,intel-classic,2021.7.1,✓ +macos-12,intel-classic,2021.7,✓ +macos-12,intel-classic,2021.8,✓ +macos-12,intel-classic,2021.9,✓ +macos-13,gcc,10,✓ +macos-13,gcc,11,✓ +macos-13,gcc,12,✓ +macos-13,gcc,13,✓ +macos-13,gcc,6, +macos-13,gcc,7,✓ +macos-13,gcc,8,✓ +macos-13,gcc,9,✓ +macos-13,intel-classic,2021.1.2, +macos-13,intel-classic,2021.1,✓ +macos-13,intel-classic,2021.10,✓ +macos-13,intel-classic,2021.2,✓ +macos-13,intel-classic,2021.3,✓ +macos-13,intel-classic,2021.4,✓ +macos-13,intel-classic,2021.5,✓ +macos-13,intel-classic,2021.6,✓ +macos-13,intel-classic,2021.7.1,✓ +macos-13,intel-classic,2021.7,✓ +macos-13,intel-classic,2021.8,✓ +macos-13,intel-classic,2021.9,✓ +ubuntu-20.04,gcc,10,✓ +ubuntu-20.04,gcc,11,✓ +ubuntu-20.04,gcc,12, +ubuntu-20.04,gcc,13,✓ +ubuntu-20.04,gcc,6, +ubuntu-20.04,gcc,7,✓ +ubuntu-20.04,gcc,8,✓ +ubuntu-20.04,gcc,9,✓ +ubuntu-20.04,intel-classic,2021.1.2,✓ +ubuntu-20.04,intel-classic,2021.1,✓ +ubuntu-20.04,intel-classic,2021.10,✓ +ubuntu-20.04,intel-classic,2021.2,✓ +ubuntu-20.04,intel-classic,2021.3, +ubuntu-20.04,intel-classic,2021.4,✓ +ubuntu-20.04,intel-classic,2021.5,✓ +ubuntu-20.04,intel-classic,2021.6,✓ +ubuntu-20.04,intel-classic,2021.7.1,✓ +ubuntu-20.04,intel-classic,2021.7,✓ +ubuntu-20.04,intel-classic,2021.8,✓ +ubuntu-20.04,intel-classic,2021.9,✓ +ubuntu-20.04,intel,2021.1.2,✓ +ubuntu-20.04,intel,2021.1,✓ +ubuntu-20.04,intel,2021.2,✓ +ubuntu-20.04,intel,2021.4,✓ +ubuntu-20.04,intel,2022.0,✓ +ubuntu-20.04,intel,2022.1,✓ +ubuntu-20.04,intel,2022.2.1,✓ +ubuntu-20.04,intel,2022.2,✓ +ubuntu-20.04,intel,2023.0,✓ +ubuntu-20.04,intel,2023.1,✓ +ubuntu-20.04,intel,2023.2,✓ +ubuntu-20.04,nvidia-hpc,20.11,✓ +ubuntu-20.04,nvidia-hpc,20.7, +ubuntu-20.04,nvidia-hpc,20.9, +ubuntu-20.04,nvidia-hpc,21.1, +ubuntu-20.04,nvidia-hpc,21.11,✓ +ubuntu-20.04,nvidia-hpc,22.1,✓ +ubuntu-20.04,nvidia-hpc,22.11,✓ +ubuntu-20.04,nvidia-hpc,23.11,✓ +ubuntu-20.04,nvidia-hpc,23.3,✓ +ubuntu-20.04,nvidia-hpc,23.5,✓ +ubuntu-20.04,nvidia-hpc,23.7,✓ +ubuntu-20.04,nvidia-hpc,23.9,✓ +ubuntu-22.04,gcc,10,✓ +ubuntu-22.04,gcc,11,✓ +ubuntu-22.04,gcc,12,✓ +ubuntu-22.04,gcc,13,✓ +ubuntu-22.04,gcc,6, +ubuntu-22.04,gcc,7, +ubuntu-22.04,gcc,8, +ubuntu-22.04,gcc,9,✓ +ubuntu-22.04,intel-classic,2021.1.2,✓ +ubuntu-22.04,intel-classic,2021.1,✓ +ubuntu-22.04,intel-classic,2021.10,✓ +ubuntu-22.04,intel-classic,2021.2,✓ +ubuntu-22.04,intel-classic,2021.3, +ubuntu-22.04,intel-classic,2021.4,✓ +ubuntu-22.04,intel-classic,2021.5,✓ +ubuntu-22.04,intel-classic,2021.6,✓ +ubuntu-22.04,intel-classic,2021.7.1,✓ +ubuntu-22.04,intel-classic,2021.7,✓ +ubuntu-22.04,intel-classic,2021.8,✓ +ubuntu-22.04,intel-classic,2021.9,✓ +ubuntu-22.04,intel,2021.1.2,✓ +ubuntu-22.04,intel,2021.1,✓ +ubuntu-22.04,intel,2021.2,✓ +ubuntu-22.04,intel,2021.4,✓ +ubuntu-22.04,intel,2022.0,✓ +ubuntu-22.04,intel,2022.1,✓ +ubuntu-22.04,intel,2022.2.1,✓ +ubuntu-22.04,intel,2022.2,✓ +ubuntu-22.04,intel,2023.0,✓ +ubuntu-22.04,intel,2023.1,✓ +ubuntu-22.04,intel,2023.2,✓ +ubuntu-22.04,nvidia-hpc,20.11,✓ +ubuntu-22.04,nvidia-hpc,20.7, +ubuntu-22.04,nvidia-hpc,20.9, +ubuntu-22.04,nvidia-hpc,21.1, +ubuntu-22.04,nvidia-hpc,21.11,✓ +ubuntu-22.04,nvidia-hpc,22.1,✓ +ubuntu-22.04,nvidia-hpc,22.11,✓ +ubuntu-22.04,nvidia-hpc,23.11,✓ +ubuntu-22.04,nvidia-hpc,23.3,✓ +ubuntu-22.04,nvidia-hpc,23.5,✓ +ubuntu-22.04,nvidia-hpc,23.7,✓ +ubuntu-22.04,nvidia-hpc,23.9,✓ +windows-2019,gcc,10,✓ +windows-2019,gcc,11,✓ +windows-2019,gcc,12,✓ +windows-2019,gcc,13,✓ +windows-2019,gcc,6, +windows-2019,gcc,7, +windows-2019,gcc,8,✓ +windows-2019,gcc,9,✓ +windows-2019,intel-classic,2021.1.2, +windows-2019,intel-classic,2021.1, +windows-2019,intel-classic,2021.10,✓ +windows-2019,intel-classic,2021.2, +windows-2019,intel-classic,2021.3, +windows-2019,intel-classic,2021.4, +windows-2019,intel-classic,2021.5, +windows-2019,intel-classic,2021.6,✓ +windows-2019,intel-classic,2021.7.1, +windows-2019,intel-classic,2021.7,✓ +windows-2019,intel-classic,2021.8,✓ +windows-2019,intel-classic,2021.9,✓ +windows-2019,intel,2021.1.2, +windows-2019,intel,2021.1, +windows-2019,intel,2021.2, +windows-2019,intel,2021.4, +windows-2019,intel,2022.0, +windows-2019,intel,2022.1,✓ +windows-2019,intel,2022.2.1, +windows-2019,intel,2022.2,✓ +windows-2019,intel,2023.0,✓ +windows-2019,intel,2023.1,✓ +windows-2019,intel,2023.2,✓ +windows-2022,gcc,10,✓ +windows-2022,gcc,11,✓ +windows-2022,gcc,12,✓ +windows-2022,gcc,13,✓ +windows-2022,gcc,6, +windows-2022,gcc,7, +windows-2022,gcc,8,✓ +windows-2022,gcc,9,✓ +windows-2022,intel-classic,2021.1.2, +windows-2022,intel-classic,2021.1, +windows-2022,intel-classic,2021.10,✓ +windows-2022,intel-classic,2021.2, +windows-2022,intel-classic,2021.3, +windows-2022,intel-classic,2021.4, +windows-2022,intel-classic,2021.5, +windows-2022,intel-classic,2021.6,✓ +windows-2022,intel-classic,2021.7.1, +windows-2022,intel-classic,2021.7,✓ +windows-2022,intel-classic,2021.8,✓ +windows-2022,intel-classic,2021.9,✓ +windows-2022,intel,2021.1.2, +windows-2022,intel,2021.1, +windows-2022,intel,2021.2, +windows-2022,intel,2021.4, +windows-2022,intel,2022.0, +windows-2022,intel,2022.1,✓ +windows-2022,intel,2022.2.1, +windows-2022,intel,2022.2,✓ +windows-2022,intel,2023.0,✓ +windows-2022,intel,2023.1,✓ +windows-2022,intel,2023.2,✓ diff --git a/.github/compat/matrix.yml b/.github/compat/matrix.yml new file mode 100644 index 00000000..63fdf1bc --- /dev/null +++ b/.github/compat/matrix.yml @@ -0,0 +1,83 @@ +os: + - ubuntu-22.04 + - ubuntu-20.04 + - macos-13 + - macos-12 + - macos-11 + - windows-2022 + - windows-2019 +toolchain: + - {compiler: gcc, version: 13} + - {compiler: gcc, version: 12} + - {compiler: gcc, version: 11} + - {compiler: gcc, version: 10} + - {compiler: gcc, version: 9} + - {compiler: gcc, version: 8} + - {compiler: gcc, version: 7} + - {compiler: gcc, version: 6} + - {compiler: intel, version: '2023.2'} + - {compiler: intel, version: '2023.1'} + - {compiler: intel, version: '2023.0'} + - {compiler: intel, version: '2022.2.1'} + - {compiler: intel, version: '2022.2'} + - {compiler: intel, version: '2022.1'} + - {compiler: intel, version: '2022.0'} + - {compiler: intel, version: '2021.4'} + - {compiler: intel, version: '2021.2'} + - {compiler: intel, version: '2021.1.2'} + - {compiler: intel, version: '2021.1'} + - {compiler: intel-classic, version: '2021.10'} + - {compiler: intel-classic, version: '2021.9'} + - {compiler: intel-classic, version: '2021.8'} + - {compiler: intel-classic, version: '2021.7.1'} + - {compiler: intel-classic, version: '2021.7'} + - {compiler: intel-classic, version: '2021.6'} + - {compiler: intel-classic, version: '2021.5'} + - {compiler: intel-classic, version: '2021.4'} + - {compiler: intel-classic, version: '2021.3'} + - {compiler: intel-classic, version: '2021.2'} + - {compiler: intel-classic, version: '2021.1.2'} + - {compiler: intel-classic, version: '2021.1'} + - {compiler: nvidia-hpc, version: '23.11'} + - {compiler: nvidia-hpc, version: '23.9'} + - {compiler: nvidia-hpc, version: '23.7'} + - {compiler: nvidia-hpc, version: '23.5'} + - {compiler: nvidia-hpc, version: '23.3'} + - {compiler: nvidia-hpc, version: '23.1'} + - {compiler: nvidia-hpc, version: '22.11'} + - {compiler: nvidia-hpc, version: '22.9'} + - {compiler: nvidia-hpc, version: '22.7'} + - {compiler: nvidia-hpc, version: '22.5'} + - {compiler: nvidia-hpc, version: '22.3'} + - {compiler: nvidia-hpc, version: '22.2'} + - {compiler: nvidia-hpc, version: '22.1'} + - {compiler: nvidia-hpc, version: '21.11'} + - {compiler: nvidia-hpc, version: '21.9'} + - {compiler: nvidia-hpc, version: '21.7'} + - {compiler: nvidia-hpc, version: '21.5'} + - {compiler: nvidia-hpc, version: '21.3'} + - {compiler: nvidia-hpc, version: '21.2'} + - {compiler: nvidia-hpc, version: '21.1'} + - {compiler: nvidia-hpc, version: '20.11'} + - {compiler: nvidia-hpc, version: '20.9'} + - {compiler: nvidia-hpc, version: '20.7'} +exclude: + # ifx not available for mac + - os: macos-13 + toolchain: {compiler: intel} + - os: macos-12 + toolchain: {compiler: intel} + - os: macos-11 + toolchain: {compiler: intel} + # nvidia-hpc not available for mac + - os: macos-13 + toolchain: {compiler: nvidia-hpc} + - os: macos-12 + toolchain: {compiler: nvidia-hpc} + - os: macos-11 + toolchain: {compiler: nvidia-hpc} + # nvidia-hpc not available for windows + - os: windows-2022 + toolchain: {compiler: nvidia-hpc} + - os: windows-2019 + toolchain: {compiler: nvidia-hpc} \ No newline at end of file diff --git a/.github/compat/matrix_json_from_csv.py b/.github/compat/matrix_json_from_csv.py new file mode 100644 index 00000000..da1485c8 --- /dev/null +++ b/.github/compat/matrix_json_from_csv.py @@ -0,0 +1,24 @@ +import csv +import json +import sys +from pathlib import Path + +csv_path = Path(sys.argv[1]) # path to CSV file +jsn_path = Path(sys.argv[2]) # path to JSON file + +include = [] + +with open(csv_path, "r") as csv_file: + reader = csv.DictReader(csv_file) + for row in reader: + if not any(row["support"].strip()): + continue + include.append( + { + "os": row["runner"], + "toolchain": {"compiler": row["compiler"], "version": row["version"]}, + } + ) + +with open(jsn_path, "w") as jsn_file: + json.dump({"include": include}, jsn_file) diff --git a/scripts/update_compat_table.py b/.github/compat/update_compat_table.py similarity index 87% rename from scripts/update_compat_table.py rename to .github/compat/update_compat_table.py index a5501e18..3b1a07b6 100644 --- a/scripts/update_compat_table.py +++ b/.github/compat/update_compat_table.py @@ -19,6 +19,6 @@ r".*", re.DOTALL, ) - ct = '{}'.format('\n{}\n'.format(table)) + ct = "{}".format("\n{}\n".format(table)) readme = update_path.open().read() update_path.open("w").write(r.sub(ct, readme)) diff --git a/scripts/wide_compat_reports.py b/.github/compat/wide_compat_reports.py similarity index 97% rename from scripts/wide_compat_reports.py rename to .github/compat/wide_compat_reports.py index fb663f40..97b495f0 100644 --- a/scripts/wide_compat_reports.py +++ b/.github/compat/wide_compat_reports.py @@ -23,7 +23,7 @@ columns=["compiler", "version"], values="support", sort=False, - aggfunc="first" + aggfunc="first", ).sort_values(by=["runner"]) # write wide CSV diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6c44019..24d806a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,7 @@ name: Test - +# Workflow has two modes: assert and report +# Push and pull request run in assert mode. +# Schedule and dispatch run in report mode. on: push: paths-ignore: @@ -12,104 +14,59 @@ on: - '**.md' schedule: - cron: '0 0 * * 0' - + workflow_dispatch: jobs: + options: + name: Set options + runs-on: ubuntu-latest + outputs: + mode: ${{ steps.mode.outputs.mode }} + matrix: ${{ steps.matrix.outputs.matrix }} + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set mode + id: mode + run: | + if [[ "$trigger" == "schedule" ]] || [[ "$trigger" == "workflow_dispatch" ]]; then + echo "mode=report" >> "$GITHUB_OUTPUT" + else + echo "mode=assert" >> "$GITHUB_OUTPUT" + fi + + - name: Set matrix + working-directory: .github/compat + id: matrix + run: | + mode=${{ steps.mode.outputs.mode }} + if [[ "$mode" == "report" ]]; then + yq -o json matrix.yml > matrix.json + else + python matrix_json_from_csv.py "long_compat.csv" "matrix.json" + fi + matrix=$(cat matrix.json | jq -r tostring) + echo "matrix=$matrix" >> "$GITHUB_OUTPUT" + + # debugging + - name: Show matrix + run: echo "${{ toJSON(fromJSON(steps.matrix.outputs.matrix)) }}" + test: name: Test + needs: options runs-on: ${{ matrix.os }} + continue-on-error: ${{ needs.options.outputs.mode == 'report' }} strategy: fail-fast: false - matrix: - os: - - ubuntu-22.04 - - ubuntu-20.04 - - macos-13 - - macos-12 - - macos-11 - - windows-2022 - - windows-2019 - toolchain: - - {compiler: gcc, version: 13} - - {compiler: gcc, version: 12} - - {compiler: gcc, version: 11} - - {compiler: gcc, version: 10} - - {compiler: gcc, version: 9} - - {compiler: gcc, version: 8} - - {compiler: gcc, version: 7} - - {compiler: gcc, version: 6} - - {compiler: intel, version: '2023.2'} - - {compiler: intel, version: '2023.1'} - - {compiler: intel, version: '2023.0'} - - {compiler: intel, version: '2022.2.1'} - - {compiler: intel, version: '2022.2'} - - {compiler: intel, version: '2022.1'} - - {compiler: intel, version: '2022.0'} - - {compiler: intel, version: '2021.4'} - - {compiler: intel, version: '2021.2'} - - {compiler: intel, version: '2021.1.2'} - - {compiler: intel, version: '2021.1'} - - {compiler: intel-classic, version: '2021.10'} - - {compiler: intel-classic, version: '2021.9'} - - {compiler: intel-classic, version: '2021.8'} - - {compiler: intel-classic, version: '2021.7.1'} - - {compiler: intel-classic, version: '2021.7'} - - {compiler: intel-classic, version: '2021.6'} - - {compiler: intel-classic, version: '2021.5'} - - {compiler: intel-classic, version: '2021.4'} - - {compiler: intel-classic, version: '2021.3'} - - {compiler: intel-classic, version: '2021.2'} - - {compiler: intel-classic, version: '2021.1.2'} - - {compiler: intel-classic, version: '2021.1'} - - {compiler: nvidia-hpc, version: '23.11'} - - {compiler: nvidia-hpc, version: '23.9'} - - {compiler: nvidia-hpc, version: '23.7'} - - {compiler: nvidia-hpc, version: '23.5'} - - {compiler: nvidia-hpc, version: '23.3'} - - {compiler: nvidia-hpc, version: '23.1'} - - {compiler: nvidia-hpc, version: '22.11'} - - {compiler: nvidia-hpc, version: '22.9'} - - {compiler: nvidia-hpc, version: '22.7'} - - {compiler: nvidia-hpc, version: '22.5'} - - {compiler: nvidia-hpc, version: '22.3'} - - {compiler: nvidia-hpc, version: '22.2'} - - {compiler: nvidia-hpc, version: '22.1'} - - {compiler: nvidia-hpc, version: '21.11'} - - {compiler: nvidia-hpc, version: '21.9'} - - {compiler: nvidia-hpc, version: '21.7'} - - {compiler: nvidia-hpc, version: '21.5'} - - {compiler: nvidia-hpc, version: '21.3'} - - {compiler: nvidia-hpc, version: '21.2'} - - {compiler: nvidia-hpc, version: '21.1'} - - {compiler: nvidia-hpc, version: '20.11'} - - {compiler: nvidia-hpc, version: '20.9'} - - {compiler: nvidia-hpc, version: '20.7'} - exclude: - # ifx not available for mac - - os: macos-13 - toolchain: {compiler: intel} - - os: macos-12 - toolchain: {compiler: intel} - - os: macos-11 - toolchain: {compiler: intel} - # nvidia-hpc not available for mac - - os: macos-13 - toolchain: {compiler: nvidia-hpc} - - os: macos-12 - toolchain: {compiler: nvidia-hpc} - - os: macos-11 - toolchain: {compiler: nvidia-hpc} - # nvidia-hpc not available for windows - - os: windows-2022 - toolchain: {compiler: nvidia-hpc} - - os: windows-2019 - toolchain: {compiler: nvidia-hpc} + matrix: ${{ fromJSON(needs.options.outputs.matrix) }} steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup Fortran id: setup-fortran - continue-on-error: true + continue-on-error: ${{ needs.options.outputs.mode == 'report' }} uses: ./ with: compiler: ${{ matrix.toolchain.compiler }} @@ -124,7 +81,7 @@ jobs: - name: Test C compiler continue-on-error: true - if: steps.setup-fortran.outcome == 'success' + if: needs.options.outputs.mode == 'report' && steps.setup-fortran.outcome == 'success' uses: ./.github/actions/test-cc with: compiler: ${{ matrix.toolchain.compiler }} @@ -132,16 +89,17 @@ jobs: - name: Test C++ compiler continue-on-error: true - if: steps.setup-fortran.outcome == 'success' + if: needs.options.outputs.mode == 'report' && steps.setup-fortran.outcome == 'success' uses: ./.github/actions/test-cxx with: compiler: ${{ matrix.toolchain.compiler }} version: ${{ matrix.toolchain.version }} - name: Create compatibility report + if: needs.options.outputs.mode == 'report' shell: bash run: | - mkdir compat + mkdir -p compat support=$([ "${{ steps.setup-fortran.outcome }}" == "success" ] && echo "✓" || echo "") prefix="${{ matrix.os }},${{ matrix.toolchain.compiler }},${{ matrix.toolchain.version }}" report="compat/${prefix//,/_}.csv" @@ -149,15 +107,18 @@ jobs: cat "$report" - name: Upload compatibility report + if: needs.options.outputs.mode == 'report' uses: actions/upload-artifact@v3 with: name: compat path: compat/*.csv - + compat: name: Report compatibility - if: github.event_name != 'pull_request' - needs: test + needs: + - options + - test + if: needs.options.outputs.mode == 'report' runs-on: ubuntu-latest permissions: contents: write @@ -173,7 +134,7 @@ jobs: python-version: 3.9 - name: Install packages - run: pip install tabulate pandas + run: pip install -r requirements.txt - name: Download reports uses: actions/download-artifact@v3 @@ -183,22 +144,26 @@ jobs: - name: Concatenate reports run: | - echo "runner,compiler,version,support" > long_compat.csv - cat compat/*.csv >> long_compat.csv + echo "runner,compiler,version,support" > .github/compat/long_compat.csv + cat compat/*.csv >> .github/compat/long_compat.csv - - name: Make wide CSV and MD table - working-directory: scripts - run: python wide_compat_reports.py "long_compat.csv" "compat.csv" + - name: Make wide reports + working-directory: .github/compat + run: | + python wide_compat_reports.py "long_compat.csv" "compat.csv" + cat compat.md - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: compat path: | - compat.csv - compat.md + .github/compat/long_compat.csv + .github/compat/compat.csv + .github/compat/compat.md - name: Check for changes + working-directory: .github/compat id: diff run: | if ! [ -f compat.csv ]; then @@ -217,9 +182,8 @@ jobs: fi - name: Update README - working-directory: scripts if: ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }} - run: python update_compat_table.py "compat.md" "README.md" + run: python .github/compat/update_compat_table.py ".github/compat/compat.md" "README.md" - name: Print README diff if: ${{ steps.diff.outputs.diff == 'true' && github.event_name == 'push' }} @@ -238,7 +202,7 @@ jobs: default_branch="${{ github.event.repository.default_branch }}" git switch -c "$updated_branch" - git add compat.csv README.md + git add .github/compat/compat.csv README.md git commit -m "Update compatibility matrix" git push -u origin "$updated_branch" - gh pr create -B "$default_branch" -H "$updated_branch" --title "Update compatibility matrix" --body-file compat.md + gh pr create -B "$default_branch" -H "$updated_branch" --title "Update compatibility matrix" --body-file .github/compat/compat.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..182f1004 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.github/compat/*.json +.github/compat/*.md +**/.DS_Store +venv/ diff --git a/README.md b/README.md index 4a570087..afbb2e61 100644 --- a/README.md +++ b/README.md @@ -97,15 +97,15 @@ These are made available to subsequent workflow steps via the [`GITHUB_ENV` envi Toolchain support varies across GitHub-hosted runner images. -| runner | gcc 10 | gcc 11 | gcc 12 | gcc 13 | gcc 6 | gcc 7 | gcc 8 | gcc 9 | intel-classic 2021.1.2 | intel-classic 2021.1 | intel-classic 2021.10 | intel-classic 2021.2 | intel-classic 2021.3 | intel-classic 2021.4 | intel-classic 2021.5 | intel-classic 2021.6 | intel-classic 2021.7.1 | intel-classic 2021.7 | intel-classic 2021.8 | intel-classic 2021.9 | intel 2021.1.2 | intel 2021.1 | intel 2021.2 | intel 2021.4 | intel 2022.0 | intel 2022.1 | intel 2022.2.1 | intel 2022.2 | intel 2023.0 | intel 2023.1 | intel 2023.2 | -|:-------------|:----------------|:----------------|:----------------|:----------------|:---------------|:---------------|:---------------|:---------------|:--------------------------------|:------------------------------|:-------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------------|:--------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------|:----------------------|:----------------------|:----------------------|:----------------------|:----------------------|:------------------------|:----------------------|:----------------------|:----------------------|:----------------------| -| macos-11 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | -| macos-12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | -| macos-13 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | -| ubuntu-20.04 | ✓ | ✓ | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| ubuntu-22.04 | ✓ | ✓ | ✓ | ✓ | | | | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| windows-2019 | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | -| windows-2022 | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | +| runner | gcc 10 | gcc 11 | gcc 12 | gcc 13 | gcc 7 | gcc 8 | gcc 9 | intel-classic 2021.1 | intel-classic 2021.10 | intel-classic 2021.2 | intel-classic 2021.3 | intel-classic 2021.4 | intel-classic 2021.5 | intel-classic 2021.6 | intel-classic 2021.7.1 | intel-classic 2021.7 | intel-classic 2021.8 | intel-classic 2021.9 | intel-classic 2021.1.2 | intel 2021.1.2 | intel 2021.1 | intel 2021.2 | intel 2021.4 | intel 2022.0 | intel 2022.1 | intel 2022.2.1 | intel 2022.2 | intel 2023.0 | intel 2023.1 | intel 2023.2 | nvidia-hpc 20.11 | nvidia-hpc 21.11 | nvidia-hpc 22.1 | nvidia-hpc 22.11 | nvidia-hpc 23.11 | nvidia-hpc 23.3 | nvidia-hpc 23.5 | nvidia-hpc 23.7 | nvidia-hpc 23.9 | +|:-------------|:----------------|:----------------|:----------------|:----------------|:---------------|:---------------|:---------------|:------------------------------|:-------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------------|:------------------------------|:--------------------------------|:------------------------------|:------------------------------|:------------------------------|:--------------------------------|:------------------------|:----------------------|:----------------------|:----------------------|:----------------------|:----------------------|:------------------------|:----------------------|:----------------------|:----------------------|:----------------------|:--------------------------|:--------------------------|:-------------------------|:--------------------------|:--------------------------|:-------------------------|:-------------------------|:-------------------------|:-------------------------| +| macos-11 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| macos-12 | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| macos-13 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| ubuntu-20.04 | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ubuntu-22.04 | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| windows-2019 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | +| windows-2022 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | **Note:** on `macos-13`, `gfortran` 7-9 require flag `-L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib`. diff --git a/compat.csv b/compat.csv deleted file mode 100644 index dfe9d31e..00000000 --- a/compat.csv +++ /dev/null @@ -1,10 +0,0 @@ -compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel -version,10,11,12,13,6,7,8,9,2021.1.2,2021.1,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7.1,2021.7,2021.8,2021.9,2021.1.2,2021.1,2021.2,2021.4,2022.0,2022.1,2022.2.1,2022.2,2023.0,2023.1,2023.2 -runner,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -macos-11,✓,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,, -macos-12,✓,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,, -macos-13,✓,✓,✓,✓,,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,, -ubuntu-20.04,✓,✓,,✓,,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ -ubuntu-22.04,✓,✓,✓,✓,,,,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ -windows-2019,✓,✓,✓,✓,,,✓,✓,,,✓,,,,,✓,,✓,✓,✓,,,,,,✓,,✓,✓,✓,✓ -windows-2022,✓,✓,✓,✓,,,✓,✓,,,✓,,,,,✓,,✓,✓,✓,,,,,,✓,,✓,✓,✓,✓ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..debfb475 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pandas +tabulate \ No newline at end of file From f2c747a140696826c383adf3d461a13216fecb40 Mon Sep 17 00:00:00 2001 From: Nickolai Belakovski Date: Wed, 31 Jan 2024 14:34:45 -0800 Subject: [PATCH 5/5] Removing changes related to gcc11 fix Moving them to a separate branch since this branch has become focused on the test matrix. --- .github/actions/test-fc/action.yml | 5 ----- setup-fortran.sh | 5 ++++- test/bobyqa.f90 | 22 ---------------------- 3 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 test/bobyqa.f90 diff --git a/.github/actions/test-fc/action.yml b/.github/actions/test-fc/action.yml index 2a728575..6c1a5969 100644 --- a/.github/actions/test-fc/action.yml +++ b/.github/actions/test-fc/action.yml @@ -50,11 +50,6 @@ runs: [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program 'hw' output: $output"; exit 1) rm hw - ${{ env.FC }} $args -o bobyqa bobyqa.f90 - output=$(./bobyqa '2>&1') - [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program 'bobyqa' output: $output"; exit 1) - rm bobyqa - - name: Test compile Fortran (pwsh) working-directory: test if: ${{ (success() || failure()) && runner.os == 'Windows' }} diff --git a/setup-fortran.sh b/setup-fortran.sh index 6a6a5ff6..ab899a9e 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -98,7 +98,10 @@ install_gcc_choco() echo "GCC $version already installed" else # otherwise hide preinstalled mingw compilers - mv /c/mingw64 "$RUNNER_TEMP/" + mkdir "$RUNNER_TEMP/mingw64" + mv /c/mingw64/bin/gfortran "$RUNNER_TEMP/mingw64/gfortran" + mv /c/mingw64/bin/gcc "$RUNNER_TEMP/mingw64/gcc" + mv /c/mingw64/bin/g++ "$RUNNER_TEMP/mingw64/g++" # ...and install selected version case $version in 13) diff --git a/test/bobyqa.f90 b/test/bobyqa.f90 deleted file mode 100644 index 935ba7d9..00000000 --- a/test/bobyqa.f90 +++ /dev/null @@ -1,22 +0,0 @@ -program bobyqa_exmp -implicit none - -logical :: parent_logical_array(20) -integer(4), allocatable :: locations(:) - -locations = true_locations(parent_logical_array) -print *, "hello world" - -contains - -function true_locations(logical_array) result(location_array) -implicit none -logical, intent(in) :: logical_array(:) -integer(4), allocatable :: location_array(:) -integer(4) :: n, monotone_array(size(logical_array)) -n = count(logical_array) -allocate(location_array(1:n)) -location_array = pack(monotone_array, mask=logical_array) - -end function true_locations -end program bobyqa_exmp