diff options
Diffstat (limited to 'dist')
-rwxr-xr-x | dist/ci-run.sh | 18 | ||||
-rw-r--r-- | dist/msys2-llvm/PKGBUILD (renamed from dist/msys2-mingw/llvm/PKGBUILD) | 2 | ||||
-rw-r--r-- | dist/msys2-mcode/PKGBUILD (renamed from dist/msys2-mingw/mcode/PKGBUILD) | 2 | ||||
-rw-r--r-- | dist/msys2-mingw/run.sh | 91 |
4 files changed, 17 insertions, 96 deletions
diff --git a/dist/ci-run.sh b/dist/ci-run.sh index cd4a2572b..1db79fc34 100755 --- a/dist/ci-run.sh +++ b/dist/ci-run.sh @@ -420,12 +420,24 @@ ci_run () { if [ "x$IS_MACOS" = "xtrue" ]; then CC=clang \ prefix="`cd ./install-mcode; pwd`/usr/local" \ - ./testsuite/testsuite.sh sanity gna vests vpi + ./testsuite/testsuite.sh sanity pyunit gna vests vpi else # Build ghdl/ghdl:$GHDL_IMAGE_TAG image build_img_ghdl + case "$GHDL_IMAGE_TAG" in + *ubuntu*) + GHDL_TEST_IMAGE="test:$GHDL_IMAGE_TAG-py" + docker build -t "$GHDL_TEST_IMAGE" - <<-EOF +FROM ghdl/ghdl:$GHDL_IMAGE_TAG +RUN apt update -qq && apt install -y python +EOF + ;; + *) + GHDL_TEST_IMAGE="ghdl/ghdl:$GHDL_IMAGE_TAG" + ;; + esac # Run test in docker container - tests="sanity" + tests="sanity pyunit" if [ "x$ISGPL" != "xtrue" ]; then tests="$tests gna" fi @@ -434,7 +446,7 @@ ci_run () { tests="$tests synth" fi tests="$tests vpi" - $RUN "ghdl/ghdl:$GHDL_IMAGE_TAG" bash -c "GHDL=ghdl ./testsuite/testsuite.sh $tests" + $RUN "$GHDL_TEST_IMAGE" bash -c "GHDL=ghdl ./testsuite/testsuite.sh $tests" fi if [ ! -f testsuite/test_ok ]; then diff --git a/dist/msys2-mingw/llvm/PKGBUILD b/dist/msys2-llvm/PKGBUILD index 9fe2c28bd..6de6916dc 100644 --- a/dist/msys2-mingw/llvm/PKGBUILD +++ b/dist/msys2-llvm/PKGBUILD @@ -13,7 +13,7 @@ build() { cd "${srcdir}/builddir" export CC=clang export CXX=clang++ - ../../../../../configure --prefix=${MINGW_PREFIX} --with-llvm-config="llvm-config --link-static" LDFLAGS="-static" --enable-libghdl --enable-synth + ../../../../configure --prefix=${MINGW_PREFIX} --with-llvm-config="llvm-config --link-static" LDFLAGS="-static" --enable-libghdl --enable-synth make GNATMAKE="gnatmake -j$(nproc)" } diff --git a/dist/msys2-mingw/mcode/PKGBUILD b/dist/msys2-mcode/PKGBUILD index 75205b025..70423d64d 100644 --- a/dist/msys2-mingw/mcode/PKGBUILD +++ b/dist/msys2-mcode/PKGBUILD @@ -11,7 +11,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-gcc-ada") build() { mkdir "${srcdir}/builddir" cd "${srcdir}/builddir" - ../../../../../configure --prefix=${MINGW_PREFIX} LDFLAGS=-static --enable-libghdl --enable-synth + ../../../../configure --prefix=${MINGW_PREFIX} LDFLAGS=-static --enable-libghdl --enable-synth make GNATMAKE="gnatmake -j$(nproc)" } diff --git a/dist/msys2-mingw/run.sh b/dist/msys2-mingw/run.sh deleted file mode 100644 index 186520b05..000000000 --- a/dist/msys2-mingw/run.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh - -cd $(dirname $0) - -# Stop in case of error -set -e - -enable_color() { - ENABLECOLOR='-c ' - ANSI_RED="\033[31m" - ANSI_GREEN="\033[32m" - ANSI_YELLOW="\033[33m" - ANSI_BLUE="\033[34m" - ANSI_MAGENTA="\033[35m" - ANSI_GRAY="\033[90m" - ANSI_CYAN="\033[36;1m" - ANSI_DARKCYAN="\033[36m" - ANSI_NOCOLOR="\033[0m" -} - -disable_color() { unset ENABLECOLOR ANSI_RED ANSI_GREEN ANSI_YELLOW ANSI_BLUE ANSI_MAGENTA ANSI_CYAN ANSI_DARKCYAN ANSI_NOCOLOR; } -enable_color - -print_start() { - if [ "x$2" != "x" ]; then - COL="$2" - elif [ "x$BASE_COL" != "x" ]; then - COL="$BASE_COL" - else - COL="$ANSI_YELLOW" - fi - printf "${COL}${1}$ANSI_NOCOLOR\n" -} - -gstart () { - print_start "$@" -} -gend () { - : -} -gblock () { - gstart "$1" - shift - $@ - gend -} - -[ -n "$CI" ] && { - echo "INFO: set 'gstart' and 'gend' for CI" - gstart () { - printf '::group::' - print_start "$@" - SECONDS=0 - } - - gend () { - duration=$SECONDS - echo '::endgroup::' - printf "${ANSI_GRAY}took $(($duration / 60)) min $(($duration % 60)) sec.${ANSI_NOCOLOR}\n" - } -} || echo "INFO: not in CI" - -#--- - -if [ -z "$TARGET" ]; then - printf "${ANSI_RED}Undefined TARGET!$ANSI_NOCOLOR" - exit 1 -fi -cd "$TARGET" - -# The command 'git describe' (used for version) needs the history. Get it. -# But the following command fails if the repository is complete. -gblock "Fetch --unshallow" git fetch --unshallow || true - -case "$MINGW_INSTALLS" in - *32) - TARBALL_ARCH="i686" - ;; - *64) - TARBALL_ARCH="x86_64" - ;; - *) - printf "${ANSI_RED}Unknown MINGW_INSTALLS=${MINGW_INSTALLS}!$ANSI_NOCOLOR" - exit 1 -esac - -gblock 'Install toolchain' pacman -S --noconfirm --needed base-devel mingw-w64-${TARBALL_ARCH}-toolchain -gblock 'Build package' makepkg-mingw --noconfirm --noprogressbar -sCLf --noarchive -gblock 'Archive package' makepkg-mingw --noconfirm --noprogressbar -R -gblock 'List artifacts' ls -la -gblock 'Install package' pacman --noconfirm -U "mingw-w64-${TARBALL_ARCH}-ghdl-${TARGET}-ci"-*-any.pkg.tar.zst |