From c6d109d477a16ca39027cd624dfd3517bfdcc5e0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 27 Apr 2023 20:43:30 +0200 Subject: ci.sh: build w/ gcc & clang --- ci.sh | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/ci.sh b/ci.sh index 683425b..9cbef74 100755 --- a/ci.sh +++ b/ci.sh @@ -3,4 +3,29 @@ set -o errexit -o nounset -o pipefail shopt -s inherit_errexit lastpipe -docker-compose build --progress plain --pull +test_build() { + docker-compose build --progress plain --pull "$@" +} + +test_build_clang() { + echo ---------------------------------------------------------------------- + echo Building w/ clang + echo ---------------------------------------------------------------------- + echo + test_build --build-arg C_COMPILER=clang +} + +test_build_gcc() { + echo ---------------------------------------------------------------------- + echo Building w/ gcc + echo ---------------------------------------------------------------------- + echo + test_build --build-arg C_COMPILER=gcc +} + +main() { + test_build_clang + test_build_gcc +} + +main -- cgit v1.2.3