[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"]