Skip to content
Open
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
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v6
- name: Set up dependencies
run: |
apk add --update build-base libunwind-dev lz4-dev musl-dev python3-dev python3-dbg gdb lldb git bash perl perl-datetime build-base perl-app-cpanminus
apk add --update build-base lz4-dev musl-dev python3-dev python3-dbg gdb lldb git bash perl perl-datetime build-base perl-app-cpanminus
cpanm Date::Parse
cpanm Capture::Tiny
# Build elfutils
Expand All @@ -59,6 +59,14 @@ jobs:
cd elfutils-$VERS
CFLAGS='-Wno-error -DFNM_EXTMATCH=0 -g -O3' CXXFLAGS='-Wno-error -DFNM_EXTMATCH=0 -g -O3' ./configure --enable-libdebuginfod --disable-debuginfod --disable-nls --with-zstd
make install
# Build libunwind from source
cd /
LIBUNWIND_VERS=1.8.3
curl -LO https://github.com/libunwind/libunwind/releases/download/v$LIBUNWIND_VERS/libunwind-$LIBUNWIND_VERS.tar.gz
tar xf libunwind-$LIBUNWIND_VERS.tar.gz
cd libunwind-$LIBUNWIND_VERS
./configure --disable-minidebuginfo --prefix=/usr
make install
- name: Create virtual environment
run: |
python3 -m venv /venv
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/test_uv_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,22 @@ jobs:
sudo apt-get install -qy \
pkg-config \
libdebuginfod-dev \
libunwind-dev \
liblz4-dev \
gdb \
npm

- name: Build libunwind from source
run: |
cd /tmp
LIBUNWIND_VERS=1.8.3
curl -LO https://github.com/libunwind/libunwind/releases/download/v$LIBUNWIND_VERS/libunwind-$LIBUNWIND_VERS.tar.gz
tar xf libunwind-$LIBUNWIND_VERS.tar.gz
cd libunwind-$LIBUNWIND_VERS
./configure --disable-minidebuginfo --prefix=/usr/local
make
sudo make install
sudo ldconfig

- name: Install Python dependencies
run: |
uv pip install --upgrade pip cython pkgconfig
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,6 @@ src/vendor/libbacktrace/install

# pytest-textual-snapshot
snapshot_report.html

# Object files
*.o
32 changes: 27 additions & 5 deletions package-lock.json

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

24 changes: 21 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,14 @@ before-all = [
"CFLAGS='-Wno-error -g -O3' CXXFLAGS='-Wno-error -g -O3' LDFLAGS=-lrt ./configure --enable-libdebuginfod --disable-debuginfod --disable-nls --with-zstd",
"make install",

# Install Memray's other build and test dependencies
"yum install -y libunwind-devel",
# Build libunwind from source
"cd /",
"LIBUNWIND_VERS=1.8.3",
"/usr/bin/curl -LO https://github.com/libunwind/libunwind/releases/download/v$LIBUNWIND_VERS/libunwind-$LIBUNWIND_VERS.tar.gz",
"tar xf libunwind-$LIBUNWIND_VERS.tar.gz",
"cd libunwind-$LIBUNWIND_VERS",
"./configure --disable-minidebuginfo",
"make install",
]

[tool.cibuildwheel.macos]
Expand Down Expand Up @@ -138,6 +144,9 @@ show_missing = true
# Override the default linux before-all for musl linux
[[tool.cibuildwheel.overrides]]
select = "*-musllinux*"
# Exclude libgcc_s from bundling - it contains _Unwind_* symbols and having
# multiple copies (bundled + system) breaks C++ exception handling.
repair-wheel-command = "auditwheel repair --exclude libgcc_s.so.1 -w {dest_dir} {wheel}"
before-all = [
# Remove gettext-dev, which conficts with the musl-libintl, which is a build
# dependency of elfutils.
Expand All @@ -161,5 +170,14 @@ before-all = [
"apk add libintl",

# Install Memray's other build and test dependencies
"apk add --update libunwind-dev lz4-dev"
"apk add --update lz4-dev",

# Build libunwind from source
"cd /",
"LIBUNWIND_VERS=1.8.3",
"curl -LO https://github.com/libunwind/libunwind/releases/download/v$LIBUNWIND_VERS/libunwind-$LIBUNWIND_VERS.tar.gz",
"tar xf libunwind-$LIBUNWIND_VERS.tar.gz",
"cd libunwind-$LIBUNWIND_VERS",
"./configure --disable-minidebuginfo",
"make install",
]
Loading
Loading