feat(ci): add pipeline to publish dev static binaries
parent
5dc9b99a0a
commit
8d8aef8111
|
@ -0,0 +1,41 @@
|
|||
matrix:
|
||||
PLATFORM:
|
||||
- 'linux/amd64'
|
||||
|
||||
platform: ${PLATFORM}
|
||||
branches:
|
||||
exclude: [ main ]
|
||||
|
||||
pipeline:
|
||||
build-lander:
|
||||
image: 'alpine:edge'
|
||||
commands:
|
||||
- apk add --no-cache build-base make
|
||||
- make CFLAGS='-O3' LDFLAGS='-flto -static'
|
||||
- strip -s build/lander
|
||||
- du -h build/lander
|
||||
- '[ "$(readelf -d build/lander | grep NEEDED | wc -l)" = 0 ]'
|
||||
|
||||
build-landerctl:
|
||||
image: 'alpine:3.18.0'
|
||||
commands:
|
||||
- >
|
||||
apk add --no-cache
|
||||
build-base git make curl-static curl-dev file-dev libmagic-static
|
||||
openssl-libs-static openssl-dev libidn2-static libidn2-dev
|
||||
nghttp2-static nghttp2-dev libunistring-static libunistring-dev
|
||||
brotli-static brotli-dev zlib-static zlib-dev
|
||||
- make -C landerctl CFLAGS='-O3' LDFLAGS='-flto -static' LIBS='magic curl ssl nghttp2 crypto idn2 unistring brotlidec brotlienc brotlicommon z'
|
||||
- strip -s landerctl/build/landerctl
|
||||
- du -h landerctl/build/landerctl
|
||||
- '[ "$(readelf -d landerctl/build/landerctl | grep NEEDED | wc -l)" = 0 ]'
|
||||
|
||||
upload:
|
||||
image: 'alpine:3.18.0'
|
||||
commands:
|
||||
- apk add --no-cache minio-client
|
||||
- mcli alias set rb 'https://s3.rustybever.be' "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"
|
||||
- mcli cp build/lander landerctl/build/landerctl "rb/lander/commits/$CI_COMMIT_SHA/"
|
||||
secrets:
|
||||
- minio_access_key
|
||||
- minio_secret_key
|
Loading…
Reference in New Issue