Skip to content

Add Next.mk #2

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

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft

Add Next.mk #2

wants to merge 12 commits into from

Conversation

dio
Copy link
Owner

@dio dio commented Nov 14, 2022

WIP

Signed-off-by: Dhi Aurrahman [email protected]

@dio dio force-pushed the makefile-proposal branch 3 times, most recently from 03cb0b5 to fc2f614 Compare November 14, 2022 10:49
This proposes a new Makefile. Currently, it resides in Next.mk.
To invoke a target inside it, run it with `make -f Next.mk`.

The Next.mk has several targets, that can be inspected via the
help target.

```
$ make -f Next.mk help
protoc-gen-validate
build      Build the plugin
clean      Clean all build and test artifacts
check      Verify contents of last commit
help       Describe how to use each target
```

Next.mk depends on several *.mk files:
- Tools.mk provides dependency tools versions.
- tools/build/Help.mk provides the "help" target.
- tools/build/Env.mk sets some required env vars.
- tools/build/Installer.mk provides targets that install tools.

This patch moves BUILD to BUILD.bazel hence "build" directory
can be used to store the current plugin binary.

This patch also adds a new workflow: .github/workflows/commit.yaml
To run "build" and "check". The build step runs clean before
build hence the *.pb.go is regenerated and its consistency can be
checked via `make check`.

Signed-off-by: Dhi Aurrahman <[email protected]>
@dio dio force-pushed the makefile-proposal branch 2 times, most recently from 064b0d2 to 0b899f4 Compare November 14, 2022 11:45
This adds the test target to run the required tests. The test
target can be invoked via: `make -f Next.mk test`. This target
runs test via bazel.

The bazel command is provided via bazelisk so we can pick up
the right bazel version (hint: .bazelversion).

Before running the test, we generate the required *.go files
via tests_harness_cases_go (which is a dependency of test target).

This patch adds test target invocation in the workflow, also
sets up the corresponding caching mechanism for bazel.

Signed-off-by: Dhi Aurrahman <[email protected]>
@dio dio force-pushed the makefile-proposal branch from 27cbbd4 to 6295a15 Compare November 14, 2022 14:04
This runs bazel-related checks.

Signed-off-by: Dhi Aurrahman <[email protected]>
alyssawilk and others added 9 commits November 28, 2022 10:32
before
-rwxr-x--- 1 alyssar primarygroup 23338512 Nov 21 17:00
bazel-bin/test/performance/test_binary_size_stripped
-rwxr-x--- 1 alyssar primarygroup 23M Nov 21 17:00
bazel-bin/test/performance/test_binary_size_stripped
after
-rwxr-x--- 1 alyssar primarygroup 19642512 Nov 21 17:04
bazel-bin/test/performance/test_binary_size_stripped
-rwxr-x--- 1 alyssar primarygroup 19M Nov 21 17:04
bazel-bin/test/performance/test_binary_size_stripped

Proof of concept use here:
envoyproxy/envoy#24151 which is passing all
Envoy Mobile CI (its failing Envoy CI because of the dependency check
which is expected and irrelevant)
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elliot Jackson <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elliot Jackson <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elliot Jackson <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…d#747) #patch

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ild#748) #patch

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants