fix(ci): add static libarchive flags
Some checks failed
ci/woodpecker/push/build Pipeline failed
ci/woodpecker/push/clippy Pipeline failed
ci/woodpecker/push/lint Pipeline was successful

This commit is contained in:
Jef Roosens 2024-07-07 11:11:31 +02:00
parent a67c33bff2
commit 7546ec9c5f
Signed by: Jef Roosens
GPG key ID: B75D4F293C7052DB

View file

@ -8,8 +8,14 @@ when:
steps: steps:
build: build:
image: 'rust:1.79-alpine3.19' image: 'rust:1.79-alpine3.19'
environment:
- 'LIBARCHIVE_STATIC=1'
- 'LIBARCHIVE_LIB_DIR=/usr/lib'
- 'LIBARCHIVE_INCLUDE_DIR=/usr/include'
- 'LIBARCHIVE_LDFLAGS=-lssl -lcrypto -L/lib -lz -lbz2 -llzma -lexpat -lzstd -llz4'
- 'LIBARCHIVE_LDFLAGS=-L/usr/lib -lz -lbz2 -llzma -lexpat -lzstd -llz4 -lsqlite3'
commands: commands:
- apk add --no-cache build-base libarchive libarchive-dev - apk add --no-cache build-base libarchive-static libarchive-dev
- cargo build --verbose - cargo build --verbose
# Binaries, even debug ones, should be statically compiled # Binaries, even debug ones, should be statically compiled
- '[ "$(readelf -d target/debug/rieterd | grep NEEDED | wc -l)" = 0 ]' - '[ "$(readelf -d target/debug/rieterd | grep NEEDED | wc -l)" = 0 ]'