From 5da826e664c5869c3dc599a09be7a6aa85404a5f Mon Sep 17 00:00:00 2001 From: Dan Church Date: Wed, 16 Nov 2022 13:28:06 -0600 Subject: [PATCH] CI: Add gitlab-ci.yml --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ t/run.sh | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..7d7fce5 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +stages: + - build + - test + +build-allinone: + stage: build + script: + - ./make-allinone.sh + artifacts: + expire_in: 1 day + paths: + - simplify_static_dir.pl + +test-run: + stage: test + script: + - t/run.sh + +test-run-allinone: + stage: test + dependencies: + - build-allinone + script: + - SCRIPT=~+/simplify_static_dir.pl t/run.sh diff --git a/t/run.sh b/t/run.sh index 708ecd7..f8dd97e 100755 --- a/t/run.sh +++ b/t/run.sh @@ -3,7 +3,7 @@ WORKDIR=${0%/*} . "$WORKDIR/funcs.sh" -SCRIPT=$(realpath -- "$WORKDIR/../simplify_static_dir-main.pl") +SCRIPT=${SCRIPT:-$(realpath -- "$WORKDIR/../simplify_static_dir-main.pl")} TAR=$(realpath -- "$WORKDIR/t.tar") TEMPDIR=$(mktemp -d -t "${0##*/}.XXXXXX")