From b1b64fba1f54d3b1ee2656c13884471cf2b1b3a5 Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 29 Dec 2020 01:04:37 +0100 Subject: ci: install requirements in temporary containers --- dist/ci-run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dist') diff --git a/dist/ci-run.sh b/dist/ci-run.sh index 928fa201a..e71229194 100755 --- a/dist/ci-run.sh +++ b/dist/ci-run.sh @@ -427,9 +427,12 @@ ci_run () { case "$GHDL_IMAGE_TAG" in *ubuntu*|*buster*) GHDL_TEST_IMAGE="test:$GHDL_IMAGE_TAG-py" - docker build -t "$GHDL_TEST_IMAGE" - <<-EOF + docker build -t "$GHDL_TEST_IMAGE" . -f- <<-EOF +# syntax=docker/dockerfile:experimental FROM ghdl/ghdl:$GHDL_IMAGE_TAG -RUN apt update -qq && apt install -y python3 +RUN apt update -qq && apt install -y python3 python3-pip +RUN --mount=type=bind,src=./,target=/tmp/ghdl/ \ + pip3 install -r /tmp/ghdl/testsuite/requirements.txt EOF ;; *) -- cgit v1.2.3 From 12ef35a90d65dbd6f542698f6c517403402b4fa5 Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 29 Dec 2020 01:53:24 +0100 Subject: ci: skip pyunit on Ubuntu <20 --- dist/ci-run.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'dist') diff --git a/dist/ci-run.sh b/dist/ci-run.sh index e71229194..5a78d080f 100755 --- a/dist/ci-run.sh +++ b/dist/ci-run.sh @@ -424,8 +424,11 @@ ci_run () { else # Build ghdl/ghdl:$GHDL_IMAGE_TAG image build_img_ghdl + + tests="sanity" + case "$GHDL_IMAGE_TAG" in - *ubuntu*|*buster*) + *ubuntu20*|*buster*) GHDL_TEST_IMAGE="test:$GHDL_IMAGE_TAG-py" docker build -t "$GHDL_TEST_IMAGE" . -f- <<-EOF # syntax=docker/dockerfile:experimental @@ -434,21 +437,26 @@ RUN apt update -qq && apt install -y python3 python3-pip RUN --mount=type=bind,src=./,target=/tmp/ghdl/ \ pip3 install -r /tmp/ghdl/testsuite/requirements.txt EOF + tests+=" pyunit" ;; *) GHDL_TEST_IMAGE="ghdl/ghdl:$GHDL_IMAGE_TAG" ;; esac - # Run test in docker container - tests="sanity pyunit" + if [ "x$ISGPL" != "xtrue" ]; then - tests="$tests gna" + tests+=" gna" fi - tests="$tests vests" + + tests+=" vests" + if [ "x$ISSYNTH" = "xtrue" ]; then - tests="$tests synth" + tests+=" synth" fi - tests="$tests vpi" + + tests+=" vpi" + + # Run tests in docker container $RUN "$GHDL_TEST_IMAGE" bash -c "GHDL=ghdl ./testsuite/testsuite.sh $tests" fi -- cgit v1.2.3 From 718da371523f37a45cbca6c83cc26ef84b7140ec Mon Sep 17 00:00:00 2001 From: umarcor Date: Tue, 29 Dec 2020 01:54:51 +0100 Subject: ci: skip pyunit on macOS (because libghdl is disabled) --- dist/ci-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dist') diff --git a/dist/ci-run.sh b/dist/ci-run.sh index 5a78d080f..c61169f9f 100755 --- a/dist/ci-run.sh +++ b/dist/ci-run.sh @@ -420,7 +420,7 @@ ci_run () { if [ "x$IS_MACOS" = "xtrue" ]; then CC=clang \ prefix="`cd ./install-mcode; pwd`/usr/local" \ - ./testsuite/testsuite.sh sanity pyunit gna vests vpi + ./testsuite/testsuite.sh sanity gna vests vpi else # Build ghdl/ghdl:$GHDL_IMAGE_TAG image build_img_ghdl -- cgit v1.2.3