Skip to content

Commit 7edfe1c

Browse files
committed
250823.074043.CST [skip ci] revise test_ifort.yml and test_ifx.yml to use [[:space:]] instead of \s in sed, because macOS (BSD) sed does not recoganize the latter
1 parent bdacaf7 commit 7edfe1c

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

.github/workflows/profile_compiler_options.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
- name: Revise setup_compiler_options to print the revised mexopt file
106106
run: |
107107
cd matlab/tests/private || exit 1
108-
sed -i "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
108+
$SEDI "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
109109
110110
- name: Conduct the test
111111
uses: matlab-actions/[email protected]

.github/workflows/profile_infnan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
- name: Revise setup_compiler_options to print the revised mexopt file
111111
run: |
112112
cd matlab/tests/private || exit 1
113-
sed -i "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
113+
$SEDI "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
114114
115115
- name: Conduct the test
116116
uses: matlab-actions/[email protected]

.github/workflows/profile_integer_kind.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,17 +105,17 @@ jobs:
105105

106106
- name: Revise the Fortran code to use the intended integer kind. Do NOT use `options.integer_kind`, because it will change the integer kind for the competitor as well.
107107
run: |
108-
sed -i "s|#define PRIMA_INTEGER_KIND 0|#define PRIMA_INTEGER_KIND ${{ matrix.ik }}|g" fortran/common/ppf.h
108+
$SEDI "s|#define PRIMA_INTEGER_KIND 0|#define PRIMA_INTEGER_KIND ${{ matrix.ik }}|g" fortran/common/ppf.h
109109
110110
- name: Revise get_solvers.m to print the revised header file
111111
run: |
112112
cd matlab/tests/private || exit 1
113-
sed -i "s|\(^.*\)\(setup(solver.*$\)|\1header_file\n\1system(['cat ', header_file]);\n\1\2|" get_solvers.m
113+
$SEDI "s|\(^.*\)\(setup(solver.*$\)|\1header_file\n\1system(['cat ', header_file]);\n\1\2|" get_solvers.m
114114
115115
- name: Revise setup_compiler_options.m to print the revised mexopt file
116116
run: |
117117
cd matlab/tests/private || exit 1
118-
sed -i "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
118+
$SEDI "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
119119
120120
- name: Conduct the test
121121
uses: matlab-actions/[email protected]

.github/workflows/profile_npt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
run: |
142142
# The following modification is to show x, fx, funx, etc when the error InvalidFX occurs.
143143
cd matlab/interfaces/private || exit 42
144-
sed -i "s|\(^\s*if ~(isnan(fx) && isnan(funx))\)|format long; x, fx, funx, abs(fx-funx)/max(1, abs(fx)), bobyqa_prec, cobyla_prec\n\1|" postprima.m
144+
$SEDI "s|\(^\s*if ~(isnan(fx) && isnan(funx))\)|format long; x, fx, funx, abs(fx-funx)/max(1, abs(fx)), bobyqa_prec, cobyla_prec\n\1|" postprima.m
145145
cat postprima.m
146146
147147
- name: Conduct the test

.github/workflows/test_ifort.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,18 @@ jobs:
8080
- name: Revise bign
8181
run: |
8282
cd fortran/tests
83-
$SEDI 's|::\s*bign\s*=.*$|:: bign = 200_IK|' test_bobyqa.f90
83+
$SEDI 's|::[[:space:]]*bign[[:space:]]*=.*$|:: bign = 200_IK|' test_bobyqa.f90
8484
8585
- name: Revise cobyla/trustregion.f90 to see what is wrong with ubuntu-latest, i8, cobyla, -O3, small
8686
if: ${{ matrix.os == 'ubuntu-latest' && matrix.solver == 'cobyla' && matrix.testdim == 'small' }}
8787
shell: bash
8888
run: |
8989
cd fortran/cobyla || exit 42
90-
sed -i 's|\(vmultc = cviol + b\)|\1;write(\*,\*) 253, vmultc|' trustregion.f90
91-
sed -i "s|\(call assert(all(vmultc >= 0), 'VMULTC >= 0', srname)\)|write(\*,\*) 304, vmultc;\1|" trustregion.f90
92-
sed -i 's|\(vmultc(1:nact) = max(ZERO, vmultc(1:nact) - frac \* vmultd(1:nact))\)|\1;write(\*,\*) 367, vmultc|' trustregion.f90
93-
sed -i 's|\(vmultc(\[icon, nact\]) = \[ZERO, frac\]\)|\1;write(\*,\*) 377, vmultc|' trustregion.f90
94-
sed -i 's|\(vmultc = max(ZERO, (ONE - frac) \* vmultc + frac \* vmultd)\)|\1;write(\*,\*) 557, vmultc|' trustregion.f90
90+
$SEDI 's|\(vmultc = cviol + b\)|\1;write(\*,\*) 253, vmultc|' trustregion.f90
91+
$SEDI "s|\(call assert(all(vmultc >= 0), 'VMULTC >= 0', srname)\)|write(\*,\*) 304, vmultc;\1|" trustregion.f90
92+
$SEDI 's|\(vmultc(1:nact) = max(ZERO, vmultc(1:nact) - frac \* vmultd(1:nact))\)|\1;write(\*,\*) 367, vmultc|' trustregion.f90
93+
$SEDI 's|\(vmultc(\[icon, nact\]) = \[ZERO, frac\]\)|\1;write(\*,\*) 377, vmultc|' trustregion.f90
94+
$SEDI 's|\(vmultc = max(ZERO, (ONE - frac) \* vmultc + frac \* vmultd)\)|\1;write(\*,\*) 557, vmultc|' trustregion.f90
9595
cat trustregion.f90
9696
9797
- name: Conduct the test

