vieter/.woodpecker/.build.yml

31 lines
731 B
YAML
Raw Normal View History

matrix:
PLATFORM:
- linux/amd64
- linux/arm64
2022-01-15 14:35:12 +00:00
- linux/arm/v7
2022-01-13 14:29:43 +00:00
# These checks already get performed on the feature branches
branches:
exclude: [ main, dev ]
2022-01-15 14:30:09 +00:00
platform: ${PLATFORM}
2022-01-13 14:29:43 +00:00
2022-01-13 12:40:33 +00:00
pipeline:
2022-01-15 14:49:19 +00:00
# The default build isn't needed, as alpine switches to gcc for the compiler anyways
2022-01-13 12:40:33 +00:00
debug:
image: 'chewingbever/vlang:latest'
group: 'build'
commands:
- make debug
prod:
image: 'chewingbever/vlang:latest'
2022-01-14 17:32:00 +00:00
environment:
2022-01-14 17:36:36 +00:00
- LDFLAGS=-lz -lbz2 -llzma -lexpat -lzstd -llz4 -static
2022-01-13 12:40:33 +00:00
group: 'build'
commands:
- make prod
# Make sure the binary is actually static
2022-01-14 19:43:11 +00:00
- readelf -d pvieter
2022-01-14 20:50:43 +00:00
- du -h pvieter
2022-01-14 19:43:11 +00:00
- '[ "$(readelf -d pvieter | grep NEEDED | wc -l)" = 0 ]'