Skip to content

Commit 2bc384c

Browse files
authored
fix: multiple minor fixes (#29)
* fix: set SETVARS_COMPLETED after installing/activating Intel toolchain, don't unset local variable in install_intel_apt bash function, test intel and intel-classic on ubuntu-20.04 * include SETVARS_COMPLETED in export_intel_vars, add explanatory comment in install_intel_win" * set CXX on intel/windows, cleanup * ifx 2021.3 install fails on ubuntu
1 parent 5f9d8c3 commit 2bc384c

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

.github/workflows/test.yml

+8
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ jobs:
3838
- {compiler: gcc, version: 6}
3939
# {compiler: gcc, version: 5}
4040
include:
41+
- {os: ubuntu-20.04, toolchain: {compiler: intel, version: '2023.2'}}
42+
- {os: ubuntu-20.04, toolchain: {compiler: intel, version: '2022.2.1'}}
43+
- {os: ubuntu-20.04, toolchain: {compiler: intel, version: '2021.4'}}
44+
4145
- {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2023.2'}}
4246
# {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2023.1'}}
4347
# {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2023.0'}}
@@ -51,6 +55,10 @@ jobs:
5155
# {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2021.1.2'}}
5256
# {os: ubuntu-22.04, toolchain: {compiler: intel, version: '2021.1'}}
5357

58+
- {os: ubuntu-20.04, toolchain: {compiler: intel-classic, version: '2021.10'}}
59+
- {os: ubuntu-20.04, toolchain: {compiler: intel-classic, version: '2021.7.1'}}
60+
- {os: ubuntu-20.04, toolchain: {compiler: intel-classic, version: '2021.4'}}
61+
5462
- {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.10'}}
5563
# {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.9'}}
5664
# {os: ubuntu-22.04, toolchain: {compiler: intel-classic, version: '2021.8'}}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ Supported Intel toolchains:
102102

103103
| runner | compiler | version |
104104
| :-------- | :------------- | :------ |
105-
| ubuntu-\* | intel | 2023.2, 2023.1, 2023.0, <br/> 2022.2.1, 2022.2, 2022.1, 2022.0, <br/> 2021.4, 2021.3, 2021.2, 2021.1.2, 2021.1 |
105+
| ubuntu-\* | intel | 2023.2, 2023.1, 2023.0, <br/> 2022.2.1, 2022.2, 2022.1, 2022.0, <br/> 2021.4, 2021.2, 2021.1.2, 2021.1 |
106106
| ubuntu-\* | intel-classic | 2021.10, 2021.9, 2021.8, <br/> 2021.7.1, 2021.7, 2021.6, 2021.5, <br/> 2021.4, 2021.3, 2021.2, 2021.1.2, 2021.1 |
107107
| macos-\* | intel-classic | 2021.10, 2021.9, 2021.8, <br/> 2021.7.1, 2021.7, 2021.6, 2021.5, <br/> 2021.4, 2021.3, 2021.2, 2021.1 |
108108
| windows-\* | intel | 2023.2, 2023.1, 2023.0, 2022.2.0, 2022.1.0 |
109109
| windows-\* | intel-classic | 2021.10.0, 2021.9.0, 2021.8.0, 2021.7.0, 2021.6.0 |
110110

111-
**Note:** on macOS the `intel`/`ifx` compiler option is not suppoted, only `intel-classic` with the `ifort` compiler.
111+
**Note:** on macOS the `intel`/`ifx` compiler option is not supported, only `intel-classic` with the `ifort` compiler.
112112

113113
## License
114114

action.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -117,22 +117,25 @@ runs:
117117
echo cc=icx>>$GITHUB_OUTPUT
118118
echo FC=ifx>>$GITHUB_ENV
119119
echo CC=icx>>$GITHUB_ENV
120+
echo CXX=icx>>$GITHUB_ENV
120121
elif [[ "${{ inputs.compiler }}" == "intel-classic" ]]; then
121122
echo fc=ifort>>$GITHUB_OUTPUT
122123
echo cc=icl>>$GITHUB_OUTPUT
123124
echo FC=ifort>>$GITHUB_ENV
124125
echo CC=icl>>$GITHUB_ENV
126+
echo CXX=icl>>$GITHUB_ENV
125127
else
126128
echo fc=$FC>>$GITHUB_OUTPUT
127129
echo cc=$CC>>$GITHUB_OUTPUT
128-
echo FC=$FC>>$GITHUB_ENV%
129-
echo CC=$CC>>$GITHUB_ENV%
130130
fi
131131
else
132132
echo fc=$FC>>$GITHUB_OUTPUT
133133
echo cc=$CC>>$GITHUB_OUTPUT
134-
echo FC=$FC>>$GITHUB_ENV
135-
echo CC=$CC>>$GITHUB_ENV
134+
fi
135+
136+
# intel oneapi flag to indicate env has been activated
137+
if [[ "${{ inputs.compiler }}" =~ "intel" ]]; then
138+
echo SETVARS_COMPLETED=1>>$GITHUB_ENV
136139
fi
137140
138141
# GitHub Actions prepends GNU linker to the PATH before all bash steps, hide it so MSVC linker is found

setup-fortran.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH
131131
OCL_ICD_FILENAMES=$OCL_ICD_FILENAMES
132132
INTEL_PYTHONHOME=$INTEL_PYTHONHOME
133133
CPATH=$CPATH
134+
SETVARS_COMPLETED=$SETVARS_COMPLETED
134135
EOF
135136
for path in ${PATH//:/ }; do
136137
echo $path >> $GITHUB_PATH
@@ -180,7 +181,7 @@ intel_version_map_l()
180181
2022.0.0 | 2022.0)
181182
version=2022.0.2
182183
;;
183-
2023.2 | 2023.1 | 2023.0 | 2022.2 | 2022.1 | 2021.4 | 2021.3 | 2021.2)
184+
2023.2 | 2023.1 | 2023.0 | 2022.2 | 2022.1 | 2021.4 | 2021.2)
184185
version=$actual_version.0
185186
;;
186187
2021.1)
@@ -281,7 +282,6 @@ install_intel_apt()
281282
$fetch https://apt.repos.intel.com/intel-gpg-keys/$_KEY > $_KEY
282283
sudo apt-key add $_KEY
283284
rm $_KEY
284-
unset $_KEY
285285
echo "deb https://apt.repos.intel.com/oneapi all main" \
286286
| sudo tee /etc/apt/sources.list.d/oneAPI.list
287287
sudo apt-get update
@@ -427,6 +427,10 @@ install_intel_win()
427427
esac
428428

429429
"$GITHUB_ACTION_PATH/install-intel-windows.bat" $WINDOWS_HPCKIT_URL
430+
431+
# don't call export_intel_vars here because the install may have
432+
# been restored from cache. export variables in action.yml after
433+
# installation or cache restore.
430434
}
431435

432436
install_intel()

0 commit comments

Comments
 (0)