Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ on:
workflow_dispatch:
inputs:
target:
description: "Build target (e.g. aarch64)"
description: "Build target (e.g. aarch64 or aarch64_minimal)"
default: "x86_64"
type: string
flavor:
description: 'Optional build flavor (e.g. _minimal)'
default: ''
type: string
parallel:
description: 'Massive parallel build of each image'
default: true
Expand All @@ -32,10 +28,6 @@ on:
name:
required: true
type: string
flavor:
required: false
type: string
default: ''
infix_repo:
required: false
type: string
Expand All @@ -48,7 +40,6 @@ on:
env:
NAME: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }}
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
FLV: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.flavor || inputs.flavor }}
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}

jobs:
Expand Down Expand Up @@ -96,8 +87,7 @@ jobs:
name=${{ env.NAME }}
echo "dir=${name}-${target}" >> $GITHUB_OUTPUT
echo "tgz=${name}-${target}.tar.gz" >> $GITHUB_OUTPUT
echo "flv=$FLV" >> $GITHUB_OUTPUT
echo "Building target ${target}${FLV}_defconfig"
echo "Building target ${target}_defconfig"

- name: Restore Cache of dl/
uses: actions/cache@v4
Expand All @@ -116,9 +106,9 @@ jobs:
ccache-${{ env.TARGET }}-
ccache-

- name: Configure ${{ env.TARGET }}${{ steps.vars.outputs.flv }}
- name: Configure ${{ env.TARGET }}
run: |
make ${{ env.TARGET }}${{ steps.vars.outputs.flv }}_defconfig
make ${{ env.TARGET }}_defconfig

- name: Unit Test ${{ env.TARGET }}
run: |
Expand All @@ -138,9 +128,9 @@ jobs:
fi
echo "MAKE=$MAKE" >> $GITHUB_OUTPUT

- name: Build ${{ env.TARGET }}${{ steps.vars.outputs.flv }}
- name: Build ${{ env.TARGET }}
run: |
echo "Building ${{ env.TARGET }}${{ steps.vars.outputs.flv }}_defconfig ..."
echo "Building ${{ env.TARGET }}_defconfig ..."
eval "${{ steps.parallel.outputs.MAKE }}"

- name: Check SBOM from Build
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/generic-x86-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
echo "INFIX_BUILD_ID=${{ github.run_id }}" >> $GITHUB_OUTPUT
echo "dir=Infix-x86_64" >> $GITHUB_OUTPUT
echo "tgz=Infix-x86_64.tar.gz" >> $GITHUB_OUTPUT
echo "flv=_minimal" >> $GITHUB_OUTPUT

- name: Configure x86_64_minimal
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
replacesArtifacts: true
omitName: true
omitBody: true
omitBodyDuringUpdate: true
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ on:
name:
required: true
type: string
flavor:
required: false
type: string
default: ''
infix_repo:
required: false
type: string
Expand All @@ -35,14 +31,14 @@ on:
default: 'test'

env:
FLV: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.flavor || inputs.flavor }}
TARGET: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
INFIX_REPO: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.infix_repo || inputs.infix_repo }}
NINEPM_CONF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ninepm-conf || inputs.ninepm-conf }}
TEST_PATH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.test-path || inputs.test-path }}

jobs:
test:
name: Regression Test ${{ inputs.name }} ${{ inputs.target }}
name: Regression Test ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
runs-on: [ self-hosted, regression ]
steps:
- name: Checkout infix repo
Expand All @@ -62,20 +58,18 @@ jobs:
>>$GITHUB_ENV
fi

echo "flv=$FLV" >> $GITHUB_OUTPUT

- name: Configure ${{ inputs.target }}${{ steps.vars.outputs.flv }}
- name: Configure ${{ env.TARGET }}
run: |
make ${{ inputs.target }}${{ steps.vars.outputs.flv }}_defconfig
make ${{ env.TARGET }}_defconfig

- uses: actions/download-artifact@v4
with:
pattern: "artifact-*"
merge-multiple: true

- name: Restore x86-64${{ steps.vars.outputs.flv }} output/
- name: Restore ${{ env.TARGET }} output/
run: |
target=${{ inputs.target }}
target=${{ env.TARGET }}
name=${{ inputs.name }}

ls -l
Expand All @@ -85,20 +79,20 @@ jobs:
tar xf ${name}-${target}.tar.gz
ln -s ${name}-${target} images

- name: Regression Test x86_64${{ steps.vars.outputs.flv }}
- name: Regression Test ${{ env.TARGET }}
run: |
if [ -n "$NINEPM_CONF" ]; then
export NINEPM_PROJ_CONFIG="${GITHUB_WORKSPACE}/$NINEPM_CONF"
echo "DEBUG: NINEPM_PROJ_CONFIG is '$NINEPM_PROJ_CONFIG'"
fi
make test

- name: Publish Test Result for x86_64${{ steps.vars.outputs.flv }}
- name: Publish Test Result for ${{ env.TARGET }}
# Ensure this runs even if Regression Test fails
if: always()
run: cat $TEST_PATH/.log/last/result-gh.md >> $GITHUB_STEP_SUMMARY

- name: Generate Test Report for x86_64${{ steps.vars.outputs.flv }}
- name: Generate Test Report for ${{ env.TARGET }}
# Ensure this runs even if Regression Test fails
if: always()
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,25 @@ jobs:
if: startsWith(github.repository, 'kernelkit/')
uses: ./.github/workflows/build.yml
with:
target: "x86_64"
name: "infix"
flavor: "_minimal"
target: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:main')) && 'x86_64' || 'x86_64_minimal' }}

build-aarch64:
if: startsWith(github.repository, 'kernelkit/')
uses: ./.github/workflows/build.yml
with:
target: "aarch64"
name: "infix"
flavor: "_minimal"
target: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:main')) && 'aarch64' || 'aarch64_minimal' }}

test-run-x86_64:
if: startsWith(github.repository, 'kernelkit/')
needs: build-x86_64
uses: ./.github/workflows/test.yml
with:
target: "x86_64"
target: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci:main')) && 'x86_64' || 'x86_64_minimal' }}
name: "infix"

test-publish-x86_64:
if: startsWith(github.repository, 'kernelkit/')
needs: test-run-x86_64
uses: ./.github/workflows/publish.yml