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
5 changes: 3 additions & 2 deletions .github/workflows/containerization-build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
CURRENT_SDK: y
- name: Test containerization
run: |
make test integration
make fetch-default-kernel
make test integration
env:
REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REGISTRY_USERNAME: ${{ github.actor }}
Expand Down Expand Up @@ -112,4 +113,4 @@ jobs:
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./_site"
path: "./_site"
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,17 @@ test:
@$(SWIFT) test --enable-code-coverage

.PHONY: integration
integration: kernel-bin
integration:
ifeq (,$(wildcard bin/vmlinux))
@echo No bin/vmlinux kernel found. See fetch-default-kernel target.
@exit 1
endif
@echo Running the integration tests...
@./bin/containerization-integration --bootlog ./bin/boot.log

.PHONY: kernel-bin
kernel-bin:
@mkdir -p .local/
.PHONY: fetch-default-kernel
fetch-default-kernel:
@mkdir -p .local/ bin/
ifeq (,$(wildcard .local/kata.tar.gz))
@curl -SsL -o .local/kata.tar.gz ${KATA_BINARY_PACKAGE}
endif
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,16 @@ Build Containerization from sources and run basic and integration tests:
make all test integration
```

A kernel is required to run integration tests.
If you do not have a kernel locally for use a default kernel can be fetched using the `make fetch-default-kernel` target.

Fetching the default kernel only needs to happen after an initial build or after a `make clean`.

```bash
make fetch-default-kernel
make all test integration
```

## Protobufs

Containerization depends on specific versions of `grpc-swift` and `swift-protobuf`. You can install them and re-generate RPC interfaces with:
Expand Down
5 changes: 3 additions & 2 deletions kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ This directory includes an optimized kernel configuration to produce a fast and

## Building

1. Build the `Containerization` project by running `make all kernel-bin` in the root of the repository.
2. Place the kernel you want to use in `bin/vmlinux` directory of this repository.
1. Build the `Containerization` project by running `make` in the root of the repository.
2. Place a kernel you want to use in `bin/vmlinux` directory of the repository.
a. This kernel will be used to launch the build container.
b. To fetch a default kernel run `make fetch-default-kernel` in the root of the repository.
4. Run `make` in the `/kernel` directory.

A `kernel/vmlinux` will be the result of the build.