-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_eccodes.sh
executable file
·45 lines (39 loc) · 1.49 KB
/
install_eccodes.sh
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
#!/bin/bash
cd $HOME
mkdir src
cd src
echo "Staging eccodes source files to $(pwd)"
curl -o eccodes-${ECCODES_VERSION}-Source.tar.gz \
https://confluence.ecmwf.int/download/attachments/45757960/eccodes-${ECCODES_VERSION}-Source.tar.gz?api=v2
tar -xzf eccodes-${ECCODES_VERSION}-Source.tar.gz
cd eccodes-${ECCODES_VERSION}-Source
mkdir build
if [[ -z ${OPENJPEG_INCLUDE_DIR} ]]; then
cmake . -B build -DCMAKE_BUILD_TYPE=Release \
-DENABLE_NETCDF=OFF \
-DENABLE_JPG=ON \
-DENABLE_PNG=ON \
-DENABLE_AEC=ON \
-DENABLE_PYTHON=OFF \
-DENABLE_FORTRAN=OFF \
-DENABLE_EXAMPLES=OFF \
-DENABLE_JPG_LIBJASPER=OFF \
-DENABLE_INSTALL_ECCODES_SAMPLES=OFF
else
echo "OPENJPEG_INCLUDE_DIR: ${OPENJPEG_INCLUDE_DIR}"
cmake . -B build -DCMAKE_BUILD_TYPE=Release \
-DENABLE_NETCDF=OFF \
-DENABLE_JPG=ON \
-DENABLE_PNG=ON \
-DENABLE_AEC=ON \
-DENABLE_PYTHON=OFF \
-DENABLE_FORTRAN=OFF \
-DENABLE_EXAMPLES=OFF \
-DENABLE_INSTALL_ECCODES_SAMPLES=OFF \
-DENABLE_JPG_LIBOPENJPEG=ON \
-DENABLE_JPG_LIBJASPER=OFF \
-DOPENJPEG_INCLUDE_DIR=${OPENJPEG_INCLUDE_DIR}
fi
cmake --build ./build
sudo cmake --install ./build
cd $GITHUB_WORKSPACE