From 739fe3475ab4c5408e920dbff57104b632013e53 Mon Sep 17 00:00:00 2001 From: Harold Dost Date: Thu, 23 Dec 2021 00:25:08 +0100 Subject: [PATCH] chore: Convert from CircleCI to Github Actions * Also add builds for Java 11 and Java 17 Fixes #743 Relates #658 Signed-off-by: Harold Dost --- .circleci/config.yml | 20 ------------------ .github/workflows/pr-build.yml | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 20 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/pr-build.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index bc7849e68..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 2 -machine: true -jobs: - build: - machine: - image: ubuntu-2004:202010-01 - working_directory: ~/circleci-java - steps: - - checkout - - restore_cache: - key: maven-dependencies-{{ checksum "pom.xml" }} - - run: java -version - - run: ./mvnw clean install - - run: ./mvnw javadoc:jar - - save_cache: - paths: - - ~/.m2 - key: maven-dependencies-{{ checksum "pom.xml" }} -orbs: - prometheus: prometheus/prometheus@0.15.0 diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml new file mode 100644 index 000000000..6dbdf15fd --- /dev/null +++ b/.github/workflows/pr-build.yml @@ -0,0 +1,37 @@ +name: "PR Build" +on: + pull_request: + branches: + - master + - main + +jobs: + build: + name: Build + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + java-version: + - 8 + - 11 + - 17 + include: + - os: ubuntu-20.04 + test-java-version: 11 + coverage: true + steps: + - uses: actions/checkout@v2.4.0 + with: + fetch-depth: 0 + - name: Restore the cache + uses: actions/cache@v2 + with: + path: ~/.m2 + key: maven-dependencies-${{ hashFiles("pom.xml") }}-${{ matrix.java-version }} + - name: Build ${{ matrix.java-version }} + run: | + java -version + ./mvnw clean install + - name: Build Java Doc ${{ matrix.java-version }} + run: ./mvnw javadoc:jar