forked from rokibhasansagar/builder_demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetEnv.sh
More file actions
executable file
·41 lines (34 loc) · 1.4 KB
/
setEnv.sh
File metadata and controls
executable file
·41 lines (34 loc) · 1.4 KB
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
#!/bin/bash
ROOTDIR=${PWD}
echo "::group::Apt setup"
sudo apt-fast update -qy
sudo apt-fast upgrade -qy
sudo apt-fast install -qy --no-install-recommends --no-install-suggests \
lsb-core linux-headers-$(uname -r) python3-dev python-is-python3 xzdec zstd libzstd-dev lib32z1-dev build-essential libc6-dev-i386 gcc-multilib g++-multilib ninja-build clang cmake libxml2-utils xsltproc expat re2c lib32ncurses5-dev bc libreadline-gplv2-dev gawk xterm rename schedtool gperf rclone pigz
sudo apt-get clean -y && sudo apt-get autoremove -y
sudo rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
echo "::endgroup::"
echo "::group::Latest make and ccache setup"
mkdir -p /tmp/env
cd /tmp/env || exit 1
curl -sL https://ftp.gnu.org/gnu/make/make-4.3.tar.gz -O
tar xzf make-4.3.tar.gz && cd make-*/
./configure && bash ./build.sh 1>/dev/null && sudo install ./make /usr/bin/make
cd /tmp/env || exit 1
git clone -q https://github.com/ccache/ccache.git && cd ccache && git checkout -q v4.2
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
make -j8 && sudo make install
echo "::endgroup::"
cd ${ROOTDIR} || exit 1
rm -rf /tmp/env
echo "::group::Ccache config"
mkdir -p /home/runner/.config/ccache
cat << EOC > /home/runner/.config/ccache/ccache.conf
cache_dir = /home/runner/.cache/ccache
compression = true
compression_level = 6
max_size = 5G
recache = true
EOC
ccache -p
echo "::endgroup::"