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

jmhCompile should not compile with compiler arg -Werror #866

Merged
merged 10 commits into from
Feb 18, 2020
7 changes: 7 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ init_task: &init_task
build_task: &build_task
name: Build
command: make test
compile_benchmark_task: &compile_benchmark_task
name: Compile JMH
command: make benchmark
verify_task: &verify_task
name: Verify Google Java Format
command: make verify-format
Expand All @@ -32,6 +35,8 @@ jobs:
<<: *verify_task
- run:
<<: *build_task
- run:
<<: *compile_benchmark_task
- run:
name: Cover
command: ./gradlew check :opentelemetry-all:jacocoTestReport
Expand Down Expand Up @@ -65,6 +70,8 @@ jobs:
<<: *verify_task
- run:
<<: *build_task
- run:
<<: *compile_benchmark_task
- save_cache:
paths:
- ~/.gradle
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
test:
./gradlew clean assemble check --stacktrace

.PHONY: benchmark
benchmark:
./gradlew compileJmhJava
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would create a different Makefile target for the benchmarks. This way, we can decouple benchmarks from compilation in CircleCI

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree


.PHONY: init-git-submodules
init-git-submodules:
git submodule init
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ subprojects {
it.options.errorprone.excludedPaths = ".*generated.*" // "-XepExcludedPaths:.*/build/generated/source/proto/.*"

// Enforce errorprone warnings to be errors.
if (!JavaVersion.current().isJava9() && !JavaVersion.current().isJava10() && !JavaVersion.current().isJava11()) {
if (!JavaVersion.current().isJava9() && !JavaVersion.current().isJava10() && !JavaVersion.current().isJava11() && it != compileJmhJava) {
// TODO: Enable -Werror for Java 9+
it.options.compilerArgs += ["-Werror"]
}
Expand Down