-
Notifications
You must be signed in to change notification settings - Fork 3
143 lines (121 loc) · 5.16 KB
/
ci-intel.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Parts of configuration file are based on the examples in this repository:
# https://github.com/oneapi-src/oneapi-ci
#
# Which have the following copyright:
# SPDX-FileCopyrightText: 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
name: Intel compiler
on:
push:
branches:
- develop
pull_request:
branches:
- develop
env:
WINDOWS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18578/w_HPCKit_p_2022.1.3.145_offline.exe
LINUX_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18479/l_HPCKit_p_2022.1.2.117_offline.sh
MACOS_HPCKIT_URL: https://registrationcenter-download.intel.com/akdlm/irc_nas/18341/m_HPCKit_p_2022.1.0.86_offline.dmg
WINDOWS_FORTRAN_COMPONENTS: intel.oneapi.win.ifort-compiler
LINUX_FORTRAN_COMPONENTS_WEB: intel.oneapi.lin.ifort-compiler
MACOS_FORTRAN_COMPONENTS: intel.oneapi.mac.ifort-compiler
WINDOWS_CPP_COMPONENTS: intel.oneapi.win.cpp-compiler
LINUX_CPP_COMPONENTS: intel.oneapi.lin.dpcpp-cpp-compiler-pro
MACOS_CPP_COMPONENTS: intel.oneapi.mac.cpp-compiler
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
os_script: ifortvars_linux.sh
- os: macos-latest
os_script: ifortvars_macos.sh
- os: windows-2019
os_script: ifortvars_windows.bat
defaults:
run:
shell: bash
steps:
- name: set environmental variables on linux and macOS
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
echo "FC=ifort" >> $GITHUB_ENV
echo "CC=icc" >> $GITHUB_ENV
- name: set environmental variables on windows
if: runner.os == 'Windows'
run: |
echo "FC=ifort" >> $GITHUB_ENV
echo "CC=icl" >> $GITHUB_ENV
- name: Checkout repo
uses: actions/[email protected]
- name: setup-conda
uses: s-weigand/[email protected]
with:
update-conda: true
- name: cache install intel compilers on linux
if: runner.os == 'Linux'
id: cache-install-linux
uses: actions/cache@v2
with:
path: |
/opt/intel/oneapi/compiler
key: install-${{ env.LINUX_HPCKIT_URL }}-${{ env.LINUX_CPP_COMPONENTS }}-${{ env.LINUX_FORTRAN_COMPONENTS_WEB }}-compiler-${{ hashFiles('**/.github/intel-scripts/cache_exclude_linux.sh') }}
- name: install intel compilers on linux
if: runner.os == 'Linux' && steps.cache-install-linux.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/install_linux.sh $LINUX_HPCKIT_URL $LINUX_CPP_COMPONENTS:$LINUX_FORTRAN_COMPONENTS_WEB
- name: cache install intel compilers on macos
if: runner.os == 'macOS'
id: cache-install-macos
uses: actions/cache@v2
with:
path: /opt/intel/oneapi
key: install-${{ env.MACOS_HPCKIT_URL }}--${{ env.MACOS_CPP_COMPONENTS }}-${{ env.MACOS_FORTRAN_COMPONENTS }}
- name: install intel compilers on macos
if: runner.os == 'macOS' && steps.cache-install-macos.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/install_macos.sh $MACOS_HPCKIT_URL $MACOS_CPP_COMPONENTS:$MACOS_FORTRAN_COMPONENTS
- name: cache install ifort on windows
if: runner.os == 'Windows'
id: cache-install-windows
uses: actions/cache@v2
with:
path: C:\Program Files (x86)\Intel\oneAPI\compiler
key: install-${{ env.WINDOWS_HPCKIT_URL }}-${{ env.WINDOWS_CPP_COMPONENTS }}-${{ env.WINDOWS_FORTRAN_COMPONENTS }}-compiler-${{ hashFiles('**/.github/intel-scripts/cache_exclude_windows.sh') }}
- name: install intel compilers on windows
if: runner.os == 'Windows' && steps.cache-install-windows.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/install_windows.bat $WINDOWS_HPCKIT_URL $WINDOWS_CPP_COMPONENTS:$WINDOWS_FORTRAN_COMPONENTS
- name: Install python packages
run: |
.github/common/install-python.sh
- name: Print conda version
run: |
conda --version
- name: Print python package versions
run: |
.github/common/python-version.sh
- name: activate intel and and build MODFLOW-2005 on linux and macOS
if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
.github/intel-scripts/${{ matrix.os_script }}
- name: activate intel and build MODFLOW-2005 on Windows
if: runner.os == 'Windows'
run: |
.github/intel-scripts/${{ matrix.os_script }}
- name: Test applications
run: |
nosetests -v --with-id --with-timer -w ./autotest
- name: exclude unused files from cache on linux
if: runner.os == 'Linux' && steps.cache-install-linux.outputs.cache-hit != 'true'
run: |
.github/intel-scripts/cache_exclude_linux.sh
- name: exclude unused files from cache on windows
if: runner.os == 'Windows' && steps.cache-install-windows.outputs.cache-hit != 'true'
shell: bash
run: |
.github/intel-scripts/cache_exclude_windows.sh