Skip to content

Commit eed45cd

Browse files
committed
ci: add scripts to build a deb for Debian Buster
glibc is fine, but build it in a container to avoid contamination of incompatible libs in Arch.
1 parent 4db943b commit eed45cd

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

ci/docker/buster/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM rust:1-buster
2+
3+
RUN set -x && \
4+
apt-get update && \
5+
apt-get -y upgrade && \
6+
apt-get install -y --no-install-recommends asciidoctor && \
7+
cargo install cargo-deb && \
8+
chmod -R ugo+rwX $CARGO_HOME
9+
10+
CMD ["bash"]

ci/docker/buster/build-deb.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
run() {
4+
echo "+ $*" >&2
5+
"$@"
6+
}
7+
8+
set -e
9+
10+
if [[ ! -f Cargo.lock ]]; then
11+
echo "Please run from the root of ripgrep's repo" >&2
12+
exit 1
13+
fi
14+
15+
DOCKER_IMAGE=aswild/ripgrep-builder:buster
16+
_uid=$(id -u)
17+
_gid=$(id -g)
18+
19+
if ! docker inspect --type image $DOCKER_IMAGE &>/dev/null; then
20+
echo >&2 "Image $DOCKER_IMAGE not found, building"
21+
run docker build -t $DOCKER_IMAGE ci/docker/buster
22+
fi
23+
24+
run docker run -t --rm \
25+
--user "${_uid}:${_gid}" \
26+
--volume "$PWD:/ripgrep" \
27+
--workdir /ripgrep \
28+
$DOCKER_IMAGE \
29+
ci/build-deb

0 commit comments

Comments
 (0)