Skip to content

Redesign CI to use workflow calls#1078

Merged
troglobit merged 12 commits into
mainfrom
ci-workflow-redesign
Jul 9, 2025
Merged

Redesign CI to use workflow calls#1078
troglobit merged 12 commits into
mainfrom
ci-workflow-redesign

Conversation

@rical
Copy link
Copy Markdown
Contributor

@rical rical commented Jul 1, 2025

Description

This PR redesigns the existing github build and test workflow to support workflow calls.

Main changes:

  • Add workflow calls.
  • Split build.yml into build.yml and test.yml.
  • Add a self trigger to run build and test on push and PR.
  • Increase parameterisation.

A Spin of Infix can now use workflow calls to run Infix build and test directly. This means an Infix Spin doesn't have to duplicate or create there own github workflow for building and testing.
Here's an example of how that might look (pseudo):

name: Infix SpinX CI

on:
  pull_request:
    types: [opened, synchronize, reopened, labeled]
...
jobs:
  build-infix-x86_64:
    uses: kernelkit/infix/.github/workflows/build.yml@main
    with:
      name: "Infix-SpinX"
      target: "x86_64"
      infix_repo: "kernelkit/infix"

  test-infix-x86_64:
    needs: build-infix-x86_64
    uses: kernelkit/infix/.github/workflows/test.yml@main
    with:
      name: "Infix-SpinX"
      target: "x86_64"
      infix_repo: "kernelkit/infix"
      ninepm-conf: "test/9pm-proj.yaml"
      test-path: "infix/test"

  publish-infix:
    needs: test-infix-x86_64
    uses: kernelkit/infix/.github/workflows/publish.yml@main
    

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

rical added 11 commits July 7, 2025 09:52
Redesign how GH actions are triggered. This new design uses a
self-trigger to start jobs which are only started via workflow_calls.

The main benefit of this is to be able to start workflows from various
Infix Spins without needing to duplicate the workflow files in them.

Upcoming patches are intended to parameterize to allow Spins to pass
different architectures, brand names and such.

Signed-off-by: Richard Alpe <richard@bit42.se>
Signed-off-by: Richard Alpe <richard@bit42.se>
Needed when called by spins inside different organizations.
Signed-off-by: Richard Alpe <richard@bit42.se>
Signed-off-by: Richard Alpe <richard@bit42.se>
@rical rical force-pushed the ci-workflow-redesign branch from f087b3b to 2a8580e Compare July 7, 2025 07:54
Copy link
Copy Markdown
Contributor

@troglobit troglobit left a comment

Choose a reason for hiding this comment

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

Sad to see Bob go 🏗 👷 but otherwise this looks like a very nice cleanup that make it quite a bit more professional! 👏👏👏

Comment thread .github/workflows/build.yml Outdated
type: boolean
default: ''
type: string
parallell:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rename my mistake please ❤️

@troglobit
Copy link
Copy Markdown
Contributor

@rical are you still "hogging" the Styx test system? (It might be why it hasn't picked up this job yet ...)

@rical
Copy link
Copy Markdown
Contributor Author

rical commented Jul 9, 2025

@rical are you still "hogging" the Styx test system? (It might be why it hasn't picked up this job yet ...)

I released it early this morning. Guess it's still working on its backlog.

Fixes: 874c0a5 Use massive parallel in workflow for PRs

Signed-off-by: Richard Alpe <richard@bit42.se>
@rical rical force-pushed the ci-workflow-redesign branch from 5e2173d to 45c5885 Compare July 9, 2025 08:43
@troglobit
Copy link
Copy Markdown
Contributor

All tests pass, let's merge!

@troglobit troglobit merged commit c5d9a7c into main Jul 9, 2025
9 checks passed
@troglobit troglobit deleted the ci-workflow-redesign branch July 9, 2025 09:52
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.

3 participants