Skip to content

Commit

Permalink
build: remove boost dependency and internal sortition package (#5459)
Browse files Browse the repository at this point in the history
  • Loading branch information
cce authored Jun 8, 2023
1 parent 3fbc4b6 commit 78b0a81
Show file tree
Hide file tree
Showing 19 changed files with 13 additions and 250 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
- name: Install libraries
run: sudo apt-get -y -q install libboost-math-dev
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make crypto/libs/linux/amd64/lib/libsodium.a && sudo mv /usr/bin/go.bak /usr/bin/go
Expand All @@ -37,8 +35,6 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0 # required for new-from-rev option in .golangci.yml
- name: Install libraries
run: sudo apt-get -y -q install libboost-math-dev
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make crypto/libs/linux/amd64/lib/libsodium.a && sudo mv /usr/bin/go.bak /usr/bin/go
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Install libraries
run: sudo apt-get -y -q install libboost-math-dev
# move go out of the way temporarily to avoid "go list ./..." from installing modules
- name: Make libsodium.a
run: sudo mv /usr/bin/go /usr/bin/go.bak && make crypto/libs/linux/amd64/lib/libsodium.a && sudo mv /usr/bin/go.bak /usr/bin/go
Expand Down
16 changes: 0 additions & 16 deletions data/committee/sortition/sortition.cpp

This file was deleted.

65 changes: 0 additions & 65 deletions data/committee/sortition/sortition.go

This file was deleted.

16 changes: 0 additions & 16 deletions data/committee/sortition/sortition.h

This file was deleted.

124 changes: 0 additions & 124 deletions data/committee/sortition/sortition_test.go

This file was deleted.

2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:18.04
ARG GOLANG_VERSION
ENV DEBIAN_FRONTEND noninteractive

RUN apt update && apt-get install -y git libboost-all-dev wget sqlite3 autoconf sudo tzdata bsdmainutils
RUN apt update && apt-get install -y git wget sqlite3 autoconf sudo tzdata bsdmainutils

WORKDIR /root
RUN wget --quiet https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz && tar -xvf go${GOLANG_VERSION}.linux-amd64.tar.gz && mv go /usr/local
Expand Down
2 changes: 1 addition & 1 deletion docker/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:16.04
ARG GOLANG_VERSION

RUN apt-get update && apt-get install -y git libboost-all-dev wget sqlite3 autoconf build-essential shellcheck
RUN apt-get update && apt-get install -y git wget sqlite3 autoconf build-essential shellcheck
WORKDIR /root
RUN wget --quiet https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz && tar -xvf go${GOLANG_VERSION}.linux-amd64.tar.gz && mv go /usr/local
ENV GOROOT=/usr/local/go \
Expand Down
2 changes: 1 addition & 1 deletion docker/build/Dockerfile-deploy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM --platform=linux/amd64 ubuntu:18.04
ARG GOLANG_VERSION

RUN apt-get update && apt-get install -y git libboost-all-dev wget sqlite3 autoconf jq bsdmainutils shellcheck
RUN apt-get update && apt-get install -y git wget sqlite3 autoconf jq bsdmainutils shellcheck
WORKDIR /root
RUN wget --quiet https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz && tar -xvf go${GOLANG_VERSION}.linux-amd64.tar.gz && mv go /usr/local
ENV GOROOT=/usr/local/go \
Expand Down
1 change: 0 additions & 1 deletion docker/build/cicd.alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ RUN apk update && \
apk add bash && \
apk add git && \
apk add python3 && \
apk add boost-dev && \
apk add expect && \
apk add jq && \
apk add autoconf && \
Expand Down
2 changes: 1 addition & 1 deletion docker/build/cicd.centos.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG GOLANG_VERSION
ARG ARCH="amd64"
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum update -y && \
yum install -y autoconf wget awscli git gnupg2 nfs-utils python3-devel sqlite3 boost-devel expect jq \
yum install -y autoconf wget awscli git gnupg2 nfs-utils python3-devel sqlite3 expect jq \
libtool gcc-c++ libstdc++-devel libstdc++-static rpmdevtools createrepo rpm-sign bzip2 which ShellCheck \
libffi-devel openssl-devel
WORKDIR /root
Expand Down
2 changes: 1 addition & 1 deletion docker/build/cicd.centos8.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG GOLANG_VERSION
ARG ARCH="amd64"
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
dnf update -y && \
dnf install -y autoconf wget awscli git gnupg2 nfs-utils python3-devel boost-devel expect jq \
dnf install -y autoconf wget awscli git gnupg2 nfs-utils python3-devel expect jq \
libtool gcc-c++ libstdc++-devel rpmdevtools createrepo rpm-sign bzip2 which \
libffi-devel openssl-devel
RUN dnf install -y epel-release && \
Expand Down
2 changes: 1 addition & 1 deletion docker/build/cicd.ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG GOLANG_VERSION
ARG ARCH="amd64"
ARG GOARCH="amd64"
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y build-essential git libboost-all-dev wget sqlite3 autoconf jq bsdmainutils shellcheck awscli
RUN apt-get update && apt-get install -y build-essential git wget sqlite3 autoconf jq bsdmainutils shellcheck awscli
WORKDIR /root
RUN wget https://dl.google.com/go/go${GOLANG_VERSION}.linux-${GOARCH}.tar.gz \
&& tar -xvf go${GOLANG_VERSION}.linux-${GOARCH}.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion docker/build/docker.ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 &&
update-alternatives --set python /usr/bin/python3.7 && \
pip3 install mulecli

RUN apt-get update && apt-get install -y autoconf bsdmainutils git libboost-all-dev && \
RUN apt-get update && apt-get install -y autoconf bsdmainutils git && \
curl https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz | tar -xzf - && \
mv go /usr/local

Expand Down
3 changes: 1 addition & 2 deletions scripts/configure_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ elif [ "${OS}" = "darwin" ]; then
brew tap homebrew/cask
fi
install_or_upgrade pkg-config
install_or_upgrade boost
install_or_upgrade libtool
install_or_upgrade shellcheck
if [ "${CIRCLECI}" != "true" ]; then
Expand All @@ -90,7 +89,7 @@ elif [ "${OS}" = "darwin" ]; then
lnav -i "$SCRIPTPATH/algorand_node_log.json"
fi
elif [ "${OS}" = "windows" ]; then
if ! $msys2 pacman -S --disable-download-timeout --noconfirm git automake autoconf m4 libtool make mingw-w64-x86_64-gcc mingw-w64-x86_64-boost mingw-w64-x86_64-python mingw-w64-x86_64-jq unzip procps; then
if ! $msys2 pacman -S --disable-download-timeout --noconfirm git automake autoconf m4 libtool make mingw-w64-x86_64-gcc mingw-w64-x86_64-python mingw-w64-x86_64-jq unzip procps; then
echo "Error installing pacman dependencies"
exit 1
fi
Expand Down
6 changes: 3 additions & 3 deletions scripts/install_linux_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -e
. /etc/os-release
DISTRIB=$ID

ARCH_DEPS="boost boost-libs expect jq autoconf shellcheck sqlite python-virtualenv"
UBUNTU_DEPS="libtool libboost-math-dev expect jq autoconf shellcheck sqlite3 python3-venv build-essential"
FEDORA_DEPS="boost-devel expect jq autoconf ShellCheck sqlite python-virtualenv"
ARCH_DEPS="expect jq autoconf shellcheck sqlite python-virtualenv"
UBUNTU_DEPS="libtool expect jq autoconf shellcheck sqlite3 python3-venv build-essential"
FEDORA_DEPS="expect jq autoconf ShellCheck sqlite python-virtualenv"

case $DISTRIB in
"arch" | "manjaro")
Expand Down
2 changes: 1 addition & 1 deletion scripts/release/common/docker/centos.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM centos:7

