Repository navigation
Expand file tree
/
Copy pathJustfile
More file actions
60 lines (50 loc) · 2.11 KB
/
Copy pathJustfile
File metadata and controls
60 lines (50 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Builds a specific valgrind version
# Usage:
# - just build 3.24.0: Downloads the specified version from sourceware.org, builds and installs it
# - just build local: Builds the local source tree
build version:
#!/usr/bin/env bash
set -euo pipefail
mkdir -p /tmp/valgrind-build
rm -rf /tmp/valgrind-build/valgrind-{{ version }}*
if [ "{{ version }}" = "local" ]; then
cp -r . /tmp/valgrind-build/valgrind-local
else
wget -q -O /tmp/valgrind-build/valgrind-{{ version }}.tar.bz2 \
https://sourceware.org/pub/valgrind/valgrind-{{ version }}.tar.bz2
tar -xjf /tmp/valgrind-build/valgrind-{{ version }}.tar.bz2 \
-C /tmp/valgrind-build
fi
just build-in "/tmp/valgrind-build/valgrind-{{ version }}"
build-in dir:
#!/usr/bin/env bash
set -euo pipefail
cd "{{ dir }}"
# Check if we need to run autogen.sh (for git checkouts)
if [ -f "autogen.sh" ] && [ ! -f "configure" ]; then
./autogen.sh
fi
# 64-bit only: CodSpeed runs the 64-bit tool, and cycle estimation needs a
# 64-bit Capstone, so the 32-bit secondary build (which has no Capstone) is
# skipped.
./configure --enable-only64bit
# Full parallel build: `make install` depends on `all`, so anything
# skipped here gets rebuilt serially at install time instead.
make -j$(nproc)
install version:
#!/usr/bin/env bash
set -euo pipefail
cd "/tmp/valgrind-build/valgrind-{{ version }}"
sudo make install
# Builds the .deb for an Ubuntu release in Docker with docker/deb.Dockerfile, like the release
# workflow but unsigned, then installs it and runs Callgrind on it. The package lands in dist/
# under its release asset name. Builds the tracked files of the working tree, local changes
# included.
# Usage: just docker-deb 26.04
docker-deb ubuntu_version:
#!/usr/bin/env bash
set -euo pipefail
git submodule update --init --recursive
git ls-files -z --recurse-submodules | tar --null -T - -cf - |
docker build -f docker/deb.Dockerfile --build-arg UBUNTU_VERSION="{{ ubuntu_version }}" \
--output type=local,dest=dist -