Skip to content
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

refactor: re-implement the slight shim with libcontainer instance #125

Merged
merged 2 commits into from
Aug 22, 2023
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: build
run: |
VERBOSE=1 make build
- name: unit tests
run: |
VERBOSE=1 make unit-tests
- name: lowercase the runner OS name
shell: bash
run: |
Expand Down
19 changes: 7 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,22 @@ jobs:
build:
uses: ./.github/workflows/build.yaml
test:
needs: build
runs-on: ubuntu-latest
env:
ARCH: x86_64
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
"containerd-shim-*-v1 -> target"
- name: "Install Rust Wasm targets"
- uses: actions/download-artifact@v3
- name: Extract containerd-wasm-shims-v1-linux-${{ env.ARCH }}
run: |
make install-rust-targets
- name: "Install dependencies"
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler -y
mkdir -p ./bin
tar -xzf containerd-wasm-shims-v1-linux-${{ env.ARCH }}/containerd-wasm-shims-v1-linux-${{ env.ARCH }}.tar.gz -C ./bin
- name: install k3d
run: make install-k3d
working-directory: ./deployments/k3d
- name: run integration tests
run: make test
run: BIN_DIR="./bin" make integration-tests
- name: clean up k3d
if: always()
run: make test/clean
run: make test/clean
27 changes: 24 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,42 @@ else
VERBOSE_FLAG := -vvv
endif

BIN_DIR ?=

.PHONY: test
test: unit-tests integration-tests

.PHONY: unit-tests
unit-tests: build
$(foreach shim,$(SHIMS),cross test --release --manifest-path=containerd-shim-$(shim)-v1/Cargo.toml --target $(TARGET);)

.PHONY: check-bins
check-bins:
./scripts/check-bins.sh

./PHONY: move-bins
move-bins:
./scripts/move-bins.sh $(BIN_DIR)

./PHONY: up
up:
./scripts/up.sh

./PHONY: pod-status-check
pod-status-check:
./scripts/pod-status-check.sh

./PHONY: workloads
workloads:
./scripts/workloads.sh

.PHONY: integration-tests
integration-tests: build
$(PYTHON) tests/setup.py $(TARGET)
integration-tests: install-cross check-bins move-bins up pod-status-check workloads
cargo test -- --nocapture

.PHONY: tests/clean
test/clean:
$(PYTHON) tests/teardown.py
./scripts/down.sh

.PHONY: fmt
fmt:
Expand Down
Loading