.github/workflows/test_ifx.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ jobs:
8181
- name: Revise bign
8282
run: |
8383
cd fortran/tests
84-
$SEDI 's|::\s*bign\s*=.*$|:: bign = 200_IK|' test_newuoa.f90
85-
$SEDI 's|::\s*bign\s*=.*$|:: bign = 200_IK|' test_bobyqa.f90
86-
$SEDI 's|::\s*bign\s*=.*$|:: bign = 200_IK|' test_lincoa.f90
87-
$SEDI 's|::\s*bign\s*=.*$|:: bign = 70_IK|' test_uobyqa.f90
88-
$SEDI 's|::\s*bign\s*=.*$|:: bign = 70_IK|' test_cobyla.f90
84+
$SEDI 's|::[[:space:]]*bign[[:space:]]*=.*$|:: bign = 200_IK|' test_newuoa.f90
85+
$SEDI 's|::[[:space:]]*bign[[:space:]]*=.*$|:: bign = 200_IK|' test_bobyqa.f90
86+
$SEDI 's|::[[:space:]]*bign[[:space:]]*=.*$|:: bign = 200_IK|' test_lincoa.f90
87+
$SEDI 's|::[[:space:]]*bign[[:space:]]*=.*$|:: bign = 70_IK|' test_uobyqa.f90
88+
$SEDI 's|::[[:space:]]*bign[[:space:]]*=.*$|:: bign = 70_IK|' test_cobyla.f90
8989
9090
- name: Conduct the test
9191
shell: bash

.github/workflows/verify_big.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ jobs:
101101
- name: Revise get_solvers.m to print the revised header file
102102
run: |
103103
cd matlab/tests/private || exit 1
104-
sed -i "s|\(^.*\)\(setup(solver.*$\)|\1header_file\n\1system(['cat ', header_file]);\n\1\2|" get_solvers.m
104+
$SEDI "s|\(^.*\)\(setup(solver.*$\)|\1header_file\n\1system(['cat ', header_file]);\n\1\2|" get_solvers.m
105105
106106
- name: Revise setup_compiler_options. to print the revised mexopt file
107107
run: |
108108
cd matlab/tests/private || exit 1
109-
sed -i "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
109+
$SEDI "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
110110
111111
- name: Conduct the test
112112
uses: matlab-actions/[email protected]

.github/workflows/verify_large.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ jobs:
100100
- name: Revise get_solvers.m to print the revised header file
101101
run: |
102102
cd matlab/tests/private || exit 1
103-
sed -i "s|\(^.*\)\(setup(solver.*$\)|\1header_file\n\1system(['cat ', header_file]);\n\1\2|" get_solvers.m
103+
$SEDI "s|\(^.*\)\(setup(solver.*$\)|\1header_file\n\1system(['cat ', header_file]);\n\1\2|" get_solvers.m
104104
105105
- name: Revise setup_compiler_options.m to print the revised mexopt file
106106
run: |
107107
cd matlab/tests/private || exit 1
108-
sed -i "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
108+
$SEDI "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
109109
110110
- name: Conduct the test
111111
uses: matlab-actions/[email protected]

.github/workflows/verify_small.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ jobs:
9999
- name: Revise get_solvers.m to print the revised header file
100100
run: |
101101
cd matlab/tests/private || exit 1
102-
sed -i "s|\(^.*\)\(setup(solver.*$\)|\1header_file\n\1system(['cat ', header_file]);\n\1\2|" get_solvers.m
102+
$SEDI "s|\(^.*\)\(setup(solver.*$\)|\1header_file\n\1system(['cat ', header_file]);\n\1\2|" get_solvers.m
103103
104104
- name: Revise setup_compiler_options.m to print the revised mexopt file
105105
run: |
106106
cd matlab/tests/private || exit 1
107-
sed -i "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
107+
$SEDI "s|return|for ifile = 1 : length(config_files), ifile, cfile = fullfile(config_dir, config_files{ifile}) , system(['cat ', cfile]); end|" set_compiler_options.m
108108
109109
- name: Conduct the test
110110
uses: matlab-actions/[email protected]

0 commit comments

Comments
 (0)