diff options
author | umarcor <38422348+umarcor@users.noreply.github.com> | 2020-05-20 06:45:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 06:45:00 +0200 |
commit | 0e39a575da602ee833996c6ac30adc7c9069622e (patch) | |
tree | db57c920a4a9b6e52958d1ebb981006ceede5684 /dist | |
parent | 42cbe9183ac8f2138ef827180baae4beaee2d3f1 (diff) | |
download | ghdl-0e39a575da602ee833996c6ac30adc7c9069622e.tar.gz ghdl-0e39a575da602ee833996c6ac30adc7c9069622e.tar.bz2 ghdl-0e39a575da602ee833996c6ac30adc7c9069622e.zip |
rework 'version.tmp' (#1320)
* msys2: work around makepkg hanging at the end of build()
* ci: update actions/checkout to v2
* make: allow setting default description through GHDL_DESC
* ci: ensure clean git describe on MSYS2
Diffstat (limited to 'dist')
-rwxr-xr-x | dist/ci-run.sh | 11 | ||||
-rw-r--r-- | dist/msys2-mingw/llvm/PKGBUILD | 1 | ||||
-rw-r--r-- | dist/msys2-mingw/mcode/PKGBUILD | 1 | ||||
-rw-r--r-- | dist/msys2-mingw/run.sh | 15 |
4 files changed, 14 insertions, 14 deletions
diff --git a/dist/ci-run.sh b/dist/ci-run.sh index 131658cff..87e130e21 100755 --- a/dist/ci-run.sh +++ b/dist/ci-run.sh @@ -402,21 +402,12 @@ ci_run () { else # Assume linux - gstart "[CI] Build version.tmp and replace version.in with it (so that the version is correctly set)" "$ANSI_BLUE" - # This is a little bit hack-ish, as it assumes that 'git' is not - # available in docker (otherwise it will describe as -dirty - # because this modifies the source file version.in). - ghdl_version_line=`grep -e '^ghdl_version' configure` - make -f Makefile.in srcdir=. $ghdl_version_line version.tmp - cp version.tmp src/version.in - gend - gstart "[CI] Docker pull ghdl/build:$BUILD_IMAGE_TAG" "$ANSI_BLUE" docker pull ghdl/build:$BUILD_IMAGE_TAG gend printf "$ANSI_BLUE[CI] Build ghdl in docker image ghdl/build:$BUILD_IMAGE_TAG\n" - $RUN -e CONFIG_OPTS="$CONFIG_OPTS" "ghdl/build:$BUILD_IMAGE_TAG" bash -c "${scriptdir}/ci-run.sh $BUILD_CMD_OPTS build" + $RUN -e GHDL_DESC="$(git describe --dirty)@${BUILD_IMAGE_TAG}" -e CONFIG_OPTS="$CONFIG_OPTS" "ghdl/build:$BUILD_IMAGE_TAG" bash -c "${scriptdir}/ci-run.sh $BUILD_CMD_OPTS build" fi if [ ! -f build_ok ]; then diff --git a/dist/msys2-mingw/llvm/PKGBUILD b/dist/msys2-mingw/llvm/PKGBUILD index a947aa1e3..3fa78522d 100644 --- a/dist/msys2-mingw/llvm/PKGBUILD +++ b/dist/msys2-mingw/llvm/PKGBUILD @@ -19,6 +19,7 @@ build() { cd "${srcdir}/builddir" ../../../../../configure --prefix=${MINGW_PREFIX} --with-llvm-config="llvm-config --link-static" LDFLAGS="-static" --enable-libghdl --enable-synth make GNATMAKE="gnatmake -j$(nproc)" + exit } package() { diff --git a/dist/msys2-mingw/mcode/PKGBUILD b/dist/msys2-mingw/mcode/PKGBUILD index 591fa6693..79c0c399f 100644 --- a/dist/msys2-mingw/mcode/PKGBUILD +++ b/dist/msys2-mingw/mcode/PKGBUILD @@ -19,6 +19,7 @@ build() { cd "${srcdir}/builddir" ../../../../../configure --prefix=${MINGW_PREFIX} LDFLAGS=-static --enable-libghdl --enable-synth make GNATMAKE="gnatmake -j$(nproc)" + exit } package() { diff --git a/dist/msys2-mingw/run.sh b/dist/msys2-mingw/run.sh index a24578adc..42af9f7e5 100644 --- a/dist/msys2-mingw/run.sh +++ b/dist/msys2-mingw/run.sh @@ -58,7 +58,7 @@ cd $(dirname $0) build () { gstart 'Install common build dependencies' - pacman -S --noconfirm base-devel git + pacman -S --noconfirm base-devel gend if [ -z "$TARGET" ]; then @@ -67,6 +67,12 @@ build () { fi cd "$TARGET" + gstart "Fetch --unshallow" + # The command 'git describe' (used for version) needs the history. Get it. + # But the following command fails if the repository is complete. + git fetch --unshallow || true + gend + MINGW_INSTALLS="$(echo "$MINGW_INSTALLS" | tr '[:upper:]' '[:lower:]')" case "$MINGW_INSTALLS" in @@ -92,11 +98,12 @@ build () { gend gstart 'Build package' - dos2unix PKGBUILD - makepkg-mingw -sCLfc --noconfirm --noprogressbar + makepkg-mingw --noconfirm --noprogressbar -sCLf --noarchive gend - ls -la + gstart 'Archive package' + makepkg-mingw --noconfirm --noprogressbar -R + gend gstart 'Install package' pacman --noconfirm -U "mingw-w64-${TARBALL_ARCH}-ghdl-${TARGET}-ci"-*-any.pkg.tar.zst |