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

Move ARM build to Github Actions #3847

Closed
wants to merge 11 commits into from

Commits on Dec 3, 2021

  1. github-actions: migrate ARM build from Travis CI to github-actions

    As we focus more on GitHub Actions, for testing builds on ARM
    we could use a github-action that's using Docker + QEMU on Linux,
    instead of Travis CI.
    See: github-action: https://github.com/uraimo/run-on-arch-action
    
    This patch migrates the current Travis config to the run-on-arch github-action.
    Following patches make it functional (some packages that are pre-installed in Travis has to be installed),
    and extend it.
    
    Notes:
     - It's not a native ARM runner though, it uses QEMU
     - Build time is slow: even after putting dependency installation (including locally-built ones),
       syslog-ng build is still around 27 minutes (Github runners have 2-core CPUs, but it was slow on my 4-core i7 CPU too)
     - It requires a docker image to be built first, in order to run.
       We can cache the docker images in the Github Packages (similarly to dbld images)
    
    Alternative github-action:
     - https://github.com/pguyot/arm-runner-action
        Similarly it can run ARM-based binaries with QEMU.
        Not docker-based, it uses a chroot environment and an image of the given distribution.
        It also creates an image that can be used on Raspberry PI.
        Currently it is limited to Raspberry PI.
    
    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    ff935cb View commit details
    Browse the repository at this point in the history
  2. CONTRIBUTING: replace CI references from Travis to GitHub Actions

    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    4a7e2cb View commit details
    Browse the repository at this point in the history
  3. github-actions: enabling caching the docker images in Github Packages

    With this change only I saw a ~70 minutes runtime changing to ~47 minutes.
    This would significantly improve the running time once only syslog-ng will be built during runtime:
    from around ~47 minutes to ~ 25 minutes.
    
    Image name it not entirely configurable, it looks like this:
    "run-on-arch-${GITHUB_REPOSITORY}-${GITHUB_WORKFLOW}-${arch}-${distro}"
    E.g.
    `run-on-arch-gaborznagy-syslog-ng-arm-docker-aarch64-bullseye
    `
    
    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    1bb9413 View commit details
    Browse the repository at this point in the history
  4. github-actions: move run-on-arm to Debian Bullseye

    run-on-arch doesn't support Debian Testing (yet)
    
    https://github.com/uraimo/run-on-arch-action
    
    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    b65bfcb View commit details
    Browse the repository at this point in the history
  5. github-actions: install additional dependencies in run-on-arm workflow

    Travis provided several build-tools by-default.
    On docker we have to install these manually.
    
    Also, enable additional modules by installing their dependencies
    (e.g. libpaho-mqtt-c).
    
    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    544bd9b View commit details
    Browse the repository at this point in the history
  6. github-actions: install criterion from release tarball

    This way we don't have to fetch criterion's submodules
    This is how we build criterion in dbld too.
    
    Also remove sudo usage, and build criterion under /tmp/
    
    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    87c1481 View commit details
    Browse the repository at this point in the history
  7. github-actions: build bison under /tmp/ too in run-on-arm

    Also remove usage of sudo.
    
    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    d125d1b View commit details
    Browse the repository at this point in the history
  8. github-actions: add parallel build to all steps in run-on-arm

    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    9530a00 View commit details
    Browse the repository at this point in the history
  9. github-actions/run-on-arm: build criterion and bison during docker im…

    …age build
    
    Since they have to be updated manually,
    we can build and install them during image build to save significant time.
    
    - bison build time is around 16 minutes 30 seconds
    - criterion build time is 5 minutes 30 seconds
    (syslog-ng build time is around 20 minutes)
    
    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    4cfc853 View commit details
    Browse the repository at this point in the history
  10. github-actions/run-on-arm: use flags from dbld/builddeps for bison build

    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    a99d95a View commit details
    Browse the repository at this point in the history
  11. github-actions/run-on-arm: make pip install silent

    Signed-off-by: Gabor Nagy <gabor.nagy@oneidentity.com>
    Gabor Nagy committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    b0ac078 View commit details
    Browse the repository at this point in the history