-
Notifications
You must be signed in to change notification settings - Fork 20
ci: add integration tests #74
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
Merged
dmcgowan
merged 3 commits into
containerd:main
from
austinvazquez:add-integration-test-to-ci
Mar 13, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| golang 1.25.8 | ||
dmcgowan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| kernel 6.12.44 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| name: "Build Kernel" | ||
| description: "Composite action to build Linux kernels" | ||
| inputs: | ||
| kernel_version: | ||
| description: 'Kernel version to build' | ||
| required: true | ||
| default: '6.12.44' | ||
| kernel_arch: | ||
| description: 'Kernel architecture to build' | ||
| required: true | ||
| default: 'x86_64' | ||
| kernel_nproc: | ||
| description: 'Number of parallel build processes' | ||
| required: false | ||
| # Public runners provide 4 cores; default to that to avoid overloading | ||
| # https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for-public-repositories | ||
| default: '4' | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | ||
|
|
||
| - name: Calculate kernel cache key | ||
| id: cache-key | ||
| shell: bash | ||
| run: | | ||
| # Hash the kernel config and patches to create a unique cache key | ||
| CONFIG_FILE="kernel/config-${{ inputs.kernel_version }}-${{ inputs.kernel_arch }}" | ||
austinvazquez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| if [ ! -f "$CONFIG_FILE" ]; then | ||
| echo "Error: Kernel config file $CONFIG_FILE not found" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Calculate hash of config file and all patches | ||
| CONFIG_HASH=$(sha256sum "$CONFIG_FILE" | cut -d' ' -f1) | ||
| PATCHES_HASH=$(find kernel/patches -type f -name "*.patch" -exec sha256sum {} \; | sort | sha256sum | cut -d' ' -f1) | ||
|
|
||
| # Combine version, arch, config hash, and patches hash | ||
| CACHE_KEY="kernel-${{ inputs.kernel_version }}-${{ inputs.kernel_arch }}-${CONFIG_HASH:0:8}-${PATCHES_HASH:0:8}" | ||
|
|
||
| echo "cache-key=${CACHE_KEY}" >> $GITHUB_OUTPUT | ||
| echo "config-hash=${CONFIG_HASH:0:8}" >> $GITHUB_OUTPUT | ||
| echo "patches-hash=${PATCHES_HASH:0:8}" >> $GITHUB_OUTPUT | ||
|
|
||
| echo "Kernel cache key: ${CACHE_KEY}" | ||
| echo "Config hash: ${CONFIG_HASH:0:8}" | ||
| echo "Patches hash: ${PATCHES_HASH:0:8}" | ||
|
|
||
| - name: Check cache for existing kernel | ||
| id: cache-kernel | ||
| uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
| with: | ||
| path: _output/nerdbox-kernel-${{ inputs.kernel_arch }} | ||
| key: ${{ steps.cache-key.outputs.cache-key }} | ||
| lookup-only: true | ||
|
|
||
| - name: Build kernel | ||
| if: steps.cache-kernel.outputs.cache-hit != 'true' | ||
| shell: bash | ||
| run: | | ||
| docker buildx bake kernel \ | ||
| --set kernel.args.KERNEL_VERSION=${{ inputs.kernel_version }} \ | ||
| --set kernel.args.KERNEL_ARCH=${{ inputs.kernel_arch }} \ | ||
| --set kernel.args.KERNEL_NPROC=${{ inputs.kernel_nproc }} | ||
austinvazquez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Verify kernel artifact | ||
| if: steps.cache-kernel.outputs.cache-hit != 'true' | ||
| shell: bash | ||
| run: | | ||
| kernel_file="_output/nerdbox-kernel-${{ inputs.kernel_arch }}" | ||
| if [ ! -f "$kernel_file" ]; then | ||
| echo "Error: Kernel file $kernel_file not found after build" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "Kernel built successfully:" | ||
| ls -lh "$kernel_file" | ||
| file "$kernel_file" | ||
|
|
||
| - name: Save kernel to cache | ||
| if: steps.cache-kernel.outputs.cache-hit != 'true' | ||
| uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0 | ||
| with: | ||
| path: _output/nerdbox-kernel-${{ inputs.kernel_arch }} | ||
austinvazquez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| key: ${{ steps.cache-key.outputs.cache-key }} | ||
|
|
||
| - name: Upload kernel artifact | ||
| if: steps.cache-kernel.outputs.cache-hit != 'true' | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| with: | ||
| name: nerdbox-kernel-${{ inputs.kernel_version }}-${{ inputs.kernel_arch }} | ||
| path: _output/nerdbox-kernel-${{ inputs.kernel_arch }} | ||
| retention-days: 90 | ||
| if-no-files-found: error | ||
|
|
||
| - name: Cache summary | ||
| shell: bash | ||
| run: | | ||
austinvazquez marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "## Kernel Build Summary" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Version**: ${{ inputs.kernel_version }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Architecture**: ${{ inputs.kernel_arch }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Cache Key**: \`${{ steps.cache-key.outputs.cache-key }}\`" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Config Hash**: ${{ steps.cache-key.outputs.config-hash }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Patches Hash**: ${{ steps.cache-key.outputs.patches-hash }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Cache Hit**: ${{ steps.cache-kernel.outputs.cache-hit == 'true' && '✅ Yes (reused existing)' || '❌ No (built from scratch)' }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| if [ -f "_output/nerdbox-kernel-${{ inputs.kernel_arch }}" ]; then | ||
| echo "### Kernel Details" >> $GITHUB_STEP_SUMMARY | ||
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | ||
| ls -lh "_output/nerdbox-kernel-${{ inputs.kernel_arch }}" >> $GITHUB_STEP_SUMMARY | ||
| file "_output/nerdbox-kernel-${{ inputs.kernel_arch }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | ||
| fi | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Build Kernel | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| kernel_version: | ||
| description: 'Kernel version to build' | ||
| required: true | ||
| default: '6.12.44' | ||
| kernel_nproc: | ||
| description: 'Number of parallel build processes' | ||
| required: false | ||
| # Public runners provide 4 cores; default to that to avoid overloading | ||
| # https://docs.github.com/en/actions/reference/runners/github-hosted-runners#standard-github-hosted-runners-for-public-repositories | ||
| default: '4' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-kernel: | ||
| name: Build Kernel ${{ inputs.kernel_version }}-${{ matrix.kernel_arch }} | ||
| runs-on: ${{ matrix.os }} | ||
| timeout-minutes: 60 | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-latest | ||
| kernel_arch: x86_64 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||
|
|
||
| - uses: ./.github/actions/build-kernel | ||
| with: | ||
| kernel_version: ${{ inputs.kernel_version }} | ||
| kernel_arch: ${{ matrix.kernel_arch }} | ||
| kernel_nproc: ${{ inputs.kernel_nproc }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.