mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 01:06:27 +00:00
Merge pull request #4008 from deitch/kernel-publish-ci
make kernel read/build and check part of CI
This commit is contained in:
commit
60da9b92e4
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@ -130,6 +130,23 @@ jobs:
|
||||
run: |
|
||||
make OPTIONS="-v --skip-platforms linux/s390x" -C test/pkg build
|
||||
|
||||
- name: Check Kernel Dependencies up to date
|
||||
# checks that any kernel dependencies are up to date.
|
||||
# if they are, then running `make update-kernel-yamls` will not change anything
|
||||
run: |
|
||||
echo "checking git diff before running make update-kernel-yamls"
|
||||
git diff --exit-code
|
||||
echo "running make update-kernel-yamls"
|
||||
make -C kernel update-kernel-yamls
|
||||
echo "checking git diff again after running make update-kernel-yamls; should be no changes"
|
||||
git diff --exit-code
|
||||
|
||||
- name: Build Kernels
|
||||
# ensures that the kernel packages are in linuxkit cache when we need them for tests later
|
||||
# no need for excluding s390x, as each build.yml in the kernel explicitly lists archs
|
||||
run: |
|
||||
make OPTIONS="-v" -C kernel build
|
||||
|
||||
- name: list cache contents
|
||||
run: |
|
||||
linuxkit cache ls
|
||||
|
8
.github/workflows/publish.yaml
vendored
8
.github/workflows/publish.yaml
vendored
@ -63,3 +63,11 @@ jobs:
|
||||
# Skip s390x as emulation is unreliable
|
||||
run: |
|
||||
make OPTIONS="--skip-platforms linux/s390x" -C pkg push PUSHOPTIONS="--nobuild"
|
||||
|
||||
- name: Publish Kernels
|
||||
# this should only push changed ones:
|
||||
# - unchanged: already in the registry
|
||||
# - changed: already built and cached, so only will push
|
||||
# No need to skip s390x, since kernel build.yml files all have explicit archs
|
||||
run: |
|
||||
make -C kernel push
|
||||
|
@ -69,7 +69,7 @@ case "${mode}" in
|
||||
fi
|
||||
old=$1
|
||||
new=$2
|
||||
git grep -E -l "\b($old)([[:space:]]|$)?" -- '*.yml' '*.yaml' '*.yml.in' '*.yaml.in' '*/Dockerfile' '*/Makefile' | grep -v /vendor/ | while read -r file; do sed -ri.bak -e "s,($old)([[:space:]]|$)?,$new\2,g" "$file"; done
|
||||
git grep -E -l "\b($old)([[:space:]]|$)" -- '*.yml' '*.yaml' '*.yml.in' '*.yaml.in' '*/Dockerfile' '*/Makefile' | grep -v /vendor/ | while read -r file; do sed -ri.bak -e "s,($old)([[:space:]]|$),$new\2,g" "$file"; done
|
||||
;;
|
||||
--image)
|
||||
if [ $# -lt 1 ] ; then
|
||||
@ -99,4 +99,4 @@ case "${mode}" in
|
||||
;;
|
||||
esac
|
||||
|
||||
find . -name '*.bak' | xargs rm
|
||||
find . -name '*.bak' | xargs rm || true
|
||||
|
Loading…
Reference in New Issue
Block a user