Skip to content

Commit 5121296

Browse files
committed
feat: add optional fpm version input
- add optional fpm version input to the setup-fortran-conda action - if the fpm version is not provided, the latest version will be installed - avoid using --update-all, --all, and --force-reinstall flags in conda install
1 parent 918857d commit 5121296

File tree

14 files changed

+15
-53
lines changed

14 files changed

+15
-53
lines changed

extra.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ export async function installExtras(env = 'fortran', extras = [], fpmVersion = '
1515
env,
1616
'-c',
1717
'conda-forge',
18-
...pkgs,
19-
'--update-all',
20-
'--all',
21-
'--force-reinstall'
18+
...pkgs
2219
]);
2320
endGroup();
2421

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ async function run() {
2121
const version = process.env.INPUT_COMPILER_VERSION || '';
2222
const platform = (process.env.INPUT_PLATFORM || '').toLowerCase();
2323
const extrasInput = process.env.INPUT_EXTRA_PACKAGES || '';
24+
const fpmVersion = process.env.INPUT_FPM_VERSION || '';
2425

2526
const osKey = platform.includes('ubuntu') ? 'lin'
2627
: platform.includes('windows') ? 'win'
@@ -34,7 +35,7 @@ async function run() {
3435
.split(/[\s,]+/)
3536
.map(p => p.trim())
3637
.filter(Boolean);
37-
await installExtras('fortran', extras);
38+
await installExtras('fortran', extras, fpmVersion);
3839

3940
// Install compiler
4041
const { setup } = await import(`./platform/${osKey}/${compiler}.js`);

platform/lin/flang-new.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ export async function setup(version = '') {
6767
'fortran',
6868
...packages,
6969
'-c',
70-
'conda-forge',
71-
'--update-all',
72-
'--all',
73-
'--force-reinstall'
70+
'conda-forge'
7471
]);
7572
info('Conda packages installed');
7673
} catch (err) {

platform/lin/flang.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ export async function setup(version = '') {
6767
'fortran',
6868
...packages,
6969
'-c',
70-
'conda-forge',
71-
'--update-all',
72-
'--all',
73-
'--force-reinstall'
70+
'conda-forge'
7471
]);
7572
info('Conda packages installed');
7673
} catch (err) {

platform/lin/gfortran.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ export async function setup(version = '') {
6464
'fortran',
6565
...packages,
6666
'-c',
67-
'conda-forge',
68-
'--update-all',
69-
'--all',
70-
'--force-reinstall'
67+
'conda-forge'
7168
]);
7269
info('Conda packages installed');
7370
} catch (err) {

platform/lin/ifx.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ export async function setup(version = '') {
6767
'fortran',
6868
...packages,
6969
'-c', 'https://software.repos.intel.com/python/conda/',
70-
'-c', 'conda-forge',
71-
'--update-all',
72-
'--all',
73-
'--force-reinstall'
70+
'-c', 'conda-forge'
7471
]);
7572
info('Conda packages installed');
7673
} catch (err) {

platform/lin/lfortran.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@ export async function setup(version = '') {
5858
'--yes',
5959
'--name', 'fortran',
6060
...packages,
61-
'-c', 'conda-forge',
62-
'--update-all',
63-
'--all',
64-
'--force-reinstall'
61+
'-c', 'conda-forge'
6562
]);
6663
info('Conda packages installed');
6764
} catch (err) {

platform/mac/gfortran.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ export async function setup(version = '') {
101101
'fortran',
102102
...packages,
103103
'-c',
104-
'conda-forge',
105-
'--update-all',
106-
'--all',
107-
'--force-reinstall'
104+
'conda-forge'
108105
]);
109106
info('Conda packages installed');
110107
} catch (err) {

platform/mac/lfortran.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ export async function setup(version = '') {
7373
'fortran',
7474
...packages,
7575
'-c',
76-
'conda-forge',
77-
'--update-all',
78-
'--all',
79-
'--force-reinstall'
76+
'conda-forge'
8077
]);
8178
info('Conda packages installed');
8279
} catch (err) {

platform/win/flang-new.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,7 @@ export async function setup(version = '') {
145145
'fortran',
146146
...packages,
147147
'-c',
148-
'conda-forge',
149-
'--update-all',
150-
'--all',
151-
'--force-reinstall'
148+
'conda-forge'
152149
]);
153150
info('Conda packages installed');
154151
} catch (err) {

0 commit comments

Comments
 (0)