Menu

#439 GitHub workflow for generating daily (master) builds

future
open
nobody
None
5
2024-01-26
2023-10-12
Arki55
No

This should be ticket for continuation of discussion from a closed PR
https://sourceforge.net/p/fuse-emulator/fuse/merge-requests/25/

Reference to ticket in my clone
https://sourceforge.net/p/arki55-fuse-mod/tickets/13/

Aim s to have a workflow in github that...
- merges master from SF into master of cloned repo
- builds libspectrum from master
- builds Fuse for supported platforms with modified version information
- Generates ZIP with all build packages
- Creates pre-release in GitHub
- Syncs files to SourceForge (there's a setting for that in SF)

Discussion

  • Arki55

    Arki55 - 2023-10-12

    A short update.

    • I've fixed merge from master that broke during August.
    • Tried to implement alternative mode of test build for nightly builds where the version information would be done only by using MICRO portion of version information in configure.ac. 6 digits as the date of the buid would suffice.
    • TO mu surprise this did not work correctly, as the generated EXE files were broken, did not want to start up. The reason being overflow version info of EXE file. Apparently that can contain only 5 digits, but YYMMDD is 6. By decreasing their cound to 5, binary was working again.
    • So the question is.. How to represent version in the win version info (see details of any EXE file) ? A counter would work, right, but not sure how to maintain it ? Even f I implement this as additional constant in configure.ac, file and package version still has to be filled out.

    Any ideas?

     
  • Arki55

    Arki55 - 2023-10-13

    So I figured the simplest way, bumping up nano + commit it
    https://github.com/arki55/fuse-fuse/commit/b1e9ec4e3810a625935ad637a97a048c01399343

    Also, I've noticed that the zin EXE file version info is from fuse_rc_version constant. Good, that means I can manipulate with the other one and extend it with "-20231013-master" or similar.

     
    • Sergio Baldoví

      Sergio Baldoví - 2023-10-14

      So I figured the simplest way, bumping up nano + commit it

      It would be better if you don't manipulate micro and nano version numbers as could by defined by an official release, e.g, version 0.10.0.2 or 1.0.0.1.

      Also, I've noticed that the zin EXE file version info is from fuse_rc_version constant. Good, that means I can manipulate with the other one and extend it with "-20231013-master" or similar.

      The fuse_rc_version constant needs exactly 4 tokens and can't be extended for EXE properties.

      I suggest extending the fuse_version for special builds (nightly build, release candidates, etc). This constant will be propagated to package name and about dialog:

      m4_define([fuse_version], [1.6.0-20231014])

       
  • Arki55

    Arki55 - 2023-11-09

    Finally got it all changed and working. At least for the 2 deployment configurations - win32 UI + SDL

    Changes:
    feat: Nightly build workflow

    More details:
    - Before building, fuse_version constant will be replaced with a desired version in configure.ac.
    - Before builds, master from configure parent repository will be merged into the current branch.
    - The same happens also for Libspectrum, master from configured parent repo is merged before building.
    - Failure to merge anything does not stop Libspectrum from building, but it stops Fuse. To save resources. When triggering the workflow manually, build can be enforced.
    - Release tag changed to contain fuse version, branch name and date of last commit.
    - Similarly like release tag, also individual zips containing builds will be named like fuse-<version>-<build key="">.zip.
    - Two test build variants - STD as Standard (only version changes) or as TEST - displaying more info about the source of build in about dalog box.</build></version>

    • refactor: Replace text "the Free Unix Spectrum Emulator" with FUSE_LONG constant. Unify the sentence across usages.
    • refactor: Replace text "Fuse "+FUSE_VERSION with new constant FUSE_ABOUT_VERSION, replace dashes with spaces in it.

    feat: Dynamic fuse version info + test version info in About box ( Widget UI )
    - Version info will be read from constant FUSE_ABOUT_VERSION and split into lines, allowing splitting by words.
    - In case of TEST BUILD, forwarded detailed version info lines will be printed as well
    - Labels reordered so that the order is the same as in about box of WIN32 UI
    - Code refactored to allow calculating of total lines needed for whole about dialog box

    feat: Dynamic fuse version info + test version info in About box ( WIN32 UI )
    - Version info will be read from constant FUSE_ABOUT_VERSION and split into lines by auto wrapping. Practically only 2 lines good.
    - Size of dialog box enlarged in both dimensions to allow bigger version text line(s).
    - In case of TEST BUILD, forwarded detailed version info lines will be printed as well. I had to create a separate .rc file for this thou.

    Pull request in my GitHub clone:
    https://github.com/arki55/fuse-fuse/pull/47/commits

    Branch in SourceForge (arki55 clone)
    https://sourceforge.net/u/arki55/fuse/ci/arki55/features/T13-github-distribution-workflow-final-3/~/tree/

    Pull request for original Fuse SourceForge repo:
    https://sourceforge.net/p/fuse-emulator/fuse/merge-requests/27/

    Successful nightly build:
    https://github.com/arki55/fuse-fuse/actions/runs/6804945044

    Canceled nightly build (no new commits):
    https://github.com/arki55/fuse-fuse/actions/runs/6806288527

     
  • Arki55

    Arki55 - 2023-11-14

    My happyness was premature. After few days it stopped working. Somehow SourceForge refuses to fetch changes from GitHub servers:

    git fetch --prune
    git remote add repo https://git.code.sf.net/p/fuse-emulator/fuse
    git fetch repo

    error: RPC failed; curl 52 Empty reply from server
    fatal: the remote end hung up unexpectedly
    Error: Process completed with exit code 128.

    https://sourceforge.net/p/forge/site-support/25199/

     

    Last edit: Arki55 2023-11-14
  • Arki55

    Arki55 - 2023-11-23

    It work again. Try committing something into master. It should trigger creation of new daily build the day after.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.