From fec4a3ee9e9336f63a50e1dac0b67aed83863410 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 * Replaces existing build ** Didn't enable other builds as there are currently failures. Fixes #743 Relates #658 Signed-off-by: Harold Dost --- .circleci/config.yml | 20 ----------------- .github/workflows/pr-build.yml | 39 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 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..1529f8f30 --- /dev/null +++ b/.github/workflows/pr-build.yml @@ -0,0 +1,39 @@ +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: + - 11 + # - 17 Until Java 6 is not targeted this won't work + java-distribution: + # - adopt-openj9 For now building was already exists + - temurin # OpenJDK + steps: + - uses: actions/checkout@v2.4.0 + with: + fetch-depth: 0 + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '${{ matrix.java-version }}' + distribution: '${{ matrix.java-distribution }}' + - name: Caching + uses: actions/cache@v2 + with: + path: ~/.m2 + key: maven-${{ hashFiles('**/pom.xml') }}-${{ matrix.java-version }}-${{ matrix.java-distribution }} + - name: Build + run: | + java -version + ./mvnw clean install + - name: Build Java Doc + run: ./mvnw javadoc:jar