chore: better separate ci jobs

min-heap
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} platform: ${PLATFORM}
pipeline: pipeline:
lint:
image: *image
pull: true
commands:
- make lint
when:
event: [push, pull_request]
build: build:
image: *image image: *image
pull: true
commands: commands:
- make - make
- make clean - make clean

View File

@ -48,6 +48,11 @@ $(BUILD_DIR)/$(SRC_DIR)/%.c.o: $(SRC_DIR)/%.c
test: build-test test: build-test
@ $(foreach bin,$(BINS_TEST),./$(bin);) @ $(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 .PHONY: build-test
build-test: $(BINS_TEST) build-test: $(BINS_TEST)