To aid towards the creation and maintenance of Cygport packages, I have
created a template repository that will automatically build any *.cygport
files found in the root of the repository.  (It would probably be best to keep
it to one *.cygport file per repository created from the template, or at least
limit to closely-related *.cygport files, but it can handle multiple files.)

This is not intended to do what “scallywag” does but rather serve as a tool
for those who create or maintain Cygport packages.  For example, the use of
ephemeral GitHub runners can help confirm whether the BUILD_REQUIRES list is
complete.

The values NAME, VERSION, RELEASE, BUILD_REQUIRES, and PKG_NAMES are all
retrieved from the *.cygport file via dot-sourcing, so there perhaps might be
certain cases where that would be broken, but I have tried sampling of
different Cygport file setups, and each have seemed to work.

After a package build has completed, the hint files, source package file, and
binary package file are all posted as build artifacts.


This Workflow also works around the issue of Cygwin Git vs. GitHub Git by
posting the contents of the repository as an artifact by the same Workflow job
that builds a dynamic job matrix based on the *.cygport files found.  Thus, in
the within the individual matrix job that is created for each *.cygport file,
there is no need to perform an "actions/checkout" in those jobs, which in turn
means that GitHub’s version of Git is not needed.  I don't anticipate these
repositories being very large, so saving and retrieving the repository
contents as an artifact should not impose too much overhead.

There is an additional job matrix element that runs for both x86 and x86_64.


An added feature of this template repository is the ability for child
repositories created from the template to check that parent template
repository for any updates.  If updates are found, they are posted as a pull
request in the repository.

By default, this check runs on a weekly basis.  Because Workflow files are
involved, additional setup is needed, but the steps are all documented in the
template repository.


Cygport Workflow Template Repository
 * https://github.com/mesheets/Cygport-Workflow-Template

Examples:
 * https://github.com/mesheets/hello.cygport
 * https://github.com/mesheets/flac.cygport
 * https://github.com/BrickBot/h8300-hitachi-coff-toolchain.cygport
 * https://github.com/BrickBot/nqc.cygport

Other Cygport package tests included aften and gmp.  There might be more
advanced Cygport packaging scenarios that this template does not cover, but
I hope it might be useful across at least the more typical scenarios.


Thank you,
Matthew

Reply via email to