mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-11 12:52:23 +00:00
Merge pull request #2417 from jcvenegas/docker-build-fixes
kata-tarball: Build and test fixes
This commit is contained in:
commit
230eae3ff3
19
.github/workflows/kata-deploy-push.yaml
vendored
19
.github/workflows/kata-deploy-push.yaml
vendored
@ -1,6 +1,6 @@
|
|||||||
name: kata-deploy-build
|
name: kata deploy build
|
||||||
|
|
||||||
on: push
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-asset:
|
build-asset:
|
||||||
@ -24,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build ${{ matrix.asset }}
|
- name: Build ${{ matrix.asset }}
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-binaries-in-docker.sh --build="${KATA_ASSET}"
|
make "${KATA_ASSET}-tarball"
|
||||||
build_dir=$(readlink -f build)
|
build_dir=$(readlink -f build)
|
||||||
# store-artifact does not work with symlink
|
# store-artifact does not work with symlink
|
||||||
sudo cp -r --preserve=all "${build_dir}" "kata-build"
|
sudo cp -r --preserve=all "${build_dir}" "kata-build"
|
||||||
@ -47,12 +47,21 @@ jobs:
|
|||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: kata-artifacts
|
name: kata-artifacts
|
||||||
path: kata-artifacts
|
path: build
|
||||||
- name: merge-artifacts
|
- name: merge-artifacts
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-merge-builds.sh kata-artifacts
|
make merge-builds
|
||||||
- name: store-artifacts
|
- name: store-artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: kata-static-tarball
|
name: kata-static-tarball
|
||||||
path: kata-static.tar.xz
|
path: kata-static.tar.xz
|
||||||
|
|
||||||
|
make-kata-tarball:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: make kata-tarball
|
||||||
|
run: |
|
||||||
|
make kata-tarball
|
||||||
|
sudo make install-tarball
|
||||||
|
7
Makefile
7
Makefile
@ -18,6 +18,7 @@ TOOLS += agent-ctl
|
|||||||
STANDARD_TARGETS = build check clean install test vendor
|
STANDARD_TARGETS = build check clean install test vendor
|
||||||
|
|
||||||
include utils.mk
|
include utils.mk
|
||||||
|
include ./tools/packaging/kata-deploy/local-build/Makefile
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
@ -33,10 +34,4 @@ generate-protocols:
|
|||||||
static-checks: build
|
static-checks: build
|
||||||
bash ci/static-checks.sh
|
bash ci/static-checks.sh
|
||||||
|
|
||||||
binary-tarball:
|
|
||||||
make -f ./tools/packaging/kata-deploy/local-build/Makefile
|
|
||||||
|
|
||||||
install-binary-tarball:
|
|
||||||
make -f ./tools/packaging/kata-deploy/local-build/Makefile install
|
|
||||||
|
|
||||||
.PHONY: all default static-checks binary-tarball install-binary-tarball
|
.PHONY: all default static-checks binary-tarball install-binary-tarball
|
||||||
|
@ -7,47 +7,51 @@ MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|||||||
MK_DIR := $(dir $(MK_PATH))
|
MK_DIR := $(dir $(MK_PATH))
|
||||||
|
|
||||||
# Verbose build
|
# Verbose build
|
||||||
V ?=
|
V := 1
|
||||||
ifneq ($(V),)
|
|
||||||
SILENT_BUILD_FLAG =
|
|
||||||
else
|
|
||||||
SILENT_BUILD_FLAG = -s
|
|
||||||
endif
|
|
||||||
|
|
||||||
define BUILD
|
define BUILD
|
||||||
$(MK_DIR)/kata-deploy-binaries-in-docker.sh $(SILENT_BUILD_FLAG) --build=$1
|
$(MK_DIR)/kata-deploy-binaries-in-docker.sh $(if $(V),,-s) --build=$1
|
||||||
endef
|
endef
|
||||||
|
|
||||||
kata-tarball: | all-parallel merge-builds
|
kata-tarball: | all-parallel merge-builds
|
||||||
|
|
||||||
all-parallel:
|
all-parallel:
|
||||||
make -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) NO_TTY="true"
|
${MAKE} -f $(MK_PATH) all -j$$(( $$(nproc) - 1 )) NO_TTY="true" V=
|
||||||
|
|
||||||
all: cloud-hypervisor firecracker kernel qemu rootfs-image rootfs-initrd shim-v2
|
all: cloud-hypervisor-tarball \
|
||||||
|
firecracker-tarball \
|
||||||
|
kernel-tarball \
|
||||||
|
qemu-tarball \
|
||||||
|
rootfs-image-tarball \
|
||||||
|
rootfs-initrd-tarball \
|
||||||
|
shim-v2-tarball
|
||||||
|
|
||||||
cloud-hypervisor:
|
%-tarball-build:
|
||||||
$(call BUILD,$@)
|
$(call BUILD,$*)
|
||||||
|
|
||||||
firecracker:
|
cloud-hypervisor-tarball:
|
||||||
$(call BUILD,$@)
|
${MAKE} $@-build
|
||||||
|
|
||||||
kernel:
|
firecracker-tarball:
|
||||||
$(call BUILD,$@)
|
${MAKE} $@-build
|
||||||
|
|
||||||
qemu:
|
kernel-tarball:
|
||||||
$(call BUILD,$@)
|
${MAKE} $@-build
|
||||||
|
|
||||||
rootfs-image:
|
qemu-tarball:
|
||||||
$(call BUILD,$@)
|
${MAKE} $@-build
|
||||||
|
|
||||||
rootfs-initrd:
|
rootfs-image-tarball:
|
||||||
$(call BUILD,$@)
|
${MAKE} $@-build
|
||||||
|
|
||||||
shim-v2:
|
rootfs-initrd-tarball:
|
||||||
$(call BUILD,$@)
|
${MAKE} $@-build
|
||||||
|
|
||||||
|
shim-v2-tarball:
|
||||||
|
${MAKE} $@-build
|
||||||
|
|
||||||
merge-builds:
|
merge-builds:
|
||||||
$(MK_DIR)/kata-deploy-merge-builds.sh build
|
$(MK_DIR)/kata-deploy-merge-builds.sh build
|
||||||
|
|
||||||
install:
|
install-tarball:
|
||||||
tar -xvf ./kata-static.tar.xz -C /
|
tar -xvf ./kata-static.tar.xz -C /
|
||||||
|
Loading…
Reference in New Issue
Block a user