From f04481841f2d899cb6233ce030fae771f3083726 Mon Sep 17 00:00:00 2001 From: zaikunzhang Date: Sun, 9 Jun 2024 19:33:09 +0800 Subject: [PATCH] 240609.193309.HKT [skip ci] revise verify_big/small/large regarding gfortran setup --- .github/workflows/ss | 13 +++++++++++++ .github/workflows/verify_big.yml | 7 ------- .github/workflows/verify_large.yml | 10 ++++++++-- .github/workflows/verify_small.yml | 11 +++++++++-- 4 files changed, 30 insertions(+), 11 deletions(-) create mode 100755 .github/workflows/ss diff --git a/.github/workflows/ss b/.github/workflows/ss new file mode 100755 index 0000000000..2b11b5eb0a --- /dev/null +++ b/.github/workflows/ss @@ -0,0 +1,13 @@ +#!/bin/bash + +sed -i '/- name: Link gfortran for MATLAB on Linux/,/run: bash .github\/scripts\/link_gfortran \${{\ env.GFORTRAN_VERSION\ }}$/c\ + - name: Set up gfortran on Linux\ + if: startsWith(matrix.os, '\''ubuntu'\'')\ + uses: fortran-lang/setup-fortran@main\ + with:\ + compiler: gcc\ + version: \${{ env.GFORTRAN_VERSION }}\ + - name: Check gfortran version on Linux\ + if: startsWith(matrix.os, '\''ubuntu'\'')\ + run: which gfortran && gfortran --version' \ + $1 diff --git a/.github/workflows/verify_big.yml b/.github/workflows/verify_big.yml index 5c25525137..8ba810ec1b 100644 --- a/.github/workflows/verify_big.yml +++ b/.github/workflows/verify_big.yml @@ -61,21 +61,14 @@ jobs: path: matcutest - name: Set up gfortran on Linux - if: startsWith(matrix.os, 'ubuntu') - uses: fortran-lang/setup-fortran@main - with: - compiler: gcc - version: ${{ env.GFORTRAN_VERSION }} - name: Check gfortran version on Linux - if: startsWith(matrix.os, 'ubuntu') - run: which gfortran && gfortran --version - name: Check MATLAB diff --git a/.github/workflows/verify_large.yml b/.github/workflows/verify_large.yml index 513654946c..6d72abd46b 100644 --- a/.github/workflows/verify_large.yml +++ b/.github/workflows/verify_large.yml @@ -60,9 +60,15 @@ jobs: repository: matcutest/matcutest_compiled path: matcutest - - name: Link gfortran for MATLAB on Linux + - name: Set up gfortran on Linux if: startsWith(matrix.os, 'ubuntu') - run: bash .github/scripts/link_gfortran ${{ env.GFORTRAN_VERSION }} + uses: fortran-lang/setup-fortran@main + with: + compiler: gcc + version: ${{ env.GFORTRAN_VERSION }} + - name: Check gfortran version on Linux + if: startsWith(matrix.os, 'ubuntu') + run: which gfortran && gfortran --version - name: Check MATLAB id: check_matlab diff --git a/.github/workflows/verify_small.yml b/.github/workflows/verify_small.yml index ab2b4d87de..67663043e8 100644 --- a/.github/workflows/verify_small.yml +++ b/.github/workflows/verify_small.yml @@ -59,9 +59,16 @@ jobs: repository: matcutest/matcutest_compiled path: matcutest - - name: Link gfortran for MATLAB on Linux + - name: Set up gfortran on Linux if: startsWith(matrix.os, 'ubuntu') - run: bash .github/scripts/link_gfortran ${{ env.GFORTRAN_VERSION }} + uses: fortran-lang/setup-fortran@main + with: + compiler: gcc + version: ${{ env.GFORTRAN_VERSION }} + + - name: Check gfortran version on Linux + if: startsWith(matrix.os, 'ubuntu') + run: which gfortran && gfortran --version - name: Check MATLAB id: check_matlab