fixes format #364
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Branches Java CI | |
on: | |
# Trigger the workflow on push | |
# but only for the non master/1.0.x branches | |
push: | |
branches-ignore: | |
- 1.1.x | |
- master | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
jdk: [ 1.8, 11, 17 ] | |
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 -x test --no-daemon | |
coretest: | |
needs: [build] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
jdk: [ 1.8, 11, 17 ] | |
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 rsocket-core:test --no-daemon | |
othertest: | |
needs: [build] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
jdk: [ 1.8, 11, 17 ] | |
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 test -x :rsocket-core:test --no-daemon | |
jcstress: | |
needs: [build] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
jdk: [ 1.8, 11, 17 ] | |
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 jcstress --no-daemon | |
publish: | |
needs: [ build, coretest, othertest, jcstress ] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
jdk: [ 1.8, 11, 17 ] | |
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: Publish Packages to Artifactory | |
if: ${{ matrix.jdk == '1.8' }} | |
run: | | |
githubRef="${githubRef#refs/heads/}" | |
githubRef="${githubRef////-}" | |
./gradlew -PversionSuffix="-${githubRef}-SNAPSHOT" -PbuildNumber="${buildNumber}" publishMavenPublicationToGitHubPackagesRepository --no-daemon --stacktrace | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
githubRef: ${{ github.ref }} | |
buildNumber: ${{ github.run_number }} |