mridoni / gnucobol-binaries

gnucobol-3.1.2-windows-x64-mingw
GNU General Public License v3.0
3 stars 0 forks source link

MSYS2 package: use explicit version by building via `makepkg-mingw` #3

Open GitMensch opened 1 year ago

GitMensch commented 1 year ago

Currently the build script uses whatever is current on MSYS2

https://github.com/mridoni/gnucobol-binaries/blob/ab58b732bb67775ccbf0c89f100011b5e13275b2/.github/workflows/build-gnucobol-3.1.2-windows-mingw.yml#L42 https://github.com/mridoni/gnucobol-binaries/blob/ab58b732bb67775ccbf0c89f100011b5e13275b2/.github/workflows/build-gnucobol-3.1.2-windows-mingw.yml#L88

and then renaming this to a specific version (in this case 3.1.2).

As MSYS2 does not provide old binary packages a version cannot be specified this way directly, but there is an "easy" option to solve that:

  1. Download the specific package definition - for 3.1.2 this would be https://github.com/msys2/MINGW-packages/tree/5bb0be5e5955011ca1774df4ba2b760bd09e8c72/mingw-w64-gnucobol Actually I'd suggest to copy those files into this repo in a sub-folder per version (BTW the 3.2-rc1 one is at https://github.com/msys2/MINGW-packages/pull/15154). Doing so would also allow to adjust the package, if ever needed (for example adding more dependencies, if you want that to be part of your release).
  2. then build this in the CI using MSYS2 and install it
    cd ${package-name}
    MINGW_ARCH="mingw64 mingw32" makepkg-mingw -sLf
    pacman --noconfirm --root=${{ env.PKG_DIR }} --dbpath=${{ env.PKG_DIR }} -U ${package-name}*.pkg.tar.xz

Note: You may would combine those builds into a single step and only have the artifact uploaded twice, one from the "mingw32" folder and the other one from "mingw64" (no need in deleting any folders outside then).

GitMensch commented 10 months ago

Just to check: there was no GC 3.2 binary released published by you, do you want to add that?

mridoni commented 10 months ago

Yes, it's on my (unfortunatly ever-growing) to-do-list :-( ...