Skip to content

Commit

Permalink
chore(cargo workspace): unifies crates as workspace (#227)
Browse files Browse the repository at this point in the history
## Changes

Combines all rust crates under a single workspace to simplify management
of rust packaging.

> *_Note:_* All crates are converted to the workspace with the exception
of ebpf which needs independent tooling and packages to properly build.

Closes #218
  • Loading branch information
k8s-ci-robot authored May 31, 2024
2 parents 4b8278c + 8a8157a commit 2df33c4
Show file tree
Hide file tree
Showing 31 changed files with 479 additions and 322 deletions.
File renamed without changes.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
.github/
bin/
testbin/
dataplane/
tools/
bin/
config/
*.md
10 changes: 2 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,10 @@ jobs:
# TODO: Once we migrate the controller from Go to Rust,
# add the controller build step here.

- name: Build dataplane
working-directory: ./dataplane
- name: Build all rust crates (dataplane, test server)
run: |
make build
make build.rust
- name: Build UDP Test Server
working-directory: ./tools/udp-test-server
run: |
make build
- name: Check formatting
run: |
make check.format.rust
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
id: control-plane-changed
with:
files: |
Dockerfile
Containerfile.controlplane
go.mod
go.sum
main.go
Expand All @@ -40,12 +40,11 @@ jobs:
id: dataplane-changed
with:
files: |
dataplane/Dockerfile
Containerfile.dataplane
dataplane/go.mod
dataplane/go.sum
dataplane/main.go
dataplane/xdp.c
dataplane/Makefile
dataplane/LICENCE
- name: Check if any of the workflow files have changed
uses: tj-actions/changed-files@716b1e13042866565e00e85fd4ec490e186c4a2f
Expand Down Expand Up @@ -80,6 +79,7 @@ jobs:
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
with:
context: .
file: Containerfile.controlplane
cache-from: type=gha
cache-to: type=gha,mode=max
tags: kubernetes-sigs/blixt-controlplane:pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}
Expand All @@ -92,7 +92,8 @@ jobs:
- name: Docker build - Dataplane
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
with:
context: dataplane
context: .
file: Containerfile.dataplane
cache-from: type=gha
cache-to: type=gha,mode=max
tags: kubernetes-sigs/blixt-dataplane:pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}
Expand Down Expand Up @@ -130,14 +131,16 @@ jobs:
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
with:
context: .
file: Containerfile.controlplane
push: false # TODO: https://github.com/kubernetes-sigs/blixt/issues/106
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ghcr.io/kubernetes-sigs/blixt-controlplane:latest
- name: Docker build - Data Plane
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5
with:
context: dataplane
context: .
file: Containerfile.dataplane
push: false # TODO: https://github.com/kubernetes-sigs/blixt/issues/106
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*.dylib
bin/*

# xtask targets
target/

# Test binary, built with `go test -c`
*.test

Expand Down
Loading

0 comments on commit 2df33c4

Please sign in to comment.