Commit 99ead83500500bc66a34ea551ea88758562531f2
1 parent
5cc5a3fd
Exists in
develop
Implementing winpkg workflow.
Showing
3 changed files
with
106 additions
and
22 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,68 @@ |
| 1 | +name: MSYS2 | |
| 2 | +on: | |
| 3 | + pull_request: | |
| 4 | + branches: | |
| 5 | + - master | |
| 6 | + push: | |
| 7 | + branches: | |
| 8 | + - winpkg | |
| 9 | + | |
| 10 | +jobs: | |
| 11 | + msys2-mingw: | |
| 12 | + runs-on: windows-latest | |
| 13 | + defaults: | |
| 14 | + run: | |
| 15 | + shell: msys2 {0} | |
| 16 | + steps: | |
| 17 | + - uses: actions/checkout@v3 | |
| 18 | + - uses: oprypin/find-latest-tag@v1 | |
| 19 | + id: gettag | |
| 20 | + with: | |
| 21 | + repository: PerryWerneck/pw3270 # The repository to scan. | |
| 22 | + releases-only: true # We know that all relevant tags have a GitHub release for them. | |
| 23 | + - uses: msys2/setup-msys2@v2 | |
| 24 | + with: | |
| 25 | + msystem: mingw64 | |
| 26 | + update: true | |
| 27 | + install: xz mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool mingw-w64-x86_64-gtk3 mingw-w64-x86_64-imagemagick mingw-w64-x86_64-optipng mingw-w64-x86_64-inkscape | |
| 28 | + - uses: robinraju/release-downloader@v1.7 | |
| 29 | + with: | |
| 30 | + repository: "PerryWerneck/lib3270" | |
| 31 | + latest: true | |
| 32 | + fileName: "mingw-lib3270.tar.xz" | |
| 33 | + - uses: robinraju/release-downloader@v1.7 | |
| 34 | + with: | |
| 35 | + repository: "PerryWerneck/libv3270" | |
| 36 | + latest: true | |
| 37 | + fileName: "mingw-libv3270.tar.xz" | |
| 38 | + - name: BuildApp | |
| 39 | + run: | | |
| 40 | + ./win/ci-build.sh | |
| 41 | + - uses: robinraju/release-downloader@v1.7 | |
| 42 | + with: | |
| 43 | + repository: "PerryWerneck/libipc3270" | |
| 44 | + latest: true | |
| 45 | + fileName: "mingw-libipc3270.tar.xz" | |
| 46 | + - uses: robinraju/release-downloader@v1.7 | |
| 47 | + with: | |
| 48 | + repository: "PerryWerneck/libhllapi" | |
| 49 | + latest: true | |
| 50 | + fileName: "mingw-hllapi.tar.xz" | |
| 51 | + - name: MakePackage | |
| 52 | + run: tar -C ./.build -Jxvf mingw-lib3270.tar.xz | |
| 53 | + run: tar -C ./.build -Jxvf mingw-libv3270.tar.xz | |
| 54 | + run: tar -C ./.build -Jxvf mingw-pw3270.tar.xz | |
| 55 | + run: tar -C ./.build -Jxvf mingw-libipc3270.tar.xz | |
| 56 | + run: tar -C ./.build -Jxvf mingw-hllapi.tar.xz | |
| 57 | + run: tar -C ./.build -Jxvf mingw-pw3270.tar.xz | |
| 58 | + run: tar -C ./.build -Jcvf mingw-pw3270-full.tar.xz . | |
| 59 | + - uses: ncipollo/release-action@v1 | |
| 60 | + with: | |
| 61 | + tag: ${{ steps.gettag.outputs.tag }} | |
| 62 | + artifacts: "mingw-pw3270-full.tar.xz" | |
| 63 | + allowUpdates: true | |
| 64 | + draft: false | |
| 65 | + makeLatest: true | |
| 66 | + omitBody: true | |
| 67 | + omitPrereleaseDuringUpdate: true | |
| 68 | + replacesArtifacts: true | ... | ... |
.gitignore
win/ci-build.sh
| ... | ... | @@ -25,30 +25,43 @@ rm -fr ${myDIR}/.build |
| 25 | 25 | # |
| 26 | 26 | # Build LIB3270 |
| 27 | 27 | # |
| 28 | -echo "Building lib3270" | |
| 29 | -mkdir -p ${myDIR}/.build/lib3270 | |
| 30 | -git clone https://github.com/PerryWerneck/lib3270.git ${myDIR}/.build/lib3270 > $LOGFILE 2>&1 || die "clone lib3270 failure" | |
| 31 | -pushd ${myDIR}/.build/lib3270 | |
| 32 | -./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | |
| 33 | -./configure > $LOGFILE 2>&1 || die "Configure failure" | |
| 34 | -make clean > $LOGFILE 2>&1 || die "Make clean failure" | |
| 35 | -make all > $LOGFILE 2>&1 || die "Make failure" | |
| 36 | -make install > $LOGFILE 2>&1 || die "Install failure" | |
| 37 | -popd | |
| 28 | +if [ -e mingw-lib3270.tar.xz ]; then | |
| 29 | + | |
| 30 | + echo "Unpacking lib3270" | |
| 31 | + tar -C / -Jxvf mingw-lib3270.tar.xz | |
| 32 | + | |
| 33 | +else | |
| 34 | + echo "Building lib3270" | |
| 35 | + git clone https://github.com/PerryWerneck/lib3270.git ./.build/lib3270 || die "clone lib3270 failure" | |
| 36 | + cd ./.build/lib3270 | |
| 37 | + ./autogen.sh || die "Lib3270 autogen failure" | |
| 38 | + ./configure || die "Lib3270 Configure failure" | |
| 39 | + make clean || die "Lib3270 Make clean failure" | |
| 40 | + make all || die "Lib3270 Make failure" | |
| 41 | + make install || die "Lib3270 Install failure" | |
| 42 | + cd ../.. | |
| 43 | +fi | |
| 38 | 44 | |
| 39 | 45 | # |
| 40 | 46 | # Build LIBV3270 |
| 41 | 47 | # |
| 42 | -echo "Building libv3270" | |
| 43 | -mkdir -p ${myDIR}/.build/libv3270 | |
| 44 | -git clone https://github.com/PerryWerneck/libv3270.git ${myDIR}/.build/libv3270 > $LOGFILE 2>&1 || die "clone libv3270 failure" | |
| 45 | -pushd ${myDIR}/.build/libv3270 | |
| 46 | -./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | |
| 47 | -./configure > $LOGFILE 2>&1 || die "Configure failure" | |
| 48 | -make clean > $LOGFILE 2>&1 || die "Make clean failure" | |
| 49 | -make all > $LOGFILE 2>&1 || die "Make failure" | |
| 50 | -make install > $LOGFILE 2>&1 || die "Install failure" | |
| 51 | -popd | |
| 48 | +if [ -e mingw-libv3270.tar.xz ]; then | |
| 49 | + | |
| 50 | + echo "Unpacking libv3270" | |
| 51 | + tar -C / -Jxvf mingw-lib3270.tar.xz | |
| 52 | + | |
| 53 | +else | |
| 54 | + echo "Building libv3270" | |
| 55 | + mkdir -p ${myDIR}/.build/libv3270 | |
| 56 | + git clone https://github.com/PerryWerneck/libv3270.git ${myDIR}/.build/libv3270 > $LOGFILE 2>&1 || die "clone libv3270 failure" | |
| 57 | + pushd ${myDIR}/.build/libv3270 | |
| 58 | + ./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | |
| 59 | + ./configure > $LOGFILE 2>&1 || die "Configure failure" | |
| 60 | + make clean > $LOGFILE 2>&1 || die "Make clean failure" | |
| 61 | + make all > $LOGFILE 2>&1 || die "Make failure" | |
| 62 | + make install > $LOGFILE 2>&1 || die "Install failure" | |
| 63 | + popd | |
| 64 | +fi | |
| 52 | 65 | |
| 53 | 66 | # |
| 54 | 67 | # Build PW3270 |
| ... | ... | @@ -60,5 +73,8 @@ cd ${myDIR} |
| 60 | 73 | make clean > $LOGFILE 2>&1 || die "Make clean failure" |
| 61 | 74 | make all > $LOGFILE 2>&1 || die "Make failure" |
| 62 | 75 | |
| 76 | +make DESTDIR=.bin/package install | |
| 77 | +tar --create --xz --file=mingw-pw3270.tar.xz --directory=.bin/package --verbose . | |
| 78 | + | |
| 63 | 79 | echo "Build complete" |
| 64 | 80 | ... | ... |