-
Notifications
You must be signed in to change notification settings - Fork 15
118 lines (104 loc) · 3.07 KB
/
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
# This is a GitHub actions workflow for NCEPLIBS-g2.
#
# This builds on the Intel compilers.
#
# Ed Hartnett, 12/22/22, Alex Richert
name: Intel
on:
push:
branches:
- develop
pull_request:
branches:
- develop
# Use custom shell with -l so .bash_profile is sourced which loads intel/oneapi/setvars.sh
# without having to do it in manually every step
defaults:
run:
shell: bash -leo pipefail {0}
jobs:
Intel:
runs-on: ubuntu-latest
env:
CC: icc
FC: ifort
CXX: icpc
strategy:
fail-fast: true
matrix:
compilers: ["CC=icc FC=ifort", "CC=icx FC=ifx"]
steps:
# See https://software.intel.com/content/www/us/en/develop/articles/oneapi-repo-instructions.html
- name: install-intel
run: |
cd /tmp
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-dev-utilities intel-oneapi-mpi-devel intel-oneapi-openmp intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
- name: checkout-bacio
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-bacio
path: bacio
ref: develop
- name: build-bacio
run: |
cd bacio
mkdir build
cd build
${{ matrix.compilers }} cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio
make -j2
make install
- name: checkout-w3emc
uses: actions/checkout@v3
with:
repository: NOAA-EMC/NCEPLIBS-w3emc
path: w3emc
ref: develop
- name: build-w3emc
run: |
cd w3emc
mkdir build
cd build
${{ matrix.compilers }} cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc -DBUILD_WITH_BUFR=OFF ..
make -j2
make install
- name: checkout-jasper
uses: actions/checkout@v3
with:
repository: jasper-software/jasper
path: jasper
ref: version-4.0.0
- name: cache-jasper
id: cache-jasper
uses: actions/cache@v3
with:
path: ~/Jasper
key: jasper-intel-${{ matrix.compilers }}-${{ runner.os }}-4.0.0
- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
cd jasper
mkdir build-jasper && cd build-jasper
${{ matrix.compilers }} cmake .. -DCMAKE_INSTALL_PREFIX=~/Jasper
make -j2
make install
- name: checkout
uses: actions/checkout@v3
with:
path: g2
- name: build
run: |
cd g2
mkdir build
cd build
${{ matrix.compilers }} cmake -DCMAKE_PREFIX_PATH="~/Jasper;~/bacio;~/w3emc" ..
make -j2
- name: test
run: |
cd $GITHUB_WORKSPACE/g2/build
ctest --verbose