chore: better separate ci jobs
ci/woodpecker/pr/lint Pipeline was successful Details
ci/woodpecker/pr/test Pipeline was successful Details
ci/woodpecker/pr/test-mem Pipeline failed Details

pull/4/head
Jef Roosens 2023-01-22 12:17:56 +01:00
parent 2cc974accc
commit 8609769389
4 changed files with 39 additions and 8 deletions

View File

@ -0,0 +1,15 @@
variables:
&image 'git.rustybever.be/chewing_bever/c-devop:alpine3.17'
branches:
exclude: [ main ]
platform: linux/amd64
pipeline:
lint:
image: *image
pull: true
commands:
- make lint
when:
event: [push, pull_request]

View File

@ -0,0 +1,18 @@
variables:
&image 'git.rustybever.be/chewing_bever/c-devop:alpine3.17'
branches:
exclude: [ main ]
platform: linux/amd64
depends_on:
- test
pipeline:
test:
image: *image
pull: true
commands:
- make test-mem
when:
event: [push, pull_request]

View File

@ -11,16 +11,9 @@ branches:
platform: ${PLATFORM}
pipeline:
lint:
image: *image
pull: true
commands:
- make lint
when:
event: [push, pull_request]
build:
image: *image
pull: true
commands:
- make
- make clean

View File

@ -48,6 +48,11 @@ $(BUILD_DIR)/$(SRC_DIR)/%.c.o: $(SRC_DIR)/%.c
test: build-test
@ $(foreach bin,$(BINS_TEST),./$(bin);)
.PHONY: test-mem
test-mem: build-test
@ $(foreach bin,$(BINS_TEST),valgrind --tool=memcheck --error-exitcode=1 \
--track-origins=yes --leak-check=full ./$(bin);)
.PHONY: build-test
build-test: $(BINS_TEST)