-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
125 lines (108 loc) · 2.72 KB
/
Makefile.toml
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
[tasks.linux_apt_get_update]
script = """
[ $(id -u) != 0 ] && export SUDO="sudo" || export SUDO=""
$SUDO apt-get update
"""
[tasks.linux_apt_get_essentials]
script = """
[ $(id -u) != 0 ] && export SUDO="sudo" || export SUDO=""
$SUDO apt-get install -y \
autoconf \
build-essential \
cmake \
git \
libtool \
pkg-config \
unzip \
zip
"""
dependencies = ["linux_apt_get_update"]
[tasks.linux_install_cfitsio]
script = """
[ $(id -u) != 0 ] && export SUDO="sudo" || export SUDO=""
cd /tmp
wget http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz
tar -zxvf cfitsio-3.49.tar.gz
cd cfitsio-3.49/
CFLAGS="-O3" ./configure --prefix=/usr/local --enable-reentrant --enable-ssse3 --enable-sse2
make -j
$SUDO make install
"""
dependencies = ["linux_apt_get_essentials"]
[tasks.linux_install_aoflagger]
script = """
# set sudo command if user is not root
[ $(id -u) != 0 ] && export SUDO="sudo" || export SUDO=""
# if ubuntu > 21.04, install through apt
$(source /etc/os-release && dpkg --compare-versions "$VERSION_ID" gt "21.04" &> /dev/null) \
&& $SUDO apt-get install -y aoflagger-dev \
&& exit 0
$SUDO apt-get install -y \
casacore-data \
casacore-dev \
libblas-dev \
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-system-dev \
libboost-test-dev \
libfftw3-dev \
libgsl-dev \
libgtkmm-3.0-dev \
libhdf5-dev \
liblapack-dev \
liblua5.3-dev \
libpng-dev \
libpython3-dev \
libssl-dev \
libxml2-dev \
python3
cd /tmp
[ -d "aoflagger" ] && rm -rf aoflagger
git clone --recurse-submodules https://gitlab.com/aroffringa/aoflagger.git --branch v3.4.0
cd aoflagger
chmod a+rwx .
mkdir build
cd build
cmake ..
make
$SUDO make install
"""
dependencies = ["linux_install_cfitsio"]
[tasks.linux_install_deps]
dependencies = ["linux_install_aoflagger"]
[tasks.mac_install_deps]
script = """
brew install casacore/tap/casacore mwatelescope/tap/aoflagger
"""
[tasks.install_deps]
linux_alias = "linux_install_deps"
mac_alias = "mac_install_deps"
[tasks.check]
command = "cargo"
args = ["check"]
[tasks.format_fix]
command = "cargo"
args = ["fmt", "--", "--emit=files"]
install_crate = "rustfmt"
[tasks.format_check]
command = "cargo"
args = ["fmt", "--all", "--", "--check"]
install_crate = "rustfmt"
[tasks.clippy]
command = "cargo"
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
install_crate = "clippy"
[tasks.clean]
command = "cargo"
args = ["clean"]
[tasks.build_clean]
command = "cargo"
args = ["build"]
dependencies = ["clean"]
[tasks.test]
command = "cargo"
args = ["test"]
[tasks.ci]
dependencies = ["clean", "check", "format_check", "clippy", "test"]
[tasks.pre_commit]
dependencies = ["format_fix", "ci"]