WORKDIR /root
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN yum install -y autoconf awscli curl git gnupg2 nfs-utils python36 sqlite3 boost-devel expect jq libtool gcc-c++ libstdc++-devel libstdc++-static rpmdevtools createrepo rpm-sign bzip2 which ShellCheck
RUN yum install -y autoconf awscli curl git gnupg2 nfs-utils python36 sqlite3 expect jq libtool gcc-c++ libstdc++-devel libstdc++-static rpmdevtools createrepo rpm-sign bzip2 which ShellCheck

ENTRYPOINT ["/bin/bash"]

2 changes: 1 addition & 1 deletion scripts/release/common/docker/centos8.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM quay.io/centos/centos:stream8

WORKDIR /root
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
dnf install -y autoconf awscli curl git gnupg2 nfs-utils python36 sqlite boost-devel expect jq libtool gcc-c++ libstdc++-devel rpmdevtools createrepo rpm-sign bzip2 which && \
dnf install -y autoconf awscli curl git gnupg2 nfs-utils python36 sqlite expect jq libtool gcc-c++ libstdc++-devel rpmdevtools createrepo rpm-sign bzip2 which && \
dnf -y --enablerepo=powertools install libstdc++-static

RUN echo "${BOLD}Downloading and installing binaries...${RESET}" && \
Expand Down
8 changes: 0 additions & 8 deletions scripts/travis/configure_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ if [[ "${OS}" == "linux" ]]; then
sudo apt-get update -y
sudo apt-get -y install sqlite3
fi
elif [[ "${OS}" == "darwin" ]]; then
# we don't want to upgrade boost if we already have it, as it will try to update
# other components.
if [ "${CIRCLECI}" != "true" ]; then
brew update
brew tap homebrew/cask
brew pin boost || true
fi
elif [[ "${OS}" == "windows" ]]; then
git config --global core.autocrlf true
# Golang probably is not installed under MSYS2 so add the environment variable temporarily
Expand Down

0 comments on commit 78b0a81

Please sign in to comment.