Skip to content
Merged
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
34 changes: 19 additions & 15 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,17 @@ ICEBUG_DIR = { value = "icebug", relative = true }
# - macOS .app bundles stage them under Contents/Frameworks
# - cargo dev/test binaries resolve ../../../ entries
# (target/{debug,release}/deps/ -> repo root)
# Absolute well-known rpaths (macOS only): the algo extension is downloaded
# at runtime and its own LC_RPATHs point at its build machine, so its
# @rpath deps (libarrow, libomp, libnetworkit) expand against *this*
# binary's rpaths. These entries let it resolve from Homebrew / system
# locations with no DYLD_LIBRARY_PATH. Missing dirs are harmless.
# Vendored dirs come first so the pinned prebuilts (./liblbug,
# ./icebug/lib) always win over ambient copies (e.g. a Homebrew
# ladybug/libnetworkit): an incompatible ambient lib resolved first
# segfaults (lbug) or fails LOAD (algo extension) with no graceful
# error. Absolute well-known rpaths (macOS only) follow: the algo
# extension is downloaded at runtime and its own LC_RPATHs point at its
# build machine, so its @rpath deps (libarrow, libomp) expand against
# *this* binary's rpaths. These entries let it resolve from Homebrew /
# system locations with no DYLD_LIBRARY_PATH. Missing dirs are harmless.
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/lib",
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/apache-arrow/lib",
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/libomp/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/opt/apache-arrow/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/opt/libomp/lib",
"-C", "link-arg=-Wl,-rpath,@executable_path",
"-C", "link-arg=-Wl,-rpath,@executable_path/icebug/lib",
"-C", "link-arg=-Wl,-rpath,@executable_path/liblbug",
Expand All @@ -44,16 +42,16 @@ rustflags = [
"-C", "link-arg=-Wl,-rpath,@executable_path/../../../../liblbug",
"-C", "link-arg=-Wl,-rpath,@executable_path/../../../icebug/lib",
"-C", "link-arg=-Wl,-rpath,@executable_path/../../../../icebug/lib",
]

[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/lib",
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/apache-arrow/lib",
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/libomp/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/opt/apache-arrow/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/opt/libomp/lib",
]

