Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support riscos build service #16

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

gerph
Copy link

@gerph gerph commented Dec 12, 2022

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • no
  • yes (bugfixes and features will not be merged without tests)
    • In the sense that we test that it will build, only.

Breaking Changes?

  • no
  • yes (breaking changes will not be merged unless absolutely necessary – please provide motivation)

List any relevant issue numbers:

Description

This change introduces building through the RISC OS Build Service. It also reworks the code slightly to make it more likely to work with older compilers (it's C89 compatible), and fixes a socket leak. And fixes the header that never worked due to a poor compiler #ifndef check

The CI build is a rudimentary process right now - we just run the build and copy a few files around.
We don't yet handle the application, which can come a little later.
There are no explicit tests present right now, but then there weren't originally either.

Outstanding work

  • Replace custom Makefile with more regular makefile.
  • Add documentation build.
  • Add application release.
  • Fix Data filetypes
  • Determine what to do about the multiple LICENSE files.

Archive outputs

The archive contains the following structure (from the unzip tool), which isn't entirely nice:

charles@laputa ~/external/WakeOnLAN/src (support-riscos-build-service)> python -m rozipfile --list /tmp/built,a91 
LICENSE/1                     WR/WR     Data       00:51:48 12-Dec-2022    1Kbytes
LICENSE/2                     WR/WR     Data       00:51:48 12-Dec-2022   11Kbytes
Tools                         DWR/WR    Directory  00:51:24 12-Dec-2022    0 bytes
Tools.Internet                DWR/WR    Directory  00:51:48 12-Dec-2022    0 bytes
Tools.Internet.Help           DWR/WR    Directory  00:51:48 12-Dec-2022    0 bytes
Tools.Internet.WakeOnLan      WR/WR     Absolute   00:51:49 12-Dec-2022    5Kbytes
Tools.Internet.Help.WakeOnLan WR/WR     Data       00:51:48 12-Dec-2022  254 bytes

pzaino and others added 4 commits March 25, 2022 15:56
cumulative merge of changes from Develop to Main repo
The code had only been compiled properly for GCC and was known to
not work on Norcroft. This change introduces a Makefile (using
my own makefile system, which will be updated later) and the necessary
code changes to allow it to build on Norcroft.

Specifically...

* We use TCPIPLibs variable to find the network libraries. This
  makes it easier to include things in the exact same way on GCC and
  Norcroft.
* Code is modified to work with pre-C99 format variables. My compiler
  doesn't support them, and requiring C99 format requires the developer
  to spend (more) money to get the later compiler.
* Magic packet sending has been moved to a separate function because
  of this, to isolate the parsing from the packet sending.
* Bug in leaking the socket due to not closing it is now fixed.
The standard style of VersionNum file can be used to give a
programatically extractable version number in most tools. This is
common in most RISC OS sources in some form. Tools such as the
old RISC OS 'srccommit' tool, my own 'commit' tool, and more
recently the 'riscos-vmanage' tool all use this format.

The syntax output has been updated to match RISC OS tools better,
including correcting the capitalisation of the tool.
The RISC OS build system can build most things, given a suitable
set of scripts. Here we invoke the 'MkROBuild' command which will
build things using the toolchain on the RISC OS build system.

The artifacts generated are in the usual format, allowing users
to copy the tool into their library as they see fit.
@gerph
Copy link
Author

gerph commented Dec 12, 2022

I'm not sure why it hasn't triggered the CI run, but maybe it's because the twitter notify failed?

@pzaino
Copy link
Contributor

pzaino commented Dec 12, 2022 via email

@pzaino
Copy link
Contributor

pzaino commented Dec 12, 2022 via email

@gerph
Copy link
Author

gerph commented Dec 12, 2022

Oh sorry, I'd not noticed it should have been against develop. I can rebase to go against develop instead if that's helpful. As for the pipeline... I'm pretty sure I /had/ included the workflow. I shall investigate.

@gerph gerph changed the base branch from main to develop December 12, 2022 19:25
The workflow isn't very specialised - it has been copied from the
template repository with just the names changed to allow it to
build properly.

However, as we're focusing on pull requests, the conditions have
been updated so that it triggers on the pull request not just on
the branch - this is important as otherwise it wouldn't trigger
when we create a PR from a fork.
@gerph gerph force-pushed the support-riscos-build-service branch from 16d72a2 to 6c0a776 Compare December 12, 2022 19:31
@gerph
Copy link
Author

gerph commented Dec 12, 2022

Ah-ha... spotted it. It was because I had said it only triggers on pushes to branches, but of course a PR isn't a branch push (strictly), so I have to use the pull_request conditional. This is different to how I've done the jobs usually because for normal things I'm not using a fork. I think it should be able to work now - although it claims to be waiting for approval...

image

Not sure if that means that it's going to do that approval thing on every push though.

@pzaino
Copy link
Contributor

pzaino commented Dec 12, 2022

Ok approved and ran it (sorry couldn't wait!) looks like it worked!!! 😄

@pzaino pzaino linked an issue Dec 14, 2022 that may be closed by this pull request
3 tasks
@pzaino
Copy link
Contributor

pzaino commented Jan 27, 2023

@gerph ,
quick question, is this one ready for merge?

Sorry, had a lot of things going on and lost track of this one, and this is a very useful feature to have.

Thanks,

@gerph
Copy link
Author

gerph commented Jan 27, 2023

I need to return to it and replace the makefiles that use my build system with a regular makefile so that it's not special for the build service, I think. Then it'll be ok. Sorry I got distracted with the videos and then doing my 2022 write up. Maybe next week I'll have some time for it.

  • Replace Makefile with standard (non-build system specific) makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure that WakeOnLan runs also on RISC OS 4.x and 6.x
2 participants