From 3853391b057998113a8f47c99f1010c63e494fb1 Mon Sep 17 00:00:00 2001 From: Seyed Ali Ghasemi Date: Thu, 4 Jan 2024 17:05:46 +0100 Subject: [PATCH 01/12] Add support for nvidia-hpc-sdk --- setup-fortran.sh | 86 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/setup-fortran.sh b/setup-fortran.sh index fee56a0..f3a872f 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -591,3 +591,89 @@ install_nvidiahpc() export CC="nvc" export CXX="nvc++" } + +export_nvidiahpc_vars() +{ + local version=$1 + + # to convert version format from X.Y to X-Y + local cversion=$(echo "$version" | tr '.' '-') + + cat >> $GITHUB_ENV <> $GITHUB_PATH + done +} + +install_nvidiahpc_apt() +{ + local version=$1 + + # install environment-modules + install_environment_modules_apt + + # to convert version format from X.Y to X-Y + local cversion=$(echo "$version" | tr '.' '-') + + # install NVIDIA HPC SDK + echo "Installing NVIDIA HPC SDK $version..." + curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list + sudo apt-get update -y + sudo apt-get install -y nvhpc-$cversion + echo "NVIDIA HPC SDK $version installed." + + # load NVIDIA HPC SDK module + echo "Loading NVIDIA HPC SDK $version module..." + NVCOMPILERS=/opt/nvidia/hpc_sdk; export NVCOMPILERS + export MODULEPATH=$NVCOMPILERS/modulefiles:$MODULEPATH + module load nvhpc + echo "NVIDIA HPC SDK $version module loaded." + + # set environment variables + echo "Setting environment variables..." + export_nvidiahpc_vars $version + + # set environment variables + export FC="nvfortran" + export CC="nvc" + export CXX="nvc++" + echo "Environment variables set." +} + +install_nvidiahpc() +{ + local platform=$1 + case $platform in + linux*) + install_nvidiahpc_apt $version + ;; + darwin*) + echo "NVIDIA HPC SDK is not supported on macOS." + exit 1 + ;; + mingw*) + echo "NVIDIA HPC SDK is not supported on Windows." + exit 1 + ;; + msys*) + echo "NVIDIA HPC SDK is not supported on MSYS." + exit 1 + ;; + cygwin*) + echo "NVIDIA HPC SDK is not supported on Cygwin." + exit 1 + ;; + *) + echo "Unsupported platform: $platform" + exit 1 + ;; + esac +} \ No newline at end of file From 55bf9f34ffe73b98b18193177129891bee0c9f82 Mon Sep 17 00:00:00 2001 From: Seyed Ali Ghasemi Date: Mon, 15 Jan 2024 22:53:53 +0100 Subject: [PATCH 02/12] Add support for lfortran on Liux and macOS. --- action.yml | 4 ++ setup-fortran.sh | 117 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) diff --git a/action.yml b/action.yml index e34828c..9d867c4 100644 --- a/action.yml +++ b/action.yml @@ -79,6 +79,10 @@ runs: version=${VERSION:-23.11} install_nvidiahpc $platform ;; + lfortran) + version=${VERSION:-0.30.0} + install_lfortran $platform + ;; *) exit 1 ;; diff --git a/setup-fortran.sh b/setup-fortran.sh index f3a872f..80f662f 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -25,6 +25,28 @@ install_environment_modules_apt() { echo "Environment modules set up completed." } +# Function to install miniconda on linux +# https://docs.conda.io/projects/miniconda/en/latest/ +install_miniconda_lin() { + mkdir -p ~/miniconda3 + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh + bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 + rm -rf ~/miniconda3/miniconda.sh + ~/miniconda3/bin/conda init bash +} + +# Function to install miniconda on macOS +# https://docs.conda.io/projects/miniconda/en/latest/ +install_miniconda_mac() { + mkdir -p ~/miniconda3 + # curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh + curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh + bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 + rm -rf ~/miniconda3/miniconda.sh + ~/miniconda3/bin/conda init bash + source ~/miniconda3/etc/profile.d/conda.sh +} + install_gcc_brew() { # check if gcc preinstalled via brew @@ -676,4 +698,99 @@ install_nvidiahpc() exit 1 ;; esac +} + +install_lfortran_lin() +{ + local version=$1 + + # install miniconda + echo "Installing Miniconda..." + install_miniconda_lin + echo "Miniconda installed." + + # create conda environment for lfortran + echo "Creating conda environment for lfortran..." + conda create -n lf + eval "$(conda shell.bash hook)" + conda activate lf + echo "Conda environment for lfortran created." + + # install lfortran + echo "Installing lfortran..." + conda install -y lfortran=$version -c conda-forge + echo "lfortran installed." + + # add lfortran to PATH + cat >> $GITHUB_ENV <> $GITHUB_PATH + done + + # set environment variables + echo "Setting environment variables..." + export FC="lfortran" + # export CC="" + # export CXX="" + echo "Environment variables set." +} + +install_lfortran_mac() +{ + local version=$1 + + # install miniconda + install_miniconda_mac + + # create conda environment for lfortran + echo "Creating conda environment for lfortran..." + conda create -n lf + eval "$(conda shell.bash hook)" + conda activate lf + echo "Conda environment for lfortran created." + + # install lfortran + echo "Installing lfortran..." + conda install -y lfortran=$version -c conda-forge + echo "lfortran installed." + + cat >> $GITHUB_ENV <> $GITHUB_PATH + done + + # set environment variables + export FC="lfortran" + # export CC="" + # export CXX="" +} + +install_lfortran() +{ + local platform=$1 + case $platform in + linux*) + install_lfortran_lin $version + ;; + darwin*) + install_lfortran_mac $version + ;; + mingw*) + exit 1 + ;; + msys*) + exit 1 + ;; + cygwin*) + exit 1 + ;; + *) + echo "Unsupported platform: $platform" + exit 1 + ;; + esac } \ No newline at end of file From 2c7730e83e32e3b7c104f72729c66fa49a1c256c Mon Sep 17 00:00:00 2001 From: Seyed Ali Ghasemi Date: Mon, 15 Jan 2024 23:03:35 +0100 Subject: [PATCH 03/12] Exclude C/C++ tests for LFortran. --- .github/actions/test-cc/action.yml | 16 ++++++++++------ .github/actions/test-cxx/action.yml | 17 ++++++++++------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.github/actions/test-cc/action.yml b/.github/actions/test-cc/action.yml index b6dceb7..92ba232 100644 --- a/.github/actions/test-cc/action.yml +++ b/.github/actions/test-cc/action.yml @@ -27,18 +27,22 @@ runs: elif ([ "$RUNNER_OS" == "Linux" ] && [[ "${{ inputs.compiler }}" == "nvidia-hpc" ]]); then # Get the compiler version and extract the version number ccv=$(${{ env.CC }} --version 2>&1 | awk '/nvc/ {print $2}' | cut -d'-' -f1) - elif ([[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then + elif ([[ "${{ inputs.compiler }}" != "nvidia-hpc" ]] && [[ "${{ inputs.compiler }}" != "lfortran" ]]); then ccv=$(${{ env.CC }} --version | head -n 1) ccv=$(echo "$ccv" | grep -woE '[0123456789.]+' | head -n 1) fi - [[ "$ccv" == ${{ inputs.version }}* ]] && (echo "found ${{ env.CC }} version: $ccv") || (echo "unexpected ${{ env.CC }} version: $ccv"; exit 1) + if ([[ "${{ inputs.compiler }}" != "lfortran" ]]); then + [[ "$ccv" == ${{ inputs.version }}* ]] && (echo "found ${{ env.CC }} version: $ccv") || (echo "unexpected ${{ env.CC }} version: $ccv"; exit 1) + fi - name: Test compile (bash) working-directory: test shell: bash run: | - ${{ env.CC }} -o hw hw.c - output=$(./hw '2>&1') - [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected C program output: $output"; exit 1) - rm hw + if ([[ "${{ inputs.compiler }}" != "lfortran" ]]); then + ${{ env.CC }} -o hw hw.c + output=$(./hw '2>&1') + [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected C program output: $output"; exit 1) + rm hw + fi \ No newline at end of file diff --git a/.github/actions/test-cxx/action.yml b/.github/actions/test-cxx/action.yml index 7e6c826..8b7940d 100644 --- a/.github/actions/test-cxx/action.yml +++ b/.github/actions/test-cxx/action.yml @@ -27,18 +27,21 @@ runs: elif ([ "$RUNNER_OS" == "Linux" ] && [[ "${{ matrix.toolchain.compiler}}" == "nvidia-hpc" ]]); then # Get the compiler version and extract the version number cxxv=$(${{ env.CXX }} --version 2>&1 | awk '/nvc++/ {print $2}' | cut -d'-' -f1) - elif ([[ "${{ matrix.toolchain.compiler}}" != "nvidia-hpc" ]]); then + elif ([[ "${{ matrix.toolchain.compiler}}" != "nvidia-hpc" ]] && [[ "${{ matrix.toolchain.compiler}}" != "lfortran" ]]); then cxxv=$(${{ env.CXX }} --version | head -n 1) cxxv=$(echo "$cxxv" | grep -woE '[0123456789.]+' | head -n 1) fi - [[ "$cxxv" == ${{ matrix.toolchain.version }}* ]] && (echo "found ${{ env.CXX }} version: $cxxv") || (echo "unexpected ${{ env.CXX }} version: $cxxv"; exit 1) + if ([[ "${{ matrix.toolchain.compiler}}" != "lfortran" ]]); then + [[ "$cxxv" == ${{ matrix.toolchain.version }}* ]] && (echo "found ${{ env.CXX }} version: $cxxv") || (echo "unexpected ${{ env.CXX }} version: $cxxv"; exit 1) + fi - name: Test compile (bash) working-directory: test shell: bash run: | - ${{ env.CXX }} -o hw hw.cpp - output=$(./hw '2>&1') - [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected C++ program output: $output"; exit 1) - rm hw - \ No newline at end of file + if ([[ "${{ matrix.toolchain.compiler}}" != "lfortran" ]]); then + ${{ env.CXX }} -o hw hw.cpp + output=$(./hw '2>&1') + [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected C++ program output: $output"; exit 1) + rm hw + fi \ No newline at end of file From a83f651eea237f12b0589c407f6ce37773c61ccb Mon Sep 17 00:00:00 2001 From: Seyed Ali Ghasemi Date: Wed, 17 Jan 2024 11:36:37 +0100 Subject: [PATCH 04/12] Remove unnecessary echo messages. --- setup-fortran.sh | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index 80f662f..a3b054f 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -32,18 +32,16 @@ install_miniconda_lin() { wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh - ~/miniconda3/bin/conda init bash +} } # Function to install miniconda on macOS # https://docs.conda.io/projects/miniconda/en/latest/ install_miniconda_mac() { mkdir -p ~/miniconda3 - # curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh - ~/miniconda3/bin/conda init bash source ~/miniconda3/etc/profile.d/conda.sh } @@ -705,21 +703,15 @@ install_lfortran_lin() local version=$1 # install miniconda - echo "Installing Miniconda..." install_miniconda_lin - echo "Miniconda installed." # create conda environment for lfortran - echo "Creating conda environment for lfortran..." conda create -n lf eval "$(conda shell.bash hook)" conda activate lf - echo "Conda environment for lfortran created." # install lfortran - echo "Installing lfortran..." conda install -y lfortran=$version -c conda-forge - echo "lfortran installed." # add lfortran to PATH cat >> $GITHUB_ENV <> $GITHUB_ENV < Date: Wed, 17 Jan 2024 11:42:49 +0100 Subject: [PATCH 05/12] install Miniconda on Windows --- setup-fortran.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup-fortran.sh b/setup-fortran.sh index a3b054f..d9d70e6 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -33,6 +33,11 @@ install_miniconda_lin() { bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm -rf ~/miniconda3/miniconda.sh } + +# Function to install miniconda on windows +# https://docs.conda.io/projects/miniconda/en/latest/ +install_miniconda_win() { + powershell.exe -Command "Invoke-WebRequest -Uri 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe' -OutFile 'C:\ProgramData\miniconda.exe'; Start-Process -Wait -FilePath 'C:\ProgramData\miniconda.exe' -ArgumentList '/InstallationType=JustMe', '/AddToPath=1', '/RegisterPython=0', '/S', '/D=C:\ProgramData\Miniconda3'" } # Function to install miniconda on macOS From a652fe0d024a7f38a9afb27a526049511521145d Mon Sep 17 00:00:00 2001 From: Seyed Ali Ghasemi Date: Wed, 17 Jan 2024 11:45:14 +0100 Subject: [PATCH 06/12] Insatll LFortran on Windows --- setup-fortran.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index d9d70e6..56ccb3b 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -731,10 +731,25 @@ EOF # export CC="" # export CXX="" } + +install_lfortran_win() +{ + local version=$1 + + # install miniconda + install_miniconda_win + + # install lfortran in conda environment lf + C:/ProgramData/Miniconda3/Scripts/conda.exe create -n lf + C:/ProgramData/Miniconda3/Scripts/conda.exe install -n lf -y lfortran=$version -c conda-forge + + # check lfortran version + C:/ProgramData/Miniconda3/envs/lf/Library/bin/lfortran.exe -h + + # set environment variables export FC="lfortran" # export CC="" # export CXX="" - echo "Environment variables set." } install_lfortran_mac() @@ -776,13 +791,13 @@ install_lfortran() install_lfortran_mac $version ;; mingw*) - exit 1 + install_lfortran_win $version ;; msys*) - exit 1 + install_lfortran_win $version ;; cygwin*) - exit 1 + install_lfortran_win $version ;; *) echo "Unsupported platform: $platform" From 7d36b2a3e86950dd9e70c01e37d21fa0b9d891ac Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Tue, 26 Mar 2024 12:04:10 -0400 Subject: [PATCH 07/12] multiple * use preinstalled conda on linux and windows * install/use micromamba on mac * install lfortran to base env * update fortran test action * restore c/c++ test actions * simplify env var setting * remove dupe function --- .github/actions/test-cc/action.yml | 20 ++-- .github/actions/test-cxx/action.yml | 21 ++-- .github/actions/test-fc/action.yml | 13 ++- .github/compat/matrix.yml | 3 + README.md | 2 +- action.yml | 11 +- setup-fortran.sh | 157 +++++----------------------- 7 files changed, 66 insertions(+), 161 deletions(-) diff --git a/.github/actions/test-cc/action.yml b/.github/actions/test-cc/action.yml index 92ba232..77920fd 100644 --- a/.github/actions/test-cc/action.yml +++ b/.github/actions/test-cc/action.yml @@ -18,7 +18,7 @@ runs: [[ "${{ env.CC }}" == "${{ env.FPM_CC }}" ]] && (echo "CC and FPM_CC match") || (echo "CC and FPM_CC don't match: ${{ env.CC }} != ${{ env.FPM_CC}}"; exit 1) # check compiler version - if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ inputs.compiler }}" =~ "intel" ]] && [[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then + if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ inputs.compiler }}" =~ "intel" ]]); then # only last line of output captured by command substitution, write to temp file instead ${{ env.CC }} //QV > "$RUNNER_TEMP/${{ env.CC }}.ver" 2>&1 ccv=$(cat "$RUNNER_TEMP/${{ env.CC }}.ver" | head -n 1) @@ -27,22 +27,20 @@ runs: elif ([ "$RUNNER_OS" == "Linux" ] && [[ "${{ inputs.compiler }}" == "nvidia-hpc" ]]); then # Get the compiler version and extract the version number ccv=$(${{ env.CC }} --version 2>&1 | awk '/nvc/ {print $2}' | cut -d'-' -f1) - elif ([[ "${{ inputs.compiler }}" != "nvidia-hpc" ]] && [[ "${{ inputs.compiler }}" != "lfortran" ]]); then + elif ([[ "${{ inputs.compiler }}" == "lfortran" ]]); then + exit 0 # uses preinstalled gcc, skip version check + elif ([[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then ccv=$(${{ env.CC }} --version | head -n 1) ccv=$(echo "$ccv" | grep -woE '[0123456789.]+' | head -n 1) fi - if ([[ "${{ inputs.compiler }}" != "lfortran" ]]); then - [[ "$ccv" == ${{ inputs.version }}* ]] && (echo "found ${{ env.CC }} version: $ccv") || (echo "unexpected ${{ env.CC }} version: $ccv"; exit 1) - fi + [[ "$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: | - if ([[ "${{ inputs.compiler }}" != "lfortran" ]]); then - ${{ env.CC }} -o hw hw.c - output=$(./hw '2>&1') - [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected C program output: $output"; exit 1) - rm hw - fi + ${{ env.CC }} -o hw hw.c + output=$(./hw '2>&1') + [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected C program output: $output"; exit 1) + rm hw \ No newline at end of file diff --git a/.github/actions/test-cxx/action.yml b/.github/actions/test-cxx/action.yml index 8b7940d..5793c6c 100644 --- a/.github/actions/test-cxx/action.yml +++ b/.github/actions/test-cxx/action.yml @@ -18,7 +18,7 @@ runs: [[ "${{ env.CXX }}" == "${{ env.FPM_CXX }}" ]] && (echo "CXX and FPM_CXX match") || (echo "CXX and FPM_CXX don't match: ${{ env.CXX }} != ${{ env.FPM_CXX}}"; exit 1) # check compiler version - if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ matrix.toolchain.compiler }}" =~ "intel" ]] && [[ "${{ matrix.toolchain.compiler }}" != "nvidia-hpc" ]]); then + if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ matrix.toolchain.compiler }}" =~ "intel" ]]); then # only last line of output captured by command substitution, write to temp file instead ${{ env.CXX }} //QV > "$RUNNER_TEMP/${{ env.CXX }}.ver" 2>&1 cxxv=$(cat "$RUNNER_TEMP/${{ env.CXX }}.ver" | head -n 1) @@ -27,21 +27,20 @@ runs: elif ([ "$RUNNER_OS" == "Linux" ] && [[ "${{ matrix.toolchain.compiler}}" == "nvidia-hpc" ]]); then # Get the compiler version and extract the version number cxxv=$(${{ env.CXX }} --version 2>&1 | awk '/nvc++/ {print $2}' | cut -d'-' -f1) - elif ([[ "${{ matrix.toolchain.compiler}}" != "nvidia-hpc" ]] && [[ "${{ matrix.toolchain.compiler}}" != "lfortran" ]]); then + elif ([[ "${{ inputs.compiler }}" == "lfortran" ]]); then + exit 0 # uses preinstalled gcc, skip version check + elif ([[ "${{ matrix.toolchain.compiler}}" != "nvidia-hpc" ]]); then cxxv=$(${{ env.CXX }} --version | head -n 1) cxxv=$(echo "$cxxv" | grep -woE '[0123456789.]+' | head -n 1) fi - if ([[ "${{ matrix.toolchain.compiler}}" != "lfortran" ]]); then - [[ "$cxxv" == ${{ matrix.toolchain.version }}* ]] && (echo "found ${{ env.CXX }} version: $cxxv") || (echo "unexpected ${{ env.CXX }} version: $cxxv"; exit 1) - fi + [[ "$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: | - if ([[ "${{ matrix.toolchain.compiler}}" != "lfortran" ]]); then - ${{ env.CXX }} -o hw hw.cpp - output=$(./hw '2>&1') - [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected C++ program output: $output"; exit 1) - rm hw - fi \ No newline at end of file + ${{ env.CXX }} -o hw hw.cpp + output=$(./hw '2>&1') + [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected C++ program output: $output"; exit 1) + rm hw + \ No newline at end of file diff --git a/.github/actions/test-fc/action.yml b/.github/actions/test-fc/action.yml index bca4e9e..2d7212f 100644 --- a/.github/actions/test-fc/action.yml +++ b/.github/actions/test-fc/action.yml @@ -18,7 +18,7 @@ runs: [[ "${{ env.FC }}" == "${{ env.FPM_FC }}" ]] && (echo "FC and FPM_FC match") || (echo "FC and FPM_FC don't match: ${{ env.FC }} != ${{ env.FPM_FC}}"; exit 1) # check compiler version - if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ inputs.compiler }}" =~ "intel" ]] && [[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then + if ([ "$RUNNER_OS" == "Windows" ] && [[ "${{ inputs.compiler }}" =~ "intel" ]]); then # only last line of output captured by command substitution, write to temp file instead ${{ env.FC }} //QV > "$RUNNER_TEMP/${{ env.FC }}.ver" 2>&1 fcv=$(cat "$RUNNER_TEMP/${{ env.FC }}.ver" | head -n 1) @@ -27,6 +27,8 @@ runs: elif ([ "$RUNNER_OS" == "Linux" ] && [[ "${{ inputs.compiler }}" == "nvidia-hpc" ]]); then # Get the compiler version and extract the version number fcv=$(${{ env.FC }} --version 2>&1 | awk '/nvfortran/ {print $2}' | cut -d'-' -f1) + elif ([[ "${{ inputs.compiler }}" == "lfortran" ]]); then + fcv=$(${{ env.FC }} --version | head -n 1 | grep -woE '[0123456789.]+') elif ([[ "${{ inputs.compiler }}" != "nvidia-hpc" ]]); then fcv=$(${{ env.FC }} --version | head -n 1) fcv=$(echo "$fcv" | grep -woE '[0123456789.]+' | head -n 1) @@ -38,14 +40,15 @@ runs: shell: bash run: | # hello world program - ${{ env.FC }} $args -o hw hw.f90 + ${{ env.FC }} -o hw hw.f90 output=$(./hw '2>&1') [[ "$output" == *"hello world"* ]] && echo "$output" || (echo "Unexpected Fortran program 'hw' output: $output"; exit 1) rm hw - name: Test compile Fortran (pwsh) working-directory: test - if: ${{ (success() || failure()) && runner.os == 'Windows' }} + # todo: debug lfortran discovery issues (same for powershell and cmd below) + if: ${{ (success() || failure()) && runner.os == 'Windows' && inputs.compiler != 'lfortran' }} shell: pwsh run: | ${{ env.FC }} -o hw.exe hw.f90 @@ -60,7 +63,7 @@ runs: - name: Test compile Fortran (powershell) working-directory: test - if: ${{ (success() || failure()) && runner.os == 'Windows' }} + if: ${{ (success() || failure()) && runner.os == 'Windows' && inputs.compiler != 'lfortran' }} shell: powershell run: | ${{ env.FC }} -o hw.exe hw.f90 @@ -75,7 +78,7 @@ runs: - name: Test compile Fortran (cmd) working-directory: test - if: ${{ (success() || failure()) && runner.os == 'Windows' }} + if: ${{ (success() || failure()) && runner.os == 'Windows' && inputs.compiler != 'lfortran' }} shell: cmd run: | ${{ env.FC }} -o hw.exe hw.f90 diff --git a/.github/compat/matrix.yml b/.github/compat/matrix.yml index c8a8ea8..1eba068 100644 --- a/.github/compat/matrix.yml +++ b/.github/compat/matrix.yml @@ -38,6 +38,9 @@ toolchain: - {compiler: intel-classic, version: '2021.2'} - {compiler: intel-classic, version: '2021.1.2'} - {compiler: intel-classic, version: '2021.1'} + - {compiler: lfortran, version: '0.31.0'} + - {compiler: lfortran, version: '0.32.0'} + - {compiler: lfortran, version: '0.33.0'} - {compiler: nvidia-hpc, version: '23.11'} - {compiler: nvidia-hpc, version: '23.9'} - {compiler: nvidia-hpc, version: '23.7'} diff --git a/README.md b/README.md index 5e96cb0..ed2cfee 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ The action sets the following outputs: - `cc`: C compiler executable, e.g. `gcc` - `cxx`: C++ compiler executable, e.g. `g++` -C/C++ compilers of the same toolchain/version are provided where possible, otherwise (if a standalone Fortran compiler is selected) defaulting to the preinstalled GCC. While this action attempts to guarantee Fortran compiler compatibility with all supported platform/toolchain/version combinations, no corresponding guarantee is made with regard to C/C++ compilers — use at your own risk. +C/C++ compilers of the same toolchain/version are provided where available. If a standalone Fortran compiler is selected, the action will attempt to configure compatible C/C++ compilers (typically GCC, or MSVC on Windows), but this is not guaranteed — use at your own risk. ## Environment variables diff --git a/action.yml b/action.yml index 9d867c4..b6ddbe0 100644 --- a/action.yml +++ b/action.yml @@ -143,9 +143,12 @@ runs: echo fc=$FC>>$GITHUB_OUTPUT echo cc=$CC>>$GITHUB_OUTPUT echo cxx=$CXX>>$GITHUB_OUTPUT - - # GitHub Actions prepends GNU linker to the PATH before all bash steps, hide it so MSVC linker is found + - name: Hide GNU linker (Windows) - if: runner.os == 'Windows' && contains(inputs.compiler, 'intel') + if: runner.os == 'Windows' && !contains(inputs.compiler, 'gcc') shell: bash - run: mv "/usr/bin/link" "$RUNNER_TEMP/link" + run: mv /usr/bin/link $RUNNER_TEMP/link + + - name: Setup MSVC toolchain (Windows) + if: runner.os == 'Windows' && contains(inputs.compiler, 'lfortran') + uses: ilammy/msvc-dev-cmd@v1 diff --git a/setup-fortran.sh b/setup-fortran.sh index 56ccb3b..a5d5bfd 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -25,29 +25,9 @@ install_environment_modules_apt() { echo "Environment modules set up completed." } -# Function to install miniconda on linux -# https://docs.conda.io/projects/miniconda/en/latest/ -install_miniconda_lin() { - mkdir -p ~/miniconda3 - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh - bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 - rm -rf ~/miniconda3/miniconda.sh -} - -# Function to install miniconda on windows -# https://docs.conda.io/projects/miniconda/en/latest/ -install_miniconda_win() { - powershell.exe -Command "Invoke-WebRequest -Uri 'https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe' -OutFile 'C:\ProgramData\miniconda.exe'; Start-Process -Wait -FilePath 'C:\ProgramData\miniconda.exe' -ArgumentList '/InstallationType=JustMe', '/AddToPath=1', '/RegisterPython=0', '/S', '/D=C:\ProgramData\Miniconda3'" -} - -# Function to install miniconda on macOS -# https://docs.conda.io/projects/miniconda/en/latest/ -install_miniconda_mac() { - mkdir -p ~/miniconda3 - curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh - bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 - rm -rf ~/miniconda3/miniconda.sh - source ~/miniconda3/etc/profile.d/conda.sh +install_micromamba_brew() { + brew install micromamba + micromamba shell init } install_gcc_brew() @@ -665,119 +645,35 @@ install_nvidiahpc_apt() # set environment variables echo "Setting environment variables..." export_nvidiahpc_vars $version - - # set environment variables - export FC="nvfortran" - export CC="nvc" - export CXX="nvc++" - echo "Environment variables set." -} - -install_nvidiahpc() -{ - local platform=$1 - case $platform in - linux*) - install_nvidiahpc_apt $version - ;; - darwin*) - echo "NVIDIA HPC SDK is not supported on macOS." - exit 1 - ;; - mingw*) - echo "NVIDIA HPC SDK is not supported on Windows." - exit 1 - ;; - msys*) - echo "NVIDIA HPC SDK is not supported on MSYS." - exit 1 - ;; - cygwin*) - echo "NVIDIA HPC SDK is not supported on Cygwin." - exit 1 - ;; - *) - echo "Unsupported platform: $platform" - exit 1 - ;; - esac } -install_lfortran_lin() +install_lfortran_l() { local version=$1 - - # install miniconda - install_miniconda_lin - - # create conda environment for lfortran - conda create -n lf - eval "$(conda shell.bash hook)" - conda activate lf - - # install lfortran - conda install -y lfortran=$version -c conda-forge - - # add lfortran to PATH - cat >> $GITHUB_ENV <> $GITHUB_PATH - done - - # set environment variables - export FC="lfortran" - # export CC="" - # export CXX="" + export CC="gcc" + export CXX="g++" + export CONDA=conda + $CONDA install -c conda-forge -n base -y lfortran=$version } -install_lfortran_win() +install_lfortran_w() { local version=$1 - - # install miniconda - install_miniconda_win - - # install lfortran in conda environment lf - C:/ProgramData/Miniconda3/Scripts/conda.exe create -n lf - C:/ProgramData/Miniconda3/Scripts/conda.exe install -n lf -y lfortran=$version -c conda-forge - - # check lfortran version - C:/ProgramData/Miniconda3/envs/lf/Library/bin/lfortran.exe -h - - # set environment variables - export FC="lfortran" - # export CC="" - # export CXX="" + export CC="cl" + export CXX="cl" + export CONDA=$CONDA\\Scripts\\conda # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#environment-variables + $CONDA install -c conda-forge -n base -y lfortran=$version } -install_lfortran_mac() +install_lfortran_m() { local version=$1 - - # install miniconda - install_miniconda_mac - - # create conda environment for lfortran - conda create -n lf - eval "$(conda shell.bash hook)" - conda activate lf - - # install lfortran - conda install -y lfortran=$version -c conda-forge - - cat >> $GITHUB_ENV <> $GITHUB_PATH - done - - # set environment variables - export FC="lfortran" - # export CC="" - # export CXX="" + install_micromamba_brew + export CC="gcc" + export CXX="g++" + export CONDA_ROOT_PREFIX=$MAMBA_ROOT_PREFIX + export CONDA=micromamba + $CONDA install -c conda-forge -n base -y lfortran=$version } install_lfortran() @@ -785,23 +681,26 @@ install_lfortran() local platform=$1 case $platform in linux*) - install_lfortran_lin $version + install_lfortran_l $version ;; darwin*) - install_lfortran_mac $version + install_lfortran_m $version ;; mingw*) - install_lfortran_win $version + install_lfortran_w $version ;; msys*) - install_lfortran_win $version + install_lfortran_w $version ;; cygwin*) - install_lfortran_win $version + install_lfortran_w $version ;; *) echo "Unsupported platform: $platform" exit 1 ;; esac + + echo $($CONDA run -n base which lfortran | sed 's/lfortran//') >> $GITHUB_PATH + export FC="lfortran" } \ No newline at end of file From 3805115d04d9dda79160e0584e66fecb09c48ae8 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Tue, 26 Mar 2024 17:35:58 -0400 Subject: [PATCH 08/12] update compat files --- .github/compat/compat.csv | 20 ++++++++--------- .github/compat/long_compat.csv | 41 +++++++++++++++++----------------- .github/compat/matrix.yml | 4 ---- README.md | 18 +++++++-------- 4 files changed, 40 insertions(+), 43 deletions(-) diff --git a/.github/compat/compat.csv b/.github/compat/compat.csv index 5c8264f..c1702bb 100644 --- a/.github/compat/compat.csv +++ b/.github/compat/compat.csv @@ -1,10 +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,intel,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,2024.0,20.11,21.11,22.11,23.11,23.3,23.5,23.7,23.9 -runner,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -macos-12,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, -macos-13,✓,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, -macos-14,,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, -ubuntu-20.04,✓,✓,,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ -ubuntu-22.04,✓,✓,✓,✓,,,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ -windows-2019,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, -windows-2022,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, +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,lfortran,lfortran,lfortran,intel-classic,intel,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 +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,0.31.0,0.32.0,0.33.0,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,2024.0,20.11,21.11,22.11,23.11,23.3,23.5,23.7,23.9 +runner,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +macos-12,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +macos-13,✓,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +macos-14,,✓,✓,✓,,,,,,,,,,,,,,,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, +ubuntu-20.04,✓,✓,,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ +ubuntu-22.04,✓,✓,✓,✓,,,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ +windows-2019,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, +windows-2022,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, diff --git a/.github/compat/long_compat.csv b/.github/compat/long_compat.csv index 652e5b4..a18ecc0 100644 --- a/.github/compat/long_compat.csv +++ b/.github/compat/long_compat.csv @@ -1,24 +1,4 @@ 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,✓ @@ -39,6 +19,9 @@ 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-12,lfortran,0.31.0,✓ +macos-12,lfortran,0.32.0,✓ +macos-12,lfortran,0.33.0,✓ macos-13,gcc,10,✓ macos-13,gcc,11,✓ macos-13,gcc,12,✓ @@ -59,6 +42,9 @@ 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,✓ +macos-13,lfortran,0.31.0,✓ +macos-13,lfortran,0.32.0,✓ +macos-13,lfortran,0.33.0,✓ ubuntu-20.04,gcc,10,✓ ubuntu-20.04,gcc,11,✓ ubuntu-20.04,gcc,12, @@ -70,6 +56,9 @@ ubuntu-20.04,gcc,9,✓ macos-14,gcc,11,✓ macos-14,gcc,12,✓ macos-14,gcc,13,✓ +macos-14,lfortran,0.31.0,✓ +macos-14,lfortran,0.32.0,✓ +macos-14,lfortran,0.33.0,✓ ubuntu-20.04,intel-classic,2021.1.2,✓ ubuntu-20.04,intel-classic,2021.1,✓ ubuntu-20.04,intel-classic,2021.10,✓ @@ -106,6 +95,9 @@ 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-20.04,lfortran,0.31.0,✓ +ubuntu-20.04,lfortran,0.32.0,✓ +ubuntu-20.04,lfortran,0.33.0,✓ ubuntu-22.04,gcc,10,✓ ubuntu-22.04,gcc,11,✓ ubuntu-22.04,gcc,12,✓ @@ -150,6 +142,9 @@ 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,✓ +ubuntu-22.04,lfortran,0.31.0,✓ +ubuntu-22.04,lfortran,0.32.0,✓ +ubuntu-22.04,lfortran,0.33.0,✓ windows-2019,gcc,10,✓ windows-2019,gcc,11,✓ windows-2019,gcc,12,✓ @@ -182,6 +177,9 @@ windows-2019,intel,2023.0,✓ windows-2019,intel,2023.1,✓ windows-2019,intel,2023.2,✓ windows-2019,intel,2024.0,✓ +windows-2019,lfortran,0.31.0,✓ +windows-2019,lfortran,0.32.0,✓ +windows-2019,lfortran,0.33.0,✓ windows-2022,gcc,10,✓ windows-2022,gcc,11,✓ windows-2022,gcc,12,✓ @@ -214,3 +212,6 @@ windows-2022,intel,2023.0,✓ windows-2022,intel,2023.1,✓ windows-2022,intel,2023.2,✓ windows-2022,intel,2024.0,✓ +windows-2022,lfortran,0.31.0,✓ +windows-2022,lfortran,0.32.0,✓ +windows-2022,lfortran,0.33.0,✓ \ No newline at end of file diff --git a/.github/compat/matrix.yml b/.github/compat/matrix.yml index 1eba068..f81d649 100644 --- a/.github/compat/matrix.yml +++ b/.github/compat/matrix.yml @@ -72,8 +72,6 @@ exclude: toolchain: {compiler: intel} - os: macos-12 toolchain: {compiler: intel} - - os: macos-11 - toolchain: {compiler: intel} # nvidia-hpc not available for mac - os: macos-14 toolchain: {compiler: nvidia-hpc} @@ -81,8 +79,6 @@ exclude: 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} diff --git a/README.md b/README.md index ed2cfee..73b47bb 100644 --- a/README.md +++ b/README.md @@ -103,15 +103,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 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 | intel 2024.0 | nvidia-hpc 20.11 | nvidia-hpc 21.11 | 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-12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | -| macos-13 | ✓ | ✓ | ✓ | ✓ | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | -| macos-14 | | ✓ | ✓ | ✓ | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | -| 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 | lfortran 0.31.0 | lfortran 0.32.0 | lfortran 0.33.0 | 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 | intel 2024.0 | nvidia-hpc 20.11 | nvidia-hpc 21.11 | 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-12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| macos-13 | ✓ | ✓ | ✓ | ✓ | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| macos-14 | | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | +| ubuntu-20.04 | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ubuntu-22.04 | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| windows-2019 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | +| windows-2022 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | ✓ | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | **Note:** Intel's `ifx` compiler is not supported on macOS, so the `intel` option redirects to `intel-classic` (`ifort`). From 920cd470d83fe4fcc18472419fcbb8a2b2aa73b3 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Tue, 26 Mar 2024 17:42:39 -0400 Subject: [PATCH 09/12] remove duplicated code --- setup-fortran.sh | 50 ------------------------------------------------ 1 file changed, 50 deletions(-) diff --git a/setup-fortran.sh b/setup-fortran.sh index a5d5bfd..5bb083c 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -597,56 +597,6 @@ install_nvidiahpc() export CXX="nvc++" } -export_nvidiahpc_vars() -{ - local version=$1 - - # to convert version format from X.Y to X-Y - local cversion=$(echo "$version" | tr '.' '-') - - cat >> $GITHUB_ENV <> $GITHUB_PATH - done -} - -install_nvidiahpc_apt() -{ - local version=$1 - - # install environment-modules - install_environment_modules_apt - - # to convert version format from X.Y to X-Y - local cversion=$(echo "$version" | tr '.' '-') - - # install NVIDIA HPC SDK - echo "Installing NVIDIA HPC SDK $version..." - curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg - echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list - sudo apt-get update -y - sudo apt-get install -y nvhpc-$cversion - echo "NVIDIA HPC SDK $version installed." - - # load NVIDIA HPC SDK module - echo "Loading NVIDIA HPC SDK $version module..." - NVCOMPILERS=/opt/nvidia/hpc_sdk; export NVCOMPILERS - export MODULEPATH=$NVCOMPILERS/modulefiles:$MODULEPATH - module load nvhpc - echo "NVIDIA HPC SDK $version module loaded." - - # set environment variables - echo "Setting environment variables..." - export_nvidiahpc_vars $version -} - install_lfortran_l() { local version=$1 From 674d21f333d5d8a438b7c9b21ca0f8c37b642864 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Tue, 26 Mar 2024 18:18:41 -0400 Subject: [PATCH 10/12] use setup-micromamba on mac --- action.yml | 9 +++++++++ setup-fortran.sh | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index b6ddbe0..8c48d3b 100644 --- a/action.yml +++ b/action.yml @@ -42,6 +42,15 @@ runs: path: ${{ env.ONEAPI_ROOT }} key: ${{ runner.os }}-${{ inputs.compiler }}-${{ inputs.version }}-${{ steps.get-date.outputs.date }} + - uses: mamba-org/setup-micromamba@v1 + if: runner.os == 'macOS' && contains(inputs.compiler, 'lfortran') + with: + init-shell: >- + bash + powershell + cmd.exe + post-cleanup: 'all' + # Set up the selected toolchain or compiler - name: Setup toolchain id: setup diff --git a/setup-fortran.sh b/setup-fortran.sh index 5bb083c..14c3307 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -25,11 +25,6 @@ install_environment_modules_apt() { echo "Environment modules set up completed." } -install_micromamba_brew() { - brew install micromamba - micromamba shell init -} - install_gcc_brew() { # check if gcc preinstalled via brew @@ -618,7 +613,6 @@ install_lfortran_w() install_lfortran_m() { local version=$1 - install_micromamba_brew export CC="gcc" export CXX="g++" export CONDA_ROOT_PREFIX=$MAMBA_ROOT_PREFIX From 09163ef951dc48679669898bc746095a67d4ee64 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Tue, 26 Mar 2024 18:30:57 -0400 Subject: [PATCH 11/12] fix shell selection --- action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 8c48d3b..85227f1 100644 --- a/action.yml +++ b/action.yml @@ -45,10 +45,7 @@ runs: - uses: mamba-org/setup-micromamba@v1 if: runner.os == 'macOS' && contains(inputs.compiler, 'lfortran') with: - init-shell: >- - bash - powershell - cmd.exe + init-shell: bash post-cleanup: 'all' # Set up the selected toolchain or compiler From aaffa486f4a37e46d15bcf6c1d71e2f76b5acdb6 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Tue, 26 Mar 2024 20:20:50 -0400 Subject: [PATCH 12/12] fix compat files --- .github/compat/compat.csv | 18 ++++---- .github/compat/long_compat.csv | 63 ++++++++++++++++++--------- .github/compat/wide_compat_reports.py | 2 +- README.md | 20 +++++---- action.yml | 1 + 5 files changed, 65 insertions(+), 39 deletions(-) diff --git a/.github/compat/compat.csv b/.github/compat/compat.csv index c1702bb..1c1f18e 100644 --- a/.github/compat/compat.csv +++ b/.github/compat/compat.csv @@ -1,10 +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,lfortran,lfortran,lfortran,intel-classic,intel,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 -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,0.31.0,0.32.0,0.33.0,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,2024.0,20.11,21.11,22.11,23.11,23.3,23.5,23.7,23.9 +compiler,gcc,gcc,gcc,gcc,gcc,gcc,gcc,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,intel-classic,lfortran,lfortran,lfortran,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.1.2,2021.2,2021.4,2022.0,2022.1,2022.2,2022.2.1,2023.0,2023.1,2023.2,2024.0,2021.1,2021.1.2,2021.10,2021.2,2021.3,2021.4,2021.5,2021.6,2021.7,2021.7.1,2021.8,2021.9,0.31.0,0.32.0,0.33.0,20.11,21.11,22.11,23.11,23.3,23.5,23.7,23.9 runner,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -macos-12,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, -macos-13,✓,✓,✓,✓,,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, -macos-14,,✓,✓,✓,,,,,,,,,,,,,,,✓,✓,✓,,,,,,,,,,,,,,,,,,,,, -ubuntu-20.04,✓,✓,,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ -ubuntu-22.04,✓,✓,✓,✓,,,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ -windows-2019,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, -windows-2022,✓,✓,✓,✓,,✓,✓,,✓,,,,,✓,,✓,✓,✓,✓,✓,✓,,,,,,,✓,,✓,✓,✓,✓,✓,,,,,,,, +macos-12,✓,✓,✓,✓,✓,✓,✓,,,,,,,,,,,,,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,, +macos-13,✓,✓,✓,✓,,,,,,,,,,,,,,,,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,, +macos-14,,✓,✓,✓,,,,,,,,,,,,,,,,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,,,,,,, +ubuntu-20.04,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ +ubuntu-22.04,✓,✓,✓,✓,,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓,✓ +windows-2019,✓,✓,✓,✓,,✓,✓,,,,,,✓,✓,,✓,✓,✓,✓,,,✓,,,,,✓,✓,,✓,✓,✓,✓,✓,,,,,,,, +windows-2022,✓,✓,✓,✓,,✓,✓,,,,,,✓,✓,,✓,✓,✓,✓,,,✓,,,,,✓,✓,,✓,✓,✓,✓,✓,,,,,,,, diff --git a/.github/compat/long_compat.csv b/.github/compat/long_compat.csv index a18ecc0..c58a541 100644 --- a/.github/compat/long_compat.csv +++ b/.github/compat/long_compat.csv @@ -3,7 +3,6 @@ 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,✓ @@ -26,10 +25,8 @@ 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,✓ @@ -45,20 +42,32 @@ macos-13,intel-classic,2021.9,✓ macos-13,lfortran,0.31.0,✓ macos-13,lfortran,0.32.0,✓ macos-13,lfortran,0.33.0,✓ +macos-14,gcc,11,✓ +macos-14,gcc,12,✓ +macos-14,gcc,13,✓ +macos-14,gcc,7, +macos-14,intel-classic,2021.1.2, +macos-14,intel-classic,2021.1,✓ +macos-14,intel-classic,2021.10,✓ +macos-14,intel-classic,2021.2,✓ +macos-14,intel-classic,2021.3,✓ +macos-14,intel-classic,2021.4,✓ +macos-14,intel-classic,2021.5,✓ +macos-14,intel-classic,2021.6,✓ +macos-14,intel-classic,2021.7.1,✓ +macos-14,intel-classic,2021.7,✓ +macos-14,intel-classic,2021.8,✓ +macos-14,intel-classic,2021.9,✓ +macos-14,lfortran,0.31.0,✓ +macos-14,lfortran,0.32.0,✓ +macos-14,lfortran,0.33.0,✓ 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,✓ -macos-14,gcc,11,✓ -macos-14,gcc,12,✓ -macos-14,gcc,13,✓ -macos-14,lfortran,0.31.0,✓ -macos-14,lfortran,0.32.0,✓ -macos-14,lfortran,0.33.0,✓ ubuntu-20.04,intel-classic,2021.1.2,✓ ubuntu-20.04,intel-classic,2021.1,✓ ubuntu-20.04,intel-classic,2021.10,✓ @@ -83,26 +92,35 @@ ubuntu-20.04,intel,2023.0,✓ ubuntu-20.04,intel,2023.1,✓ ubuntu-20.04,intel,2023.2,✓ ubuntu-20.04,intel,2024.0,✓ +ubuntu-20.04,lfortran,0.31.0,✓ +ubuntu-20.04,lfortran,0.32.0,✓ +ubuntu-20.04,lfortran,0.33.0,✓ 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,21.3, +ubuntu-20.04,nvidia-hpc,21.5, +ubuntu-20.04,nvidia-hpc,21.7, +ubuntu-20.04,nvidia-hpc,21.9, ubuntu-20.04,nvidia-hpc,22.1, ubuntu-20.04,nvidia-hpc,22.11,✓ +ubuntu-20.04,nvidia-hpc,22.2, +ubuntu-20.04,nvidia-hpc,22.3, +ubuntu-20.04,nvidia-hpc,22.5, +ubuntu-20.04,nvidia-hpc,22.7, +ubuntu-20.04,nvidia-hpc,22.9, +ubuntu-20.04,nvidia-hpc,23.1, 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-20.04,lfortran,0.31.0,✓ -ubuntu-20.04,lfortran,0.32.0,✓ -ubuntu-20.04,lfortran,0.33.0,✓ 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,✓ @@ -130,26 +148,32 @@ ubuntu-22.04,intel,2023.0,✓ ubuntu-22.04,intel,2023.1,✓ ubuntu-22.04,intel,2023.2,✓ ubuntu-22.04,intel,2024.0,✓ +ubuntu-22.04,lfortran,0.31.0,✓ +ubuntu-22.04,lfortran,0.32.0,✓ +ubuntu-22.04,lfortran,0.33.0,✓ 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,21.7, ubuntu-22.04,nvidia-hpc,22.1, ubuntu-22.04,nvidia-hpc,22.11,✓ +ubuntu-22.04,nvidia-hpc,22.2, +ubuntu-22.04,nvidia-hpc,22.3, +ubuntu-22.04,nvidia-hpc,22.5, +ubuntu-22.04,nvidia-hpc,22.7, +ubuntu-22.04,nvidia-hpc,22.9, +ubuntu-22.04,nvidia-hpc,23.1, 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,✓ -ubuntu-22.04,lfortran,0.31.0,✓ -ubuntu-22.04,lfortran,0.32.0,✓ -ubuntu-22.04,lfortran,0.33.0,✓ 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,✓ @@ -184,7 +208,6 @@ 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,✓ @@ -214,4 +237,4 @@ windows-2022,intel,2023.2,✓ windows-2022,intel,2024.0,✓ windows-2022,lfortran,0.31.0,✓ windows-2022,lfortran,0.32.0,✓ -windows-2022,lfortran,0.33.0,✓ \ No newline at end of file +windows-2022,lfortran,0.33.0,✓ diff --git a/.github/compat/wide_compat_reports.py b/.github/compat/wide_compat_reports.py index 97b495f..6b67479 100644 --- a/.github/compat/wide_compat_reports.py +++ b/.github/compat/wide_compat_reports.py @@ -22,7 +22,7 @@ index="runner", columns=["compiler", "version"], values="support", - sort=False, + sort=True, aggfunc="first", ).sort_values(by=["runner"]) diff --git a/README.md b/README.md index 73b47bb..6ba5773 100644 --- a/README.md +++ b/README.md @@ -103,19 +103,21 @@ 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 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 | lfortran 0.31.0 | lfortran 0.32.0 | lfortran 0.33.0 | 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 | intel 2024.0 | nvidia-hpc 20.11 | nvidia-hpc 21.11 | 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-12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | -| macos-13 | ✓ | ✓ | ✓ | ✓ | | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | -| macos-14 | | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | | | | | | | -| 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 2021.1 | intel 2021.1.2 | intel 2021.2 | intel 2021.4 | intel 2022.0 | intel 2022.1 | intel 2022.2 | intel 2022.2.1 | intel 2023.0 | intel 2023.1 | intel 2023.2 | intel 2024.0 | intel-classic 2021.1 | intel-classic 2021.1.2 | 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 | intel-classic 2021.7.1 | intel-classic 2021.8 | intel-classic 2021.9 | lfortran 0.31.0 | lfortran 0.32.0 | lfortran 0.33.0 | nvidia-hpc 20.11 | nvidia-hpc 21.11 | 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-12 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | +| macos-13 | ✓ | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | +| macos-14 | | ✓ | ✓ | ✓ | | | | | | | | | | | | | | | | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | +| ubuntu-20.04 | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| ubuntu-22.04 | ✓ | ✓ | ✓ | ✓ | | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| windows-2019 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | | | | | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | | | ✓ | | | | | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | +| windows-2022 | ✓ | ✓ | ✓ | ✓ | | ✓ | ✓ | | | | | | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | | | ✓ | | | | | ✓ | ✓ | | ✓ | ✓ | ✓ | ✓ | ✓ | | | | | | | | | **Note:** Intel's `ifx` compiler is not supported on macOS, so the `intel` option redirects to `intel-classic` (`ifort`). +**Note:** LFortran is currently only discoverable by name with `bash` on Windows, see [here for context](https://github.com/fortran-lang/setup-fortran/pull/57#issuecomment-2021605094). + ## License Licensed under the Apache License, Version 2.0 (the “License”); diff --git a/action.yml b/action.yml index 85227f1..728a8f7 100644 --- a/action.yml +++ b/action.yml @@ -42,6 +42,7 @@ runs: path: ${{ env.ONEAPI_ROOT }} key: ${{ runner.os }}-${{ inputs.compiler }}-${{ inputs.version }}-${{ steps.get-date.outputs.date }} + # used to install lfortran on mac - uses: mamba-org/setup-micromamba@v1 if: runner.os == 'macOS' && contains(inputs.compiler, 'lfortran') with: