Skip to content

Commit ffbf24d

Browse files
committed
Add bloaty
1 parent 152a84c commit ffbf24d

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.github/workflows/build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- rust-linux
2222
- vast
2323
- mads
24+
- bloaty
2425
steps:
2526
- name: Docker Setup Buildx
2627
uses: docker/setup-buildx-action@v2

Dockerfile.bloaty

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM ubuntu:20.04
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
RUN apt update -y -q && apt upgrade -y -q && apt update -y -q && \
5+
apt install -y -q \
6+
build-essential \
7+
curl \
8+
git \
9+
libzstd-dev
10+
11+
RUN apt install -y -q \
12+
cmake \
13+
unzip
14+
15+
RUN curl -L -o ninja-linux.zip https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip && \
16+
unzip ninja-linux.zip && \
17+
mv ninja /usr/bin/ninja
18+
19+
RUN mkdir -p /root
20+
COPY bloaty /root/
21+
COPY common.sh /root/
22+
23+
WORKDIR /root

bloaty/build.sh

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
source common.sh
5+
6+
VERSION=$1
7+
8+
URL=https://github.com/google/bloaty/releases/download/v${VERSION}/bloaty-${VERSION}.tar.bz2
9+
10+
FULLNAME=bloaty-${VERSION}.tar.xz
11+
OUTPUT=$2/${FULLNAME}
12+
13+
REVISION="bloaty-${VERSION}"
14+
LAST_REVISION="${3:-}"
15+
16+
initialise "${REVISION}" "${OUTPUT}" "${LAST_REVISION}"
17+
18+
PREFIX=$(pwd)/prefix
19+
DIR=$(pwd)/build
20+
21+
mkdir "${DIR}"
22+
cd "${DIR}"
23+
curl -sL "${URL}" | tar jxf - --strip-components 1
24+
25+
mkdir build
26+
cd build
27+
# For unknown reasons the `--install-prefix` didn't work so I added the -DCMAKE_INSTALL_PREFIX too
28+
cmake --install-prefix "${PREFIX}" -DCMAKE_INSTALL_PREFIX:PATH="${PREFIX}" -GNinja "${DIR}"
29+
cmake --build .
30+
cmake --install .
31+
32+
complete "${PREFIX}" "bloaty-${VERSION}" "${OUTPUT}"

0 commit comments

Comments
 (0)