t/nvmept_trim: increase transfer size for some tests
[fio.git] / ci / actions-install.sh
CommitLineData
ce1b5612
SW
1#!/bin/bash
2# This script expects to be invoked from the base fio directory.
3set -eu
4
5SCRIPT_DIR=$(dirname "$0")
6# shellcheck disable=SC1091
7. "${SCRIPT_DIR}/common.sh"
8
9install_ubuntu() {
10 local pkgs
11
12 cat <<DPKGCFG | sudo tee /etc/dpkg/dpkg.cfg.d/dpkg-speedup > /dev/null
13# Skip fsync
14force-unsafe-io
15# Don't install documentation
16path-exclude=/usr/share/man/*
17path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo
18path-exclude=/usr/share/doc/*
19DPKGCFG
20 # Packages available on i686 and x86_64
21 pkgs=(
22 libaio-dev
23 libcunit1-dev
24 libcurl4-openssl-dev
25 libfl-dev
ce1b5612 26 libnuma-dev
dff32ddb 27 libnfs-dev
ce1b5612
SW
28 valgrind
29 )
30 case "${CI_TARGET_ARCH}" in
31 "i686")
32 sudo dpkg --add-architecture i386
33 pkgs=("${pkgs[@]/%/:i386}")
34 pkgs+=(
35 gcc-multilib
36 pkg-config:i386
37 zlib1g-dev:i386
5cedafaf
VF
38 libc6:i386
39 libgcc-s1:i386
ce1b5612
SW
40 )
41 ;;
42 "x86_64")
43 pkgs+=(
44 libglusterfs-dev
45 libgoogle-perftools-dev
46 libiscsi-dev
47 libnbd-dev
48 libpmem-dev
4e2bd713 49 libpmem2-dev
4e2bd713 50 libprotobuf-c-dev
ce1b5612
SW
51 librbd-dev
52 libtcmalloc-minimal4
53 nvidia-cuda-dev
b68ba328
VF
54 libibverbs-dev
55 librdmacm-dev
ce1b5612 56 )
726a9585
VF
57 echo "Removing libunwind-14-dev because of conflicts with libunwind-dev"
58 sudo apt remove -y libunwind-14-dev
ce1b5612
SW
59 ;;
60 esac
61
62 # Architecture-independent packages and packages for which we don't
63 # care about the architecture.
64 pkgs+=(
65 python3-scipy
5c997f9c 66 python3-sphinx
888dbd62 67 python3-statsmodels
ce1b5612
SW
68 )
69
70 echo "Updating APT..."
71 sudo apt-get -qq update
b68ba328
VF
72 echo "Installing packages... ${pkgs[@]}"
73 sudo apt-get install -o APT::Immediate-Configure=false --no-install-recommends -qq -y "${pkgs[@]}"
4e2bd713
LD
74 if [ "${CI_TARGET_ARCH}" == "x86_64" ]; then
75 # install librpma from sources
76 ci/actions-install-librpma.sh
77 fi
ce1b5612
SW
78}
79
80install_linux() {
81 install_ubuntu
82}
83
84install_macos() {
85 # Assumes homebrew and python3 are already installed
86 #echo "Updating homebrew..."
87 #brew update >/dev/null 2>&1
88 echo "Installing packages..."
9af4af7a
VF
89 HOMEBREW_NO_AUTO_UPDATE=1 brew install cunit libnfs
90 pip3 install scipy six statsmodels sphinx
ce1b5612
SW
91}
92
89d08880
VF
93install_windows() {
94 pip3 install scipy six statsmodels sphinx
95}
96
ce1b5612 97main() {
9b3cc2dd
BVA
98 case "${CI_TARGET_BUILD}" in
99 android*)
100 echo "Installing Android NDK..."
101 wget --quiet https://dl.google.com/android/repository/android-ndk-r24-linux.zip
102 unzip -q android-ndk-r24-linux.zip
103 return 0
104 ;;
105 esac
787c02a6 106
ce1b5612
SW
107 set_ci_target_os
108
109 install_function="install_${CI_TARGET_OS}"
110 ${install_function}
111
112 echo "Python3 path: $(type -p python3 2>&1)"
113 echo "Python3 version: $(python3 -V 2>&1)"
114}
115
116main