diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f005f67 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,66 @@ +stages: + - build + - test + +.build: + stage: build + before_script: + - apt-get update && apt-get install -y build-essential exim4-dev libsodium-dev + script: + - cd src + - make all + artifacts: + paths: + - src/genkey + - src/libexim-encrypt-dlfunc.so + +build:buster: + extends: + - .build + image: debian:buster + +build:bullseye: + image: debian:bullseye + extends: + - .build + +build:bionic: + image: ubuntu:bionic + extends: + - .build + +build:focal: + image: ubuntu:focal + extends: + - .build +.test: + stage: test + before_script: + - apt-get update && apt-get install -y exim4-daemon-heavy openssl libsodium23 + script: + - cd src + - ./simple_exim_test.sh + +test:buster: + extends: + - .test + needs: ["build:buster"] + image: debian:buster + +test:bullseye: + extends: + - .test + needs: ["build:bullseye"] + image: debian:bullseye + +test:bionic: + extends: + - .test + needs: ["build:bionic"] + image: ubuntu:bionic + +test:focal: + extends: + - .test + needs: ["build:focal"] + image: ubuntu:focal diff --git a/src/Makefile b/src/Makefile index 9ef30e9..5964293 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,11 +1,11 @@ CC=gcc -CFLAGS=-I/usr/include/exim4 -g -O2 -ffile-prefix-map=/=. -fstack-protector-strong -Wformat -Werror=format-security -LDFLAGS=-Wl,-z,relro -lsodium -LDFLAGS_LIB=-fpic -shared -export-dynamic +CFLAGS=-I/usr/include/exim4 -g +LDFLAGS=-lsodium +LDFLAGS_LIB=-fpic -shared .PHONY: clean all -.DEFAULT_GOAL := libexim-encrypt-dlfunc.so +.DEFAULT_GOAL := all libexim-encrypt-dlfunc.so: libexim-encrypt-dlfunc.c $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_LIB)