Skip to content

Commit

Permalink
chore(cargo workspace): unifies crates as workspace
Browse files Browse the repository at this point in the history
Combines all rust crates under a single workspace
to simplify management of rust packaging, with
the exception of ebpf which needs independent
tooling and packages to properly build.

Author: Evan Jones <[email protected]>
  • Loading branch information
EandrewJones committed Apr 29, 2024
1 parent eeedb18 commit c4267a4
Show file tree
Hide file tree
Showing 29 changed files with 474 additions and 319 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
service.controlplane.Dockerfile
go.mod
go.sum
main.go
Expand All @@ -40,12 +40,11 @@ jobs:
id: dataplane-changed
with:
files: |
dataplane/Dockerfile
service.dataplane.Dockerfile
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: service.controlplane.Dockerfile
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: service.dataplane.Dockerfile
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: service.controlplane.Dockerfile
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: service.dataplane.Dockerfile
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 c4267a4

Please sign in to comment.