From 817b1102a51e7aae19c86e4a81ac709145b4799e Mon Sep 17 00:00:00 2001 From: Max Lambrecht Date: Sat, 19 Jun 2021 15:55:19 -0300 Subject: [PATCH] Add Github Actions. Upgrade gradle to 7.1. Update Lombok dependency. Signed-off-by: Max Lambrecht --- .github/workflows/gradle.yml | 74 ++++++++++++++++++++++++ .travis.yml | 38 ------------ build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 76 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/gradle.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..bf79e8b --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,74 @@ +name: continuous-integration + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build-on-linux-jdk16: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 16 + uses: actions/setup-java@v2 + with: + java-version: '16 ' + distribution: 'adopt' + - name: Cache Gradle packages + uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build with Gradle and generate the artifacts + run: ./gradlew assemble test + - uses: actions/upload-artifact@v2 + with: + name: Package + path: build/libs + + build-on-linux-jdk11: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Gradle + run: ./gradlew build + + build-on-linux-jdk8: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + - name: Build with Gradle + run: ./gradlew build + + build-on-macos-jdk11: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: '11' + distribution: 'adopt' + - name: Build with Gradle + run: ./gradlew build diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0effcd0..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: java - -os: - - linux - - osx - -jdk: - - openjdk15 - - openjdk11 - -matrix: - include: - - os: linux - jdk: openjdk8 - -after_success: - - ./gradlew jacocoTestReport coveralls - -before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ - -cache: - directories: - - "$HOME/.gradle/caches/" - - "$HOME/.gradle/wrapper/" - -deploy: - - provider: releases - api_key: $GITHUB_TOKEN - file_glob: true - file: "build/libs/*" - skip_cleanup: true - on: - tags: true - condition: $GITHUB_TOKEN != "" - os: linux - jdk: openjdk15 diff --git a/build.gradle b/build.gradle index 64bb1d8..20562a8 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ subprojects { grpcVersion = '1.37.0' jupiterVersion = '5.7.0' mockitoVersion = '3.5.15' - lombokVersion = '1.18.16' + lombokVersion = '1.18.20' nimbusVersion = '9.8.1' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0b61b35..2ea9e00 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip