feat(ci): use custom builder image
parent
68ce684c77
commit
9cec2e0dc2
|
@ -7,26 +7,15 @@ when:
|
|||
|
||||
steps:
|
||||
build:
|
||||
image: 'rust:1.79-alpine3.19'
|
||||
environment:
|
||||
- 'LIBARCHIVE_STATIC=1'
|
||||
image: 'git.rustybever.be/chewing_bever/rieter-builder:1.79-alpine3.19'
|
||||
commands:
|
||||
# Dependencies required to statically compile libarchive and libsqlite3
|
||||
- >
|
||||
apk add --no-cache build-base
|
||||
libarchive-static libarchive-dev
|
||||
zlib-static
|
||||
openssl-libs-static
|
||||
bzip2-static
|
||||
xz-static
|
||||
expat-static
|
||||
zstd-static
|
||||
lz4-static
|
||||
acl-static
|
||||
- cargo build --verbose
|
||||
# Binaries, even debug ones, should be statically compiled
|
||||
- '[ "$(readelf -d target/debug/rieterd | grep NEEDED | wc -l)" = 0 ]'
|
||||
|
||||
# Clippy also performs a full build, so putting it here saves the CI a
|
||||
# lot of work
|
||||
- rustup component add clippy
|
||||
clippy:
|
||||
image: 'git.rustybever.be/chewing_bever/rieter-builder:1.79-alpine3.19'
|
||||
commands:
|
||||
- cargo clippy -- --no-deps -Dwarnings
|
||||
|
|
|
@ -7,7 +7,6 @@ when:
|
|||
|
||||
steps:
|
||||
lint:
|
||||
image: 'rust:1.79-alpine3.19'
|
||||
image: 'git.rustybever.be/chewing_bever/rieter-builder:1.79-alpine3.19'
|
||||
commands:
|
||||
- rustup component add rustfmt
|
||||
- cargo fmt -- --check
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# Command to build and push builder image (change tags as necessary):
|
||||
# docker buildx build -f build.Dockerfile -t git.rustybever.be/chewing_bever/rieter-builder:1.79-alpine3.19 --platform linux/amd64,linux/arm64 --push .
|
||||
FROM rust:1.79-alpine3.19
|
||||
|
||||
# Dependencies required to statically compile libarchive and libsqlite3
|
||||
RUN apk add --no-cache \
|
||||
build-base \
|
||||
libarchive-static libarchive-dev \
|
||||
zlib-static \
|
||||
openssl-libs-static \
|
||||
bzip2-static \
|
||||
xz-static \
|
||||
expat-static \
|
||||
zstd-static \
|
||||
lz4-static \
|
||||
acl-static && \
|
||||
rustup component add clippy rustfmt
|
||||
|
||||
# Tell the libarchive3-sys package to statically link libarchive
|
||||
ENV LIBARCHIVE_STATIC=1
|
Loading…
Reference in New Issue