diff --git a/.github/workflows/winpkg.yml b/.github/workflows/winpkg.yml new file mode 100644 index 0000000..65023a8 --- /dev/null +++ b/.github/workflows/winpkg.yml @@ -0,0 +1,68 @@ +name: MSYS2 +on: + pull_request: + branches: + - master + push: + branches: + - winpkg + +jobs: + msys2-mingw: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@v3 + - uses: oprypin/find-latest-tag@v1 + id: gettag + with: + repository: PerryWerneck/pw3270 # The repository to scan. + releases-only: true # We know that all relevant tags have a GitHub release for them. + - uses: msys2/setup-msys2@v2 + with: + msystem: mingw64 + update: true + 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 + - uses: robinraju/release-downloader@v1.7 + with: + repository: "PerryWerneck/lib3270" + latest: true + fileName: "mingw-lib3270.tar.xz" + - uses: robinraju/release-downloader@v1.7 + with: + repository: "PerryWerneck/libv3270" + latest: true + fileName: "mingw-libv3270.tar.xz" + - name: BuildApp + run: | + ./win/ci-build.sh + - uses: robinraju/release-downloader@v1.7 + with: + repository: "PerryWerneck/libipc3270" + latest: true + fileName: "mingw-libipc3270.tar.xz" + - uses: robinraju/release-downloader@v1.7 + with: + repository: "PerryWerneck/libhllapi" + latest: true + fileName: "mingw-hllapi.tar.xz" + - name: MakePackage + run: tar -C ./.build -Jxvf mingw-lib3270.tar.xz + run: tar -C ./.build -Jxvf mingw-libv3270.tar.xz + run: tar -C ./.build -Jxvf mingw-pw3270.tar.xz + run: tar -C ./.build -Jxvf mingw-libipc3270.tar.xz + run: tar -C ./.build -Jxvf mingw-hllapi.tar.xz + run: tar -C ./.build -Jxvf mingw-pw3270.tar.xz + run: tar -C ./.build -Jcvf mingw-pw3270-full.tar.xz . + - uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.gettag.outputs.tag }} + artifacts: "mingw-pw3270-full.tar.xz" + allowUpdates: true + draft: false + makeLatest: true + omitBody: true + omitPrereleaseDuringUpdate: true + replacesArtifacts: true diff --git a/.gitignore b/.gitignore index a2076d7..e2812a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.bin .tmp +.bin .obj .pot *~ @@ -71,4 +71,4 @@ intl m4 po app-manifest.xml - +libtool diff --git a/win/ci-build.sh b/win/ci-build.sh index 18b9b08..6c6c92b 100644 --- a/win/ci-build.sh +++ b/win/ci-build.sh @@ -25,30 +25,43 @@ rm -fr ${myDIR}/.build # # Build LIB3270 # -echo "Building lib3270" -mkdir -p ${myDIR}/.build/lib3270 -git clone https://github.com/PerryWerneck/lib3270.git ${myDIR}/.build/lib3270 > $LOGFILE 2>&1 || die "clone lib3270 failure" -pushd ${myDIR}/.build/lib3270 -./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" -./configure > $LOGFILE 2>&1 || die "Configure failure" -make clean > $LOGFILE 2>&1 || die "Make clean failure" -make all > $LOGFILE 2>&1 || die "Make failure" -make install > $LOGFILE 2>&1 || die "Install failure" -popd +if [ -e mingw-lib3270.tar.xz ]; then + + echo "Unpacking lib3270" + tar -C / -Jxvf mingw-lib3270.tar.xz + +else + echo "Building lib3270" + git clone https://github.com/PerryWerneck/lib3270.git ./.build/lib3270 || die "clone lib3270 failure" + cd ./.build/lib3270 + ./autogen.sh || die "Lib3270 autogen failure" + ./configure || die "Lib3270 Configure failure" + make clean || die "Lib3270 Make clean failure" + make all || die "Lib3270 Make failure" + make install || die "Lib3270 Install failure" + cd ../.. +fi # # Build LIBV3270 # -echo "Building libv3270" -mkdir -p ${myDIR}/.build/libv3270 -git clone https://github.com/PerryWerneck/libv3270.git ${myDIR}/.build/libv3270 > $LOGFILE 2>&1 || die "clone libv3270 failure" -pushd ${myDIR}/.build/libv3270 -./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" -./configure > $LOGFILE 2>&1 || die "Configure failure" -make clean > $LOGFILE 2>&1 || die "Make clean failure" -make all > $LOGFILE 2>&1 || die "Make failure" -make install > $LOGFILE 2>&1 || die "Install failure" -popd +if [ -e mingw-libv3270.tar.xz ]; then + + echo "Unpacking libv3270" + tar -C / -Jxvf mingw-lib3270.tar.xz + +else + echo "Building libv3270" + mkdir -p ${myDIR}/.build/libv3270 + git clone https://github.com/PerryWerneck/libv3270.git ${myDIR}/.build/libv3270 > $LOGFILE 2>&1 || die "clone libv3270 failure" + pushd ${myDIR}/.build/libv3270 + ./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" + ./configure > $LOGFILE 2>&1 || die "Configure failure" + make clean > $LOGFILE 2>&1 || die "Make clean failure" + make all > $LOGFILE 2>&1 || die "Make failure" + make install > $LOGFILE 2>&1 || die "Install failure" + popd +fi # # Build PW3270 @@ -60,5 +73,8 @@ cd ${myDIR} make clean > $LOGFILE 2>&1 || die "Make clean failure" make all > $LOGFILE 2>&1 || die "Make failure" +make DESTDIR=.bin/package install +tar --create --xz --file=mingw-pw3270.tar.xz --directory=.bin/package --verbose . + echo "Build complete" -- libgit2 0.21.2