diff options
author | umarcor <unai.martinezcorral@ehu.eus> | 2020-12-28 21:53:53 +0100 |
---|---|---|
committer | umarcor <unai.martinezcorral@ehu.eus> | 2020-12-28 23:48:09 +0100 |
commit | 262c531cd39412ee3ea1e019f102b9cbfc698da0 (patch) | |
tree | 96732ba66ad0531509d60f4fa4a249e3e2531a72 | |
parent | 1880a6086c63994029b2c56b4a9f9183b11f5d63 (diff) | |
download | ghdl-262c531cd39412ee3ea1e019f102b9cbfc698da0.tar.gz ghdl-262c531cd39412ee3ea1e019f102b9cbfc698da0.tar.bz2 ghdl-262c531cd39412ee3ea1e019f102b9cbfc698da0.zip |
ci: MSYS2 job cleanup
-rw-r--r-- | .github/workflows/push.yml | 32 | ||||
-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, 23 insertions, 104 deletions
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 179b833e0..46346ae1e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -115,15 +115,14 @@ jobs: max-parallel: 2 matrix: include: [ - {installs: "MINGW32", pkg: "mcode"}, - #{installs: "MINGW32", pkg: "llvm"}, ! Not yet functional - #{installs: "MINGW64", pkg: "mcode"}, ! mcode is not yet supported on win64 - {installs: "MINGW64", pkg: "llvm"}, + {installs: "MINGW32", arch: i686, pkg: "mcode"}, + #{installs: "MINGW32", arch: i686, pkg: "llvm"}, ! Not yet functional + #{installs: "MINGW64", arch: x86_64, pkg: "mcode"}, ! mcode is not yet supported on win64 + {installs: "MINGW64", arch: x86_64, pkg: "llvm"}, ] name: '🟪 MSYS2 · ${{ matrix.installs }} · ${{ matrix.pkg }}' env: MINGW_INSTALLS: ${{ matrix.installs }} - TARGET: ${{ matrix.pkg }} defaults: run: shell: msys2 {0} @@ -134,29 +133,40 @@ jobs: with: msystem: MSYS update: true - install: base-devel git + install: > + base-devel + git + mingw-w64-${{ matrix.arch }}-toolchain - run: git config --global core.autocrlf input shell: bash - name: '🧰 Checkout' uses: actions/checkout@v2 + with: + # The command 'git describe' (used for version) needs the history. + fetch-depth: 0 + + - name: Build package + run: | + cd dist/msys2-${{ matrix.pkg }} + makepkg-mingw --noconfirm --noprogressbar -sCLf - - name: Build and (hopefully) install package - run: ./dist/msys2-mingw/run.sh -b + - name: Install package + run: pacman --noconfirm -U dist/msys2-${{ matrix.pkg }}/mingw-w64-*-any.pkg.tar.zst - name: '📤 Upload artifact: builddir' uses: actions/upload-artifact@v2 with: name: ${{ matrix.installs }}-${{ matrix.pkg }}-builddir path: | - ./dist/msys2-mingw/${{ matrix.pkg }}/src/ - ./dist/msys2-mingw/${{ matrix.pkg }}/pkg/ + ./dist/msys2-${{ matrix.pkg }}/src/ + ./dist/msys2-${{ matrix.pkg }}/pkg/ - name: '📤 Upload artifact: package' uses: actions/upload-artifact@v2 with: - path: ./dist/msys2-mingw/${{ matrix.pkg }}/mingw-*ghdl*.pkg.tar.zst + path: ./dist/msys2-${{ matrix.pkg }}/mingw-*ghdl*.pkg.tar.zst - name: Test package run: | 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 |