Commit f64f9749d83bfa890282fc2c8fd8c29c37c65c04
1 parent
70a2c6da
Exists in
develop
Publishing zip file for msvc builds.
Showing
4 changed files
with
123 additions
and
55 deletions
Show diff stats
.github/workflows/publish.yml
| ... | ... | @@ -3,9 +3,12 @@ on: |
| 3 | 3 | pull_request: |
| 4 | 4 | branches: |
| 5 | 5 | - master |
| 6 | + push: | |
| 7 | + branches: | |
| 8 | + - develop | |
| 6 | 9 | jobs: |
| 7 | 10 | msys2-mingw: |
| 8 | - name: Publish for Windows 64 | |
| 11 | + name: Publish for MinGW 64 | |
| 9 | 12 | runs-on: windows-latest |
| 10 | 13 | defaults: |
| 11 | 14 | run: |
| ... | ... | @@ -23,7 +26,7 @@ jobs: |
| 23 | 26 | update: true |
| 24 | 27 | install: dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool |
| 25 | 28 | - name: CI-Build |
| 26 | - run: ./win/ci-build.sh | |
| 29 | + run: ./win/mingw-build.sh | |
| 27 | 30 | - uses: ncipollo/release-action@v1 |
| 28 | 31 | with: |
| 29 | 32 | tag: ${{ steps.gettag.outputs.tag }} |
| ... | ... | @@ -34,6 +37,36 @@ jobs: |
| 34 | 37 | omitBody: true |
| 35 | 38 | omitPrereleaseDuringUpdate: true |
| 36 | 39 | replacesArtifacts: true |
| 40 | + msys2-msvc: | |
| 41 | + name: Publish for MSVC 64 | |
| 42 | + runs-on: windows-latest | |
| 43 | + defaults: | |
| 44 | + run: | |
| 45 | + shell: msys2 {0} | |
| 46 | + steps: | |
| 47 | + - uses: actions/checkout@v3 | |
| 48 | + - uses: oprypin/find-latest-tag@v1 | |
| 49 | + id: gettag | |
| 50 | + with: | |
| 51 | + repository: PerryWerneck/lib3270 | |
| 52 | + releases-only: true | |
| 53 | + - uses: msys2/setup-msys2@v2 | |
| 54 | + with: | |
| 55 | + msystem: mingw64 | |
| 56 | + update: true | |
| 57 | + install: zip dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool | |
| 58 | + - name: CI-Build | |
| 59 | + run: ./win/msvc-build.sh | |
| 60 | + - uses: ncipollo/release-action@v1 | |
| 61 | + with: | |
| 62 | + tag: ${{ steps.gettag.outputs.tag }} | |
| 63 | + artifacts: "*-lib3270-*.zip" | |
| 64 | + allowUpdates: true | |
| 65 | + draft: false | |
| 66 | + makeLatest: true | |
| 67 | + omitBody: true | |
| 68 | + omitPrereleaseDuringUpdate: true | |
| 69 | + replacesArtifacts: true | |
| 37 | 70 | macos: |
| 38 | 71 | name: Publish for macos |
| 39 | 72 | runs-on: macos-latest | ... | ... |
win/ci-build.sh
| ... | ... | @@ -1,53 +0,0 @@ |
| 1 | -#!/bin/bash | |
| 2 | -# | |
| 3 | -# SPDX-License-Identifier: LGPL-3.0-or-later | |
| 4 | -# | |
| 5 | -# Copyright (C) 2008 Banco do Brasil S.A. | |
| 6 | -# | |
| 7 | -# This program is free software: you can redistribute it and/or modify | |
| 8 | -# it under the terms of the GNU Lesser General Public License as published | |
| 9 | -# by the Free Software Foundation, either version 3 of the License, or | |
| 10 | -# (at your option) any later version. | |
| 11 | -# | |
| 12 | -# This program is distributed in the hope that it will be useful, | |
| 13 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | -# GNU General Public License for more details. | |
| 16 | -# | |
| 17 | -# You should have received a copy of the GNU Lesser General Public License | |
| 18 | -# along with this program. If not, see <https://www.gnu.org/licenses/>. | |
| 19 | - | |
| 20 | -# | |
| 21 | -# References: | |
| 22 | -# | |
| 23 | -# * https://www.msys2.org/docs/ci/ | |
| 24 | -# | |
| 25 | - | |
| 26 | -echo "Running ${0}" | |
| 27 | - | |
| 28 | -LOGFILE=build.log | |
| 29 | -rm -f ${LOGFILE} | |
| 30 | - | |
| 31 | -die ( ) { | |
| 32 | - [ -s $LOGFILE ] && tail $LOGFILE | |
| 33 | - [ "$1" ] && echo "$*" | |
| 34 | - exit -1 | |
| 35 | -} | |
| 36 | - | |
| 37 | -cd $(dirname $(dirname $(readlink -f ${0}))) | |
| 38 | - | |
| 39 | -# | |
| 40 | -# Install pre-reqs | |
| 41 | -# | |
| 42 | -#echo "Installing pre-reqs..." | |
| 43 | -#pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure" | |
| 44 | - | |
| 45 | -# | |
| 46 | -# Build | |
| 47 | -# | |
| 48 | -echo "Building package..." | |
| 49 | -dos2unix PKGBUILD.mingw || die "dos2unix failure" | |
| 50 | -makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw || die "makepkg failure" | |
| 51 | - | |
| 52 | -echo "Build complete" | |
| 53 | - |
| ... | ... | @@ -0,0 +1,53 @@ |
| 1 | +#!/bin/bash | |
| 2 | +# | |
| 3 | +# SPDX-License-Identifier: LGPL-3.0-or-later | |
| 4 | +# | |
| 5 | +# Copyright (C) 2008 Banco do Brasil S.A. | |
| 6 | +# | |
| 7 | +# This program is free software: you can redistribute it and/or modify | |
| 8 | +# it under the terms of the GNU Lesser General Public License as published | |
| 9 | +# by the Free Software Foundation, either version 3 of the License, or | |
| 10 | +# (at your option) any later version. | |
| 11 | +# | |
| 12 | +# This program is distributed in the hope that it will be useful, | |
| 13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | +# GNU General Public License for more details. | |
| 16 | +# | |
| 17 | +# You should have received a copy of the GNU Lesser General Public License | |
| 18 | +# along with this program. If not, see <https://www.gnu.org/licenses/>. | |
| 19 | + | |
| 20 | +# | |
| 21 | +# References: | |
| 22 | +# | |
| 23 | +# * https://www.msys2.org/docs/ci/ | |
| 24 | +# | |
| 25 | + | |
| 26 | +echo "Running ${0}" | |
| 27 | + | |
| 28 | +LOGFILE=build.log | |
| 29 | +rm -f ${LOGFILE} | |
| 30 | + | |
| 31 | +die ( ) { | |
| 32 | + [ -s $LOGFILE ] && tail $LOGFILE | |
| 33 | + [ "$1" ] && echo "$*" | |
| 34 | + exit -1 | |
| 35 | +} | |
| 36 | + | |
| 37 | +cd $(dirname $(dirname $(readlink -f ${0}))) | |
| 38 | + | |
| 39 | +# | |
| 40 | +# Install pre-reqs | |
| 41 | +# | |
| 42 | +#echo "Installing pre-reqs..." | |
| 43 | +#pacman -U --noconfirm *.pkg.tar.zst || die "pacman failure" | |
| 44 | + | |
| 45 | +# | |
| 46 | +# Build | |
| 47 | +# | |
| 48 | +echo "Building package..." | |
| 49 | +dos2unix PKGBUILD.mingw || die "dos2unix failure" | |
| 50 | +makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw || die "makepkg failure" | |
| 51 | + | |
| 52 | +echo "Build complete" | |
| 53 | + | ... | ... |
| ... | ... | @@ -0,0 +1,35 @@ |
| 1 | +#!/bin/bash | |
| 2 | +# | |
| 3 | +# References: | |
| 4 | +# | |
| 5 | +# * https://www.msys2.org/docs/ci/ | |
| 6 | +# | |
| 7 | +# | |
| 8 | +echo "Running ${0}" | |
| 9 | + | |
| 10 | +LOGFILE=build.log | |
| 11 | +rm -f ${LOGFILE} | |
| 12 | + | |
| 13 | +die ( ) { | |
| 14 | + [ -s $LOGFILE ] && tail $LOGFILE | |
| 15 | + [ "$1" ] && echo "$*" | |
| 16 | + exit -1 | |
| 17 | +} | |
| 18 | + | |
| 19 | +cd $(dirname $(dirname $(readlink -f ${0}))) | |
| 20 | + | |
| 21 | +# | |
| 22 | +# Build LIB3270 | |
| 23 | +# | |
| 24 | +echo "Building lib3270" | |
| 25 | +./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | |
| 26 | +./configure > $LOGFILE 2>&1 || die "Configure failure" | |
| 27 | +make clean > $LOGFILE 2>&1 || die "Make clean failure" | |
| 28 | +make all > $LOGFILE 2>&1 || die "Make failure" | |
| 29 | +make DESTDIR=.bin/package install > $LOGFILE 2>&1 || die "Install failure" | |
| 30 | + | |
| 31 | +cd .bin/package${MINGW_PREFIX} | |
| 32 | +zip -9 -r ../../../${MINGW_PACKAGE_PREFIX}-lib3270.zip * > $LOGFILE 2>&1 || die "Zip failure" | |
| 33 | + | |
| 34 | + | |
| 35 | + | ... | ... |