[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-Wl,-rpath,@executable_path",
"-C", "link-arg=-Wl,-rpath,@executable_path/icebug/lib",
"-C", "link-arg=-Wl,-rpath,@executable_path/liblbug",
Expand All @@ -65,6 +63,12 @@ rustflags = [
"-C", "link-arg=-Wl,-rpath,@executable_path/../../../../liblbug",
"-C", "link-arg=-Wl,-rpath,@executable_path/../../../icebug/lib",
"-C", "link-arg=-Wl,-rpath,@executable_path/../../../../icebug/lib",
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/lib",
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/apache-arrow/lib",
"-C", "link-arg=-Wl,-rpath,/opt/homebrew/opt/libomp/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/opt/apache-arrow/lib",
"-C", "link-arg=-Wl,-rpath,/usr/local/opt/libomp/lib",
]

[target.aarch64-unknown-linux-gnu]
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ jobs:
wget -qO- --timeout=60 --tries=3 https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.asc
echo "deb http://apt.llvm.org/jammy llvm-toolchain-jammy-20 main" | sudo tee /etc/apt/sources.list.d/llvm20.list
# Apache Arrow repo (icebug's cxx bridge needs arrow headers).
# Pinned to 25.0.1: the icebug prebuilt links libarrow.so.2500; the
# repo now defaults to 26.x, which breaks test/runtime loads.
# Pinned to 26.0.0 to match the Linux icebug 13.5 prebuilt, which
# links libarrow.so.2600 (macOS/Windows 13.5 builds link
# libarrow.2500, so they stay on the Arrow 25 setup).
wget --timeout=60 --tries=3 https://apache.jfrog.io/artifactory/arrow/ubuntu/apache-arrow-apt-source-latest-jammy.deb
sudo apt-get install -y ./apache-arrow-apt-source-latest-jammy.deb
# Bound mirror stalls: fail fast instead of hanging the run for hours.
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 update
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends gcc-13 g++-13 cmake pkg-config libssl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libarrow-dev=25.0.1-1 libarrow2500=25.0.1-1 libomp-20-dev
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends gcc-13 g++-13 cmake pkg-config libssl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libarrow-dev=26.0.0-1 libarrow2600=26.0.0-1 libomp-20-dev
echo "CC=gcc-13" >> "$GITHUB_ENV"
echo "CXX=g++-13" >> "$GITHUB_ENV"

Expand Down Expand Up @@ -95,14 +96,7 @@ jobs:
run: cargo clippy --all-targets -- -D warnings

- name: Run tests
run: |
# The algo extension served by INSTALL algo is currently ABI-
# incompatible with pinned lbug 0.21.2: its GDS calls segfault
# inside native code (signal 11, no graceful error), killing the
# whole test harness. Skip those tests until upstream publishes
# compatible bits; re-enable by dropping the --skip flags.
# local_leiden_two_cliques (in-process icebug) still runs.
cargo test -- --skip gds_leiden_two_cliques --skip gds_page_rank_star --skip gds_page_rank_stale_projection_serves_live_storage
run: cargo test

build:
needs: lint
Expand Down Expand Up @@ -160,13 +154,14 @@ jobs:
wget -qO- --timeout=60 --tries=3 https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.asc
echo "deb http://apt.llvm.org/jammy llvm-toolchain-jammy-20 main" | sudo tee /etc/apt/sources.list.d/llvm20.list
# Apache Arrow repo (icebug's cxx bridge needs arrow headers).
# Pinned to 25.0.1: the icebug prebuilt links libarrow.so.2500; the
# repo now defaults to 26.x, which breaks test/runtime loads.
# Pinned to 26.0.0 to match the Linux icebug 13.5 prebuilt, which
# links libarrow.so.2600 (macOS/Windows 13.5 builds link
# libarrow.2500, so they stay on the Arrow 25 setup).
wget --timeout=60 --tries=3 https://apache.jfrog.io/artifactory/arrow/ubuntu/apache-arrow-apt-source-latest-jammy.deb
sudo apt-get install -y ./apache-arrow-apt-source-latest-jammy.deb
# Bound mirror stalls: fail fast instead of hanging the run for hours.
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 update
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends gcc-13 g++-13 cmake pkg-config libssl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libarrow-dev=25.0.1-1 libarrow2500=25.0.1-1 libomp-20-dev
sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends gcc-13 g++-13 cmake pkg-config libssl-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libarrow-dev=26.0.0-1 libarrow2600=26.0.0-1 libomp-20-dev
echo "CC=gcc-13" >> "$GITHUB_ENV"
echo "CXX=g++-13" >> "$GITHUB_ENV"

Expand Down Expand Up @@ -299,9 +294,6 @@ jobs:
# The test INSTALLs the algo extension from the official repo and
# LOADs it at runtime: its libarrow dep resolves via our rpaths
# (vendored above) on Unix, via PATH (vcpkg) on Windows.
# NOTE: the currently served algo builds segfault inside native
# code against pinned lbug 0.21.2 (see lint job) — same skip here
# until upstream publishes compatible bits.
if [ "$RUNNER_OS" = "Windows" ]; then
# NB: networkit_state.dll lives in the icebug/lib/networkit
# subdir (the win prebuilt splits GlobalState out of the static
Expand All @@ -314,7 +306,15 @@ jobs:
fi
# --lib --test selects only these targets so the GUI binary
# itself is not linked here (it gets built in the next step).
cargo test --release --target ${{ matrix.target }} --lib --test gds_page_rank -- --skip gds_page_rank_star --skip gds_page_rank_stale_projection_serves_live_storage
# The served 0.22.0 extension needs NetworKit symbols + Arrow 26:
# satisfiable on Linux (icebug 13.5 prebuilt + apt libarrow2600).
# macOS/Windows stay on the Arrow 25-era stack, where the extension
# can't LOAD (clean failure, but it fails the gate all the same),
# so those platforms skip the extension tests.
SKIP_ARGS="--skip gds_page_rank_star --skip gds_page_rank_stale_projection_serves_live_storage"
if [ "$RUNNER_OS" = "Linux" ]; then SKIP_ARGS=""; fi
# shellcheck disable=SC2086
cargo test --release --target ${{ matrix.target }} --lib --test gds_page_rank -- $SKIP_ARGS

- name: Build release binary
run: cargo build --release --target ${{ matrix.target }}
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ icebug-analytics = ["dep:icebug"]

[dependencies]
gpui = "0.2"
lbug = { version = "0.21.2", features = ["arrow"] }
lbug = { version = "0.22.0", features = ["arrow"] }
icebug = { version = "=13.2.0", optional = true }
# Pinned to 55 to match lbug's `arrow` (0.21.x uses arrow 55): lbug hands us
# Pinned to 55 to match lbug's `arrow` (0.21.x/0.22.x use arrow 55): lbug hands us
# Arrow batches built with its own arrow, so our decode types must be the
# same crate version or every `downcast_ref` silently yields nothing.
arrow = { version = "55", default-features = false, features = ["ffi", "prettyprint"] }
Expand Down
8 changes: 7 additions & 1 deletion scripts/download_icebug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"

REPOSITORY="${ICEBUG_GITHUB_REPOSITORY:-Ladybug-Memory/icebug}"
TARGET_DIR="${ICEBUG_TARGET_DIR:-$PROJECT_DIR/icebug}"
VERSION="${ICEBUG_VERSION:-13.4}"

OS="$(uname -s)"
ARCH="$(uname -m)"

# 13.5 pairs with the served 0.22.0 algo extension (its GDS entry points
# need NetworKit symbols added after 13.2). The macOS/Windows 13.5 builds
# link libarrow.2500, so the Arrow 25 setup there is unchanged; the Linux
# 13.5 build links libarrow.so.2600 (a release-pipeline mistake upstream,
# hence the Arrow 26 apt pin in CI). Overridable per run via ICEBUG_VERSION.
VERSION="${ICEBUG_VERSION:-13.5}"

case "$OS" in
Darwin)
ASSET_OS="macos"
Expand Down
Loading