Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 54 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,74 @@ name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: self-hosted # or `ubuntu-22.04`
# This fork has no self-hosted runners. Upstream's self-hosted pool is
# private, so jobs there sit in action_required. Use GitHub-hosted 22.04
# to match the documented toolchain (clang-14, gcc-12, libprocps-dev).
runs-on: ubuntu-22.04
timeout-minutes: 180

steps:
- uses: actions/checkout@v4

- name: Configure sccache-cache
- name: Free disk space
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV

- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/opt/hostedtoolcache/CodeQL /usr/local/share/powershell \
/usr/share/swift
df -h

- name: Prepare
run: |
sudo apt install -y cmake libuv1-dev liblz4-dev liblzma-dev libdouble-conversion-dev libprocps-dev libdwarf-dev libunwind-dev
sudo apt install -y libaio-dev libgflags-dev libgoogle-glog-dev libgtest-dev libgmock-dev clang-format-14 clang-14 clang-tidy-14 lld-14
sudo apt install -y libgoogle-perftools-dev google-perftools libssl-dev ccache gcc-12 g++-12 libboost-all-dev meson rustc cargo
wget https://github.com/apple/foundationdb/releases/download/7.1.61/foundationdb-clients_7.1.61-1_amd64.deb && sudo dpkg -i foundationdb-clients_7.1.61-1_amd64.deb
git clone https://github.com/libfuse/libfuse.git libfuse -b fuse-3.16.2 --depth 1 && mkdir libfuse/build && cd libfuse/build && meson setup .. && ninja && sudo ninja install && cd ../.. && rm -rf libfuse
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
cmake ninja-build meson pkg-config wget build-essential \
libuv1-dev liblz4-dev liblzma-dev libdouble-conversion-dev \
libprocps-dev libdwarf-dev libunwind-dev libaio-dev \
libgflags-dev libgoogle-glog-dev libgtest-dev libgmock-dev \
clang-format-14 clang-14 clang-tidy-14 lld-14 \
libgoogle-perftools-dev google-perftools libssl-dev ccache \
gcc-12 g++-12 libboost-all-dev rustc cargo \
libibverbs-dev libnuma-dev python3-dev
wget -q https://github.com/apple/foundationdb/releases/download/7.1.61/foundationdb-clients_7.1.61-1_amd64.deb
sudo dpkg -i foundationdb-clients_7.1.61-1_amd64.deb
git clone https://github.com/libfuse/libfuse.git libfuse -b fuse-3.16.2 --depth 1
cmake -E make_directory libfuse/build
CC=clang-14 CXX=clang++-14 meson setup libfuse/build libfuse
ninja -C libfuse/build
sudo ninja -C libfuse/build install
rm -rf libfuse
git submodule update --init --recursive
./patches/apply.sh

# 16GB hosted runners OOM when Arrow + Folly + RocksDB compile together.
# /swapfile is already active on ubuntu-22.04 runners ("Text file busy").
- name: Enable extra swap
run: |
sudo rm -f /swapfile.ci
sudo fallocate -l 8G /swapfile.ci
sudo chmod 600 /swapfile.ci
sudo mkswap /swapfile.ci
sudo swapon /swapfile.ci
free -h

- name: Build
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
CARGO_BUILD_JOBS: 2
run: |
cargo build --release
cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build -j 32
cmake -S . -B build \
-DCMAKE_CXX_COMPILER=clang++-14 \
-DCMAKE_C_COMPILER=clang-14 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build --parallel 2
2 changes: 1 addition & 1 deletion cmake/ApacheArrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ExternalProject_Add(
-DARROW_BUILD_EXAMPLES=OFF \
-DARROW_PARQUET=ON -DARROW_CSV=ON \
-DARROW_WITH_ZSTD=ON -DARROW_WITH_LZ4=ON -DARROW_WITH_ZLIB=ON"
BUILD_COMMAND bash -x -c "source thirdparty/export.sh && cmake --build . -j"
BUILD_COMMAND bash -x -c "source thirdparty/export.sh && cmake --build . -j \${CMAKE_BUILD_PARALLEL_LEVEL:-2}"
INSTALL_COMMAND cmake --install . --prefix "${PREFIX}"
BUILD_BYPRODUCTS
"${ARROW_RELEASE_BUILD_DIR}/libarrow.a"
Expand Down
Loading