Skip to content

Initial support building the runner on FreeBSD #3512

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ChanTsune
Copy link

I tried to address #385.

The dotnet binary for FreeBSD is not available on https://dotnetcli.azureedge.net, so I am using the system's dotnet.

I have adjusted the build process to support FreeBSD, following the examples of other operating systems.
The following steps have been tested and confirmed to pass successfully.

./dev.sh layout Release freebsd-x64
./dev.sh package Release

I have confirmed that ./dev.sh test passes, except for tests that require pre-built binaries such as node.
However, the operation of the runner on FreeBSD is not fully guaranteed, so please note that this is a PR that enables building for FreeBSD.

@ChanTsune ChanTsune requested a review from a team as a code owner October 19, 2024 03:30
Copy link

@er2off er2off left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM but I made some changes

  • In dev.sh shebang should be changed to #!/usr/bin/env bash for better cross-platform support (or use bash ./dev.sh).
    (This change also could be made for all other sh/bash run scripts)
    Also script fails to run after "Skip installing dotnet, use system dotnet"
    so you need to add mkdir -p "${DOTNETSDK_INSTALLDIR}" after (also someone from Microsoft, please add dotnet to Azure).

  • Dotnet version provided in global.json doesn't exist in FreeBSD packages, there are only (at this moment)
    9.0.105 (package lang/dotnet)
    and 8.0.106 (package lang/dotnet8)

    Of course dotnet 9 fails to restore packages as target is net8.0, dotnet8 package seems OK to build everything.

  • Tests depends on currently non-existed packages like _layout/externals/node20/bin/node and latest release of runner (for self updater test), this was already said.
    But I noticed that src/Runner.Listener/Configuration/ServiceControlManager.cs wasn't fully ported.
    Test said Missing ServiceLocatorAttribute for interface 'GitHub.Runner.Listener.Configuration.ILinuxServiceControlManager'. Add the attribute to the interface or whitelist the interface in the test.
    and that's true, service manager for FreeBSD init wasn't written in this PR.

  • Just a note: self updater requires bash which isn't part of FreeBSD base system. As long as run scripts depends on bash (so you need to install it to make it work), this isn't important.

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.

2 participants