Skip to content

Commit

Permalink
apt-get -> yum
Browse files Browse the repository at this point in the history
Differential Revision: D48290307

fbshipit-source-id: 87bd791416b8f4f3eb086983421c65de539a4c42
  • Loading branch information
openrichardfb authored and facebook-github-bot committed Aug 12, 2023
1 parent a07fbed commit 09ea0ea
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
39 changes: 20 additions & 19 deletions .github/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
set -ex

# Add support for https apt sources.
wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt-transport-https_1.2.32ubuntu0.2_amd64.deb
echo "93475e4cc5e7a86de63fea0316f3f2cd8b791cf4d6ea50a6d63f5bd8e1da5726 apt-transport-https_1.2.32ubuntu0.2_amd64.deb" | sha256sum -c
sudo dpkg -i apt-transport-https_1.2.32ubuntu0.2_amd64.deb
rm apt-transport-https_1.2.32ubuntu0.2_amd64.deb
# wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt-transport-https_1.2.32ubuntu0.2_amd64.deb
# echo "93475e4cc5e7a86de63fea0316f3f2cd8b791cf4d6ea50a6d63f5bd8e1da5726 apt-transport-https_1.2.32ubuntu0.2_amd64.deb" | sha256sum -c
# sudo dpkg -i apt-transport-https_1.2.32ubuntu0.2_amd64.deb
# rm apt-transport-https_1.2.32ubuntu0.2_amd64.deb

export MAX_JOBS=8
if [ "${CIRCLE_JOB}" != "COVERAGE" ]; then
Expand All @@ -27,7 +27,8 @@ if [ "${CIRCLE_JOB}" != "COVERAGE" ]; then
fi

install_pocl() {
sudo apt-get install -y ocl-icd-opencl-dev clinfo libhwloc-dev opencl-headers
sudo yum install -y ocl-icd-opencl-dev clinfo libhwloc-dev opencl-headers


git clone https://github.com/pocl/pocl.git
cd pocl && git checkout 4efafa82c087b5e846a9f8083d46b3cdac2f698b && cd ../
Expand Down Expand Up @@ -57,12 +58,12 @@ install_fmt() {

upgrade_python() {
echo "Removing old python...";
sudo apt-get remove --purge -y python3.6 python3-pip libpython3-dev
sudo apt-get autoremove -y
sudo yum remove --purge -y python3.6 python3-pip libpython3-dev
sudo yum autoremove -y

echo "Installing dependencies for new python..."
sudo apt-get update
sudo apt-get install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev
sudo yum update
sudo yum install -y libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev

echo "Installing new python..."
mkdir python-src
Expand All @@ -88,27 +89,27 @@ upgrade_python() {
GLOW_DEPS="libpng-dev libgoogle-glog-dev libboost-all-dev libdouble-conversion-dev libgflags-dev libjemalloc-dev libpthread-stubs0-dev libevent-dev libssl-dev"

if [ "${CIRCLE_JOB}" == "CHECK_CLANG_AND_PEP8_FORMAT" ]; then
sudo apt-get update
sudo yum update
upgrade_python
else
# Install Glow dependencies
sudo apt-get update
sudo yum update

# Redirect clang
sudo ln -s /usr/bin/clang-8 /usr/bin/clang
sudo ln -s /usr/bin/clang++-8 /usr/bin/clang++
sudo ln -s /usr/bin/llvm-symbolizer-8 /usr/bin/llvm-symbolizer
sudo ln -s /usr/bin/llvm-config-8 /usr/bin/llvm-config-8.0

sudo apt-get install -y ${GLOW_DEPS}
sudo yum install -y ${GLOW_DEPS}
install_fmt
fi

# Since we are using llvm-7 in these two branches, we cannot use pip install cmake
if [ "${CIRCLE_JOB}" != "PYTORCH" ] && [ "${CIRCLE_JOB}" != "CHECK_CLANG_AND_PEP8_FORMAT" ]; then
sudo pip install cmake==3.17.3
else
sudo apt-get install cmake
sudo yum install cmake
fi

# Install ninja, (newest version of) autopep8 through pip
Expand All @@ -131,8 +132,8 @@ if [[ "${CIRCLE_JOB}" == "ASAN" ]]; then
CMAKE_ARGS+=("-DGLOW_WITH_OPENCL=OFF")
CMAKE_ARGS+=("-DCMAKE_BUILD_TYPE=Release")
elif [[ "$CIRCLE_JOB" == "COVERAGE" ]]; then
sudo apt-get install wget
sudo apt-get install -y lcov
sudo yum install wget
sudo yum install -y lcov
sudo pip install awscli --upgrade
../utils/install_protobuf.sh
CC=gcc-5 CXX=g++-5 cmake -G Ninja \
Expand All @@ -141,10 +142,10 @@ elif [[ "$CIRCLE_JOB" == "COVERAGE" ]]; then
-DGLOW_USE_COVERAGE=ON \
../
elif [[ "$CIRCLE_JOB" == "CHECK_CLANG_AND_PEP8_FORMAT" ]]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-11 main"
sudo apt-get update
sudo apt-get install -y clang-format-11
#sudo rpm --import https://apt.llvm.org/llvm-snapshot.gpg.key
#sudo yum-config-manager --add-repo http://apt.llvm.org/xenial/llvm-toolchain-xenial-11.repo
sudo yum update
sudo yum install -y clang-tools-extra
cd /tmp
python3.9 -m virtualenv venv
source venv/bin/activate
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/glow-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fi
original_pwd=$(pwd)
sudo apt-get update;
sudo yum update
mkdir ~/tempdownload;
cd ~/tempdownload;
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.1p1.tar.gz;
Expand Down

0 comments on commit 09ea0ea

Please sign in to comment.