Skip to content

feat: add folly build #12

feat: add folly build

feat: add folly build #12

Workflow file for this run

name: CI
'on':
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: '${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}'
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
working-directory: cxx-async
run: cargo clippy -- -D warnings
build:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
git \
cmake \
make \
gcc \
g++ \
clang \
autoconf \
automake \
libtool \
python3-pip \
ninja-build \
libgflags-dev \
libdouble-conversion-dev \
libevent-dev \
libgflags-dev \
libgoogle-glog-dev \
libssl-dev \
libunwind-dev \
liblz4-dev \
liblzma-dev \
zlib1g-dev \
libsnappy-dev \
binutils-dev \
libjemalloc-dev \
libiberty-dev
- name: Build fmt
working-directory: /tmp/
run: |
git clone https://github.com/fmtlib/fmt.git && cd fmt
rm _build -rf; mkdir _build -p && cd _build
cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DFMT_TEST=OFF
make -j$(nproc)
sudo make install
sudo ldconfig
- name: Build fast_float
working-directory: /tmp/
run: |
git clone https://github.com/fastfloat/fast_float.git && cd fast_float
rm _build -rf; mkdir _build -p && cd _build
cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_CXX_FLAGS="-O3" \
-DBUILD_SHARED_LIBS=TRUE \
-DBUILD_BENCHMARKS=OFF
make -j$(nproc)
sudo make install
sudo ldconfig
- name: Build Folly
working-directory: /tmp/
run: |
git clone https://github.com/facebook/folly.git
cd folly
python3 build/fbcode_builder/getdeps.py --shared-libs build --no-tests boost
install_dir=$(python3 ./build/fbcode_builder/getdeps.py show-inst-dir)
boost_inst_dir=$(dirname "$install_dir")
boost_paths=$(find "$boost_inst_dir" -maxdepth 1 -type d -name "boost*")
sudo cp -avf $boost_paths/include /usr/local
sudo cp -avf $boost_paths/lib /usr/local
sudo ldconfig
rm _build -rf
mkdir _build && cd _build
cmake .. -DBUILD_SHARED_LIBS=ON \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
-DCMAKE_C_COMPILER=/usr/bin/clang \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_BENCHMARKS=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_CXX_STANDARD_REQUIRED=ON
make -j$(nproc)
sudo make install
sudo ldconfig
- name: Build
working-directory: cxx-async
run: |
cargo build