-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
92 lines (83 loc) · 3.86 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Cache Intel fortran
description: Cache Intel fortran installation (cross-platform)
runs:
using: composite
steps:
- name: Set install path (Linux & MacOS)
if: runner.os != 'Windows'
id: set-install-path
shell: bash
run: |
echo "::set-output name=install-path::/opt/intel/oneapi"
- name: Set resources (Linux)
id: set-resources-linux
shell: bash
run: |
echo "::set-output name=hpckit_url::https://registrationcenter-download.intel.com/akdlm/irc_nas/18679/l_HPCKit_p_2022.2.0.191_offline.sh"
echo "::set-output name=fortran::intel.oneapi.lin.ifort-compiler"
- name: Cache ifort (Linux)
if: runner.os == 'Linux'
id: cache-install-linux
uses: actions/cache@v3
with:
path: ${{ steps.set-install-path.outputs.install-path }}
key: install-${{ env.HPCKIT_URL }}-${{ env.FORTRAN }}-compiler-${{ hashFiles('**/.github/actions/cache_ifort/action.yml', '**/.github/intel-scripts/cache_exclude_linux.sh') }}
env:
HPCKIT_URL: ${{ steps.set-resources-linux.outputs.hpckit_url }}
FORTRAN: ${{ steps.set-resources-linux.outputs.fortran }}
- name: Install ifort (Linux)
if: runner.os == 'Linux' && steps.cache-install-linux.outputs.cache-hit != 'true'
shell: bash
run: |
.github/intel-scripts/install_linux.sh $HPCKIT_URL $FORTRAN
env:
HPCKIT_URL: ${{ steps.set-resources-linux.outputs.hpckit_url }}
FORTRAN: ${{ steps.set-resources-linux.outputs.fortran }}
- name: Set resources (Mac)
id: set-resources-macos
shell: bash
run: |
echo "::set-output name=hpckit_url::https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18681/m_HPCKit_p_2022.2.0.158_offline.dmg"
echo "::set-output name=fortran::intel.oneapi.mac.ifort-compiler"
- name: Cache ifort (MacOS)
if: runner.os == 'macOS'
id: cache-install-macos
uses: actions/cache@v3
with:
path: ${{ steps.set-install-path.outputs.install-path }}
key: install-${{ env.HPCKIT_URL }}-${{ env.FORTRAN }}-${{ hashFiles('**/.github/actions/cache_ifort/action.yml') }}
env:
HPCKIT_URL: ${{ steps.set-resources-macos.outputs.hpckit_url }}
FORTRAN: ${{ steps.set-resources-macos.outputs.fortran }}
- name: Install ifort (MacOS)
if: runner.os == 'macOS' && steps.cache-install-macos.outputs.cache-hit != 'true'
shell: bash
run: |
.github/intel-scripts/install_macos.sh $HPCKIT_URL $FORTRAN_COMPONENTS
env:
HPCKIT_URL: ${{ steps.set-resources-macos.outputs.hpckit_url }}
FORTRAN: ${{ steps.set-resources-macos.outputs.fortran }}
- name: Set resources (Windows)
id: set-resources-windows
shell: pwsh
run: |
echo "::set-output name=hpckit_url::https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18680/w_HPCKit_p_2022.2.0.173_offline.exe"
echo "::set-output name=fortran::intel.oneapi.win.ifort-compiler"
- name: Cache ifort (Windows)
if: runner.os == 'Windows'
id: cache-install-windows
uses: actions/cache@v3
with:
path: C:\Program Files (x86)\Intel\oneAPI
key: install-${{ env.HPCKIT_URL }}-${{ env.FORTRAN }}-compiler-${{ hashFiles('**/.github/actions/cache_ifort/action.yml', '**/.github/intel-scripts/cache_exclude_windows.sh') }}
env:
HPCKIT_URL: ${{ steps.set-resources-windows.outputs.hpckit_url }}
FORTRAN: ${{ steps.set-resources-windows.outputs.fortran }}
- name: Install ifort (Windows)
if: runner.os == 'Windows' && steps.cache-install-windows.outputs.cache-hit != 'true'
shell: pwsh
run: |
.github/intel-scripts/install_windows.bat $env:HPCKIT_URL $env:FORTRAN
env:
HPCKIT_URL: ${{ steps.set-resources-windows.outputs.hpckit_url }}
FORTRAN: ${{ steps.set-resources-windows.outputs.fortran }}