-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,66 @@ | ||
name: Test Kernel Build | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
packages: read | ||
env: | ||
TEST_MATRIX_SPEC: "only-latest:flavor=zone" | ||
jobs: | ||
test: | ||
name: matrix | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
with: | ||
submodules: recursive | ||
- name: install dependencies | ||
run: ./hack/build/install-matrix-deps.sh | ||
- name: generate spec-new matrix | ||
run: 'PATH="${HOME}/go/bin:${PATH}" KERNEL_BUILD_SPEC="new" ./hack/build/generate-matrix.sh' | ||
- name: upload spec-new matrix | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | ||
with: | ||
name: spec-new-matrix | ||
path: "matrix.json" | ||
compression-level: 0 | ||
- name: generate spec-rebuild matrix | ||
run: 'PATH="${HOME}/go/bin:${PATH}" KERNEL_BUILD_SPEC="rebuild" ./hack/build/generate-matrix.sh' | ||
- name: upload spec-rebuild matrix | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | ||
with: | ||
name: spec-rebuild-matrix | ||
path: "matrix.json" | ||
compression-level: 0 | ||
- name: generate test matrix | ||
run: 'PATH="${HOME}/go/bin:${PATH}" KERNEL_BUILD_SPEC="${TEST_MATRIX_SPEC}" ./hack/build/generate-matrix.sh' | ||
- name: upload test matrix | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | ||
with: | ||
name: test-matrix | ||
path: "matrix.json" | ||
compression-level: 0 | ||
- name: docker setup linux-kernel-oci | ||
run: sudo python3 ./hack/build/docker-setup.py | ||
- name: docker setup buildx | ||
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3 | ||
- name: docker login ghcr.io | ||
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | ||
with: | ||
registry: ghcr.io | ||
username: "${{github.actor}}" | ||
password: "${{secrets.GITHUB_TOKEN}}" | ||
- name: generate docker script | ||
run: './hack/build/generate-docker-script.sh matrix.json' | ||
- name: upload docker script | ||
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 | ||
with: | ||
name: "build-${{ matrix.builds.version }}-${{ matrix.builds.flavor }}.sh" | ||
path: "docker.sh" | ||
compression-level: 0 | ||
- name: run docker script | ||
run: sh -x docker.sh |
This file contains 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