From 13a9ceb0a1b779af6db5f46b7580d0b034289733 Mon Sep 17 00:00:00 2001 From: Ryan Fitzpatrick Date: Fri, 21 Aug 2020 14:40:55 -0400 Subject: [PATCH] Add CircleCI (#3) Add an initial CircleCI config and additional make assemble and test targets for its use. --- .circleci/config.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++ Makefile | 8 +++++++ README.md | 1 + 3 files changed, 62 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..cc527416 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,53 @@ +# Java Gradle CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-java/ for more details +# +version: 2 +jobs: + build: + docker: + - image: circleci/openjdk:8-jdk + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/postgres:9.4 + + working_directory: ~/repo + + environment: + # Customize the JVM maximum heap limit + JVM_OPTS: -Xmx1g + GRADLE_OPTS: "-Dorg.gradle.workers.max=4" + TERM: dumb + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - gradle-{{ checksum "build.gradle" }} + # fallback to using the latest cache if no exact match is found + - gradle- + + - run: + name: Assemble + command: make assemble + + - save_cache: + paths: + - ~/.gradle + key: gradle-{{ checksum "build.gradle" }} + + - run: + name: Tests + command: make test + + - run: + name: Lint check + command: make check + + - run: + name: Build validation + command: make build diff --git a/Makefile b/Makefile index 5276da2b..a6ea71f7 100644 --- a/Makefile +++ b/Makefile @@ -15,3 +15,11 @@ check: .PHONY: clean clean: ./gradlew clean + +.PHONY: assemble +assemble: + ./gradlew assemble + +.PHONY: test +test: + ./gradlew test diff --git a/README.md b/README.md index 1b1a12cd..37dbfced 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # OpenTelemetry Java Contrib +[![Build status](https://img.shields.io/circleci/build/github/open-telemetry/opentelemetry-java-contrib?style=for-the-badge)](https://app.circleci.com/pipelines/github/open-telemetry/opentelemetry-java-contrib?branch=master) This project is intended to provide helpful libraries and standalone OpenTelemetry-based utilities that don't fit the express scope of the [OpenTelemetry Java](https://github.com/open-telemetry/opentelemetry-java) or