Skip to content

Commit

Permalink
migrates from travis
Browse files Browse the repository at this point in the history
Signed-off-by: Oleh Dokuka <[email protected]>
Signed-off-by: Oleh Dokuka <[email protected]>
  • Loading branch information
OlegDokuka committed May 19, 2021
1 parent b828b84 commit 52a60e9
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 89 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/gradle-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Branches Java CI

on:
# Trigger the workflow on push
# but only for the non master/1.0.x branches
push:
branches-ignore:
- 1.0.x
- master

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
jdk: [ 1.8, 11, 14 ]
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
- name: Publish Packages to Artifactory
if: ${{ matrix.jdk == '1.8' }}
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PversionSuffix="-${githubRef#refs/heads/}-SNAPSHOT" -PbuildNumber="${buildNumber}" artifactoryPublish --stacktrace
env:
bintrayUser: ${{ secrets.bintrayUser }}
bintrayKey: ${{ secrets.bintrayKey }}
githubRef: ${{ github.ref }}
buildNumber: ${{ github.run_number }}
53 changes: 53 additions & 0 deletions .github/workflows/gradle-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Main Branches Java CI

on:
# Trigger the workflow on push
# but only for the master/1.0.x branch
push:
branches:
- master
- 1.0.x

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
jdk: [ 1.8, 11, 14 ]
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
- name: Publish Packages to Artifactory
if: ${{ matrix.jdk == '1.8' }}
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PversionSuffix="-SNAPSHOT" -PbuildNumber="${buildNumber}" artifactoryPublish --stacktrace
env:
bintrayUser: ${{ secrets.bintrayUser }}
bintrayKey: ${{ secrets.bintrayKey }}
buildNumber: ${{ github.run_number }}
- name: Aggregate test reports with ciMate
if: always()
continue-on-error: true
env:
CIMATE_PROJECT_ID: m84qx17y
run: |
wget -q https://get.cimate.io/release/linux/cimate
chmod +x cimate
./cimate "**/TEST-*.xml"
31 changes: 31 additions & 0 deletions .github/workflows/gradle-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pull Request Java CI

on: [pull_request]

jobs:
build:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
jdk: [ 1.8, 11, 14 ]
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
44 changes: 44 additions & 0 deletions .github/workflows/gradle-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release Java CI

on:
# Trigger the workflow on push
push:
# Sequence of patterns matched against refs/tags
tags:
- '*' # Push events to matching *, i.e. 1.0, 20.15.10

jobs:
publish:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
- name: Publish Packages to Bintray
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" -Pversion="${githubRef#refs/tags/}" -PbuildNumber="${buildNumber}" bintrayUpload
env:
bintrayUser: ${{ secrets.bintrayUser }}
bintrayKey: ${{ secrets.bintrayKey }}
sonatypeUsername: ${{ secrets.sonatypeUsername }}
sonatypePassword: ${{ secrets.sonatypePassword }}
githubRef: ${{ github.ref }}
buildNumber: ${{ github.run_number }}
45 changes: 0 additions & 45 deletions .travis.yml

This file was deleted.

44 changes: 0 additions & 44 deletions ci/travis.sh

This file was deleted.

0 comments on commit 52a60e9

Please sign in to comment.