2023-07-31 18:13:55 +02:00
|
|
|
platform: 'linux/amd64'
|
|
|
|
|
2023-08-13 20:24:34 +02:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
exclude: [main]
|
2024-07-07 10:53:16 +02:00
|
|
|
event: push
|
2023-08-13 20:24:34 +02:00
|
|
|
|
|
|
|
steps:
|
2023-07-31 18:13:55 +02:00
|
|
|
build:
|
2024-07-07 10:53:16 +02:00
|
|
|
image: 'rust:1.79-alpine3.19'
|
2024-07-07 11:11:31 +02:00
|
|
|
environment:
|
|
|
|
- 'LIBARCHIVE_STATIC=1'
|
2023-07-31 18:13:55 +02:00
|
|
|
commands:
|
2024-07-07 12:47:28 +02:00
|
|
|
# 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
|
2023-07-31 18:13:55 +02:00
|
|
|
- cargo build --verbose
|
2024-07-07 10:51:27 +02:00
|
|
|
# Binaries, even debug ones, should be statically compiled
|
|
|
|
- '[ "$(readelf -d target/debug/rieterd | grep NEEDED | wc -l)" = 0 ]'
|
2023-07-31 18:13:55 +02:00
|
|
|
|