DEV Community

Junxiao Shi
Junxiao Shi

Posted on

NFD Nightly Packages, Cross-Compiled for Raspberry Pi

My Workflow

NDN Forwarding Daemon (NFD) is a network forwarder for Named Data Networking (NDN), a future Internet architecture.
The source code of this software is updated weekly, but the upstream project only provides binary releases for Ubuntu and it's only updated twice a year.
Therefore, I made a GitHub Actions workflow to automatically compile NFD software every week, for Debian, Raspberry Pi OS, and Ubuntu.

GitHub-hosted runners only have amd64 CPU architecture.
In order to compile for Raspberry Pi that use ARMv6/ARMv7/ARMv8 architecture, I use Balena Docker images that support cross-compiling via QEMU.
QEMU is much slower than a normal cross compiler, but the results are more reliable.

Within the script, I use the debuild command to generate .deb packages that can be installed via APT. The generated .deb files are stored as Artifacts.

In order to avoid 6-hour timeouts, each job only compiles one source package. Since NFD depends on ndn-cxx, the NFD job uses actions/download-artifact@v2 Action to download the result of the ndn-cxx job, installs the .deb files inside the Docker container, and then compiles the NFD source package.

The webpage associated with this project uses the GitHub REST API to query recently completed builds, and displays the links.

Submission Category:

This is not an official hackathon submission because it was created before the hackathon announcement. If it was, the category would be "maintainer must-haves" (for cross-architecture compiling) and "interesting IoT" (for compiling for the Raspberry Pi that is an IoT computer).

Yaml File or Link to Code

Project homepage:
GitHub repository and workflow:
Blog post:

Additional Resources / Info

Top comments (0)