lander/.woodpecker/build.yml

65 lines
2.2 KiB
YAML
Raw Permalink Normal View History

matrix:
PLATFORM:
- 'linux/amd64'
2023-12-30 16:59:47 +01:00
- 'linux/arm64'
platform: ${PLATFORM}
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 ]'
2023-11-17 14:35:28 +01:00
publish-dev:
image: 'alpine:3.18.0'
2023-11-17 14:35:28 +01:00
group: publish
commands:
- apk add --no-cache minio-client
- mcli alias set rb 'https://s3.rustybever.be' "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"
2023-12-30 16:59:47 +01:00
- mcli cp build/lander "rb/lander/commits/$CI_COMMIT_SHA/lander-$(echo '${PLATFORM}' | sed 's:/:-:g')"
- mcli cp landerctl/build/landerctl "rb/lander/commits/$CI_COMMIT_SHA/landerctl-$(echo '${PLATFORM}' | sed 's:/:-:g')"
secrets:
- minio_access_key
- minio_secret_key
2023-11-19 13:41:59 +01:00
when:
branch: dev
event: push
2023-11-17 14:35:28 +01:00
publish-rel:
image: 'curlimages/curl'
2023-11-17 14:35:28 +01:00
group: publish
commands:
- >
curl -s --fail
--user "Chewing_Bever:$GITEA_PASSWORD"
--upload-file build/lander
https://git.rustybever.be/api/packages/Chewing_Bever/generic/lander/"${CI_COMMIT_TAG}"/lander-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
- >
curl -s --fail
--user "Chewing_Bever:$GITEA_PASSWORD"
--upload-file landerctl/build/landerctl
https://git.rustybever.be/api/packages/Chewing_Bever/generic/lander/"${CI_COMMIT_TAG}"/landerctl-"$(echo '${PLATFORM}' | sed 's:/:-:g')"
2023-11-19 13:41:59 +01:00
secrets:
- gitea_password
2023-11-17 14:35:28 +01:00
when:
event: tag