mirror of
https://codeberg.org/unspeaker/vestal.git
synced 2025-12-06 08:36:41 +01:00
This commit is contained in:
parent
07f6f82268
commit
b165573e55
14 changed files with 159 additions and 56 deletions
14
build/Dockerfile.glibc
Normal file
14
build/Dockerfile.glibc
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
FROM docker.io/library/debian:bookworm
|
||||
RUN apt update \
|
||||
&& apt install -y build-essential bash tree git wget \
|
||||
pkg-config libjack-dev liblilv-dev libserd-dev libsord-dev
|
||||
RUN adduser --quiet --uid 1000 --disabled-password build
|
||||
RUN wget https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init \
|
||||
&& chmod +x ./rustup-init \
|
||||
&& mv rustup-init /usr/bin/rustup-init
|
||||
USER build
|
||||
WORKDIR /home/build
|
||||
RUN rustup-init -yv --profile minimal --default-toolchain nightly \
|
||||
&& rm -rvf "$HOME/.rustup/roolchains/*/share"
|
||||
RUN ls -alh "$HOME" && bash -c '. "$HOME/.cargo/env" \
|
||||
&& cargo version -vv'
|
||||
13
build/Dockerfile.musl
Normal file
13
build/Dockerfile.musl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM docker.io/library/alpine:edge
|
||||
|
||||
RUN apk add --no-cache build-base bash tree rustup git just cloc clang20-dev pipewire-jack-dev
|
||||
|
||||
RUN adduser -Du1000 build
|
||||
|
||||
USER 1000
|
||||
|
||||
RUN rustup-init -y --profile minimal --default-toolchain nightly \
|
||||
&& rm -rvf "$HOME/.rustup/roolchains/*/share"
|
||||
|
||||
RUN source "$HOME/.cargo/env" \
|
||||
&& cargo version -vv
|
||||
11
build/README.md
Normal file
11
build/README.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
This directory contains Dockerfiles and shell scripts
|
||||
for building Tek in a container. For now, only the
|
||||
GLIBC build works, as the Musl static build is unable
|
||||
to `dlopen` the system's `libjack.so`.
|
||||
|
||||
Invoke from repo root, like this: `build/release-glibc.sh`.
|
||||
This will first build a Docker image, `tek:glibc`, which
|
||||
will contain all build-time dependencies; then, it
|
||||
will invoke a `cargo build --release` in a container
|
||||
spawned from that image, ultimately placing the
|
||||
release build in this directory, as `build/tek`.
|
||||
11
build/release-glibc-shell.sh
Executable file
11
build/release-glibc-shell.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env sh
|
||||
set -exo pipefail
|
||||
docker inspect vestal:glibc || time docker build --cache-from=internal \
|
||||
-f build/Dockerfile.glibc -t vestal:glibc .
|
||||
time docker run \
|
||||
--rm -itu0 \
|
||||
-v .:/build -w /build \
|
||||
-vvestal-build-cargo:/home/build/.cargo \
|
||||
-vvestal-build-target:/build/target \
|
||||
-eRUST_JACK_DLOPEN=true \
|
||||
vestal:glibc $@
|
||||
14
build/release-glibc.sh
Executable file
14
build/release-glibc.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env sh
|
||||
set -exo pipefail
|
||||
docker inspect vestal:glibc || time docker build --cache-from=internal \
|
||||
-f build/Dockerfile.glibc -t vestal:glibc .
|
||||
time docker run \
|
||||
--rm -itu0 \
|
||||
-v .:/build -w /build \
|
||||
-vvestal-build-cargo:/home/build/.cargo \
|
||||
-vvestal-build-target:/build/target \
|
||||
-eRUST_JACK_DLOPEN=true \
|
||||
vestal:glibc sh -c "chown -R 1000:1000 /build/target \
|
||||
&& su build -c '. ~/.cargo/env \
|
||||
&& time cargo build -j4 --release \
|
||||
&& cp target/release/vestal build/'"
|
||||
11
build/release-musl-shell.sh
Executable file
11
build/release-musl-shell.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env sh
|
||||
set -exo pipefail
|
||||
docker inspect vestal:musl || time docker build --cache-from=internal \
|
||||
-f build/Dockerfile.musl -t vestal:musl .
|
||||
time docker run \
|
||||
--rm -itu0 \
|
||||
-v .:/build -w /build \
|
||||
-vvestal-build-cargo:/home/build/.cargo \
|
||||
-vvestal-build-target:/build/target \
|
||||
-eRUST_JACK_DLOPEN=true \
|
||||
vestal:musl $@
|
||||
14
build/release-musl.sh
Executable file
14
build/release-musl.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env sh
|
||||
set -exo pipefail
|
||||
docker inspect vestal:musl || time docker build --cache-from=internal \
|
||||
-f build/Dockerfile.musl -t vestal:musl .
|
||||
time docker run \
|
||||
--rm -itu0 \
|
||||
-v .:/build -w /build \
|
||||
-vvestal-build-cargo:/home/build/.cargo \
|
||||
-vvestal-build-target:/build/target \
|
||||
-eRUST_JACK_DLOPEN=true \
|
||||
vestal:musl sh -c "chown -R 1000:1000 /build/target \
|
||||
&& su build -c 'source ~/.cargo/env \
|
||||
&& just build-release \
|
||||
&& cp target/release/vestal build/'"
|
||||
Loading…
Add table
Add a link
Reference in a new issue