Skip to content

Commit 3d40d64

Browse files
committed
adds jcstress support
Signed-off-by: Oleh Dokuka <[email protected]>
1 parent 20e6b5f commit 3d40d64

File tree

8 files changed

+520
-11
lines changed

8 files changed

+520
-11
lines changed

.github/workflows/gradle-all.yml

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,39 @@ on:
1010

1111
jobs:
1212
build:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ ubuntu-latest ]
18+
jdk: [ 1.8, 11, 16 ]
19+
fail-fast: false
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up JDK ${{ matrix.jdk }}
24+
uses: actions/setup-java@v1
25+
with:
26+
java-version: ${{ matrix.jdk }}
27+
- name: Cache Gradle packages
28+
uses: actions/cache@v1
29+
with:
30+
path: ~/.gradle/caches
31+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
32+
restore-keys: ${{ runner.os }}-gradle
33+
- name: Grant execute permission for gradlew
34+
run: chmod +x gradlew
35+
- name: Build with Gradle
36+
run: ./gradlew clean build -x test --no-daemon
1337

38+
check:
39+
needs: [build]
1440
runs-on: ${{ matrix.os }}
1541

1642
strategy:
1743
matrix:
1844
os: [ ubuntu-latest ]
19-
jdk: [ 1.8, 11, 14 ]
45+
jdk: [ 1.8, 11, 16 ]
2046
fail-fast: false
2147

2248
steps:
@@ -34,10 +60,62 @@ jobs:
3460
- name: Grant execute permission for gradlew
3561
run: chmod +x gradlew
3662
- name: Build with Gradle
37-
run: ./gradlew clean build
63+
run: ./gradlew check --no-daemon
64+
65+
jcstress:
66+
needs: [build]
67+
runs-on: ${{ matrix.os }}
68+
69+
strategy:
70+
matrix:
71+
os: [ ubuntu-latest ]
72+
jdk: [ 1.8, 11, 16 ]
73+
fail-fast: false
74+
75+
steps:
76+
- uses: actions/checkout@v2
77+
- name: Set up JDK ${{ matrix.jdk }}
78+
uses: actions/setup-java@v1
79+
with:
80+
java-version: ${{ matrix.jdk }}
81+
- name: Cache Gradle packages
82+
uses: actions/cache@v1
83+
with:
84+
path: ~/.gradle/caches
85+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
86+
restore-keys: ${{ runner.os }}-gradle
87+
- name: Grant execute permission for gradlew
88+
run: chmod +x gradlew
89+
- name: Build with Gradle
90+
run: ./gradlew jcstress --no-daemon
91+
92+
publish:
93+
needs: [ build, check, jcstress ]
94+
runs-on: ${{ matrix.os }}
95+
96+
strategy:
97+
matrix:
98+
os: [ ubuntu-latest ]
99+
jdk: [ 1.8, 11, 16 ]
100+
fail-fast: false
101+
102+
steps:
103+
- uses: actions/checkout@v2
104+
- name: Set up JDK ${{ matrix.jdk }}
105+
uses: actions/setup-java@v1
106+
with:
107+
java-version: ${{ matrix.jdk }}
108+
- name: Cache Gradle packages
109+
uses: actions/cache@v1
110+
with:
111+
path: ~/.gradle/caches
112+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
113+
restore-keys: ${{ runner.os }}-gradle
114+
- name: Grant execute permission for gradlew
115+
run: chmod +x gradlew
38116
- name: Publish Packages to Artifactory
39117
if: ${{ matrix.jdk == '1.8' }}
40-
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PversionSuffix="-${githubRef#refs/heads/}-SNAPSHOT" -PbuildNumber="${buildNumber}" artifactoryPublish --stacktrace
118+
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PversionSuffix="-${githubRef#refs/heads/}-SNAPSHOT" -PbuildNumber="${buildNumber}" artifactoryPublish --no-daemon --stacktrace
41119
env:
42120
bintrayUser: ${{ secrets.bintrayUser }}
43121
bintrayKey: ${{ secrets.bintrayKey }}

.github/workflows/gradle-main.yml

Lines changed: 81 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,39 @@ on:
1010

1111
jobs:
1212
build:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ ubuntu-latest ]
18+
jdk: [ 1.8, 11, 16 ]
19+
fail-fast: false
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Set up JDK ${{ matrix.jdk }}
24+
uses: actions/setup-java@v1
25+
with:
26+
java-version: ${{ matrix.jdk }}
27+
- name: Cache Gradle packages
28+
uses: actions/cache@v1
29+
with:
30+
path: ~/.gradle/caches
31+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
32+
restore-keys: ${{ runner.os }}-gradle
33+
- name: Grant execute permission for gradlew
34+
run: chmod +x gradlew
35+
- name: Build with Gradle
36+
run: ./gradlew clean build -x test --no-daemon
1337

38+
test:
39+
needs: [build]
1440
runs-on: ${{ matrix.os }}
1541

1642
strategy:
1743
matrix:
1844
os: [ ubuntu-latest ]
19-
jdk: [ 1.8, 11, 14 ]
45+
jdk: [ 1.8, 11, 16 ]
2046
fail-fast: false
2147

2248
steps:
@@ -34,10 +60,62 @@ jobs:
3460
- name: Grant execute permission for gradlew
3561
run: chmod +x gradlew
3662
- name: Build with Gradle
37-
run: ./gradlew clean build
63+
run: ./gradlew test --no-daemon
64+
65+
jcstress:
66+
needs: [build]
67+
runs-on: ${{ matrix.os }}
68+
69+
strategy:
70+
matrix:
71+
os: [ ubuntu-latest ]
72+
jdk: [ 1.8, 11, 16 ]
73+
fail-fast: false
74+
75+
steps:
76+
- uses: actions/checkout@v2
77+
- name: Set up JDK ${{ matrix.jdk }}
78+
uses: actions/setup-java@v1
79+
with:
80+
java-version: ${{ matrix.jdk }}
81+
- name: Cache Gradle packages
82+
uses: actions/cache@v1
83+
with:
84+
path: ~/.gradle/caches
85+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
86+
restore-keys: ${{ runner.os }}-gradle
87+
- name: Grant execute permission for gradlew
88+
run: chmod +x gradlew
89+
- name: Build with Gradle
90+
run: ./gradlew jcstress --no-daemon
91+
92+
publish:
93+
needs: [ build, check, jcstress ]
94+
runs-on: ${{ matrix.os }}
95+
96+
strategy:
97+
matrix:
98+
os: [ ubuntu-latest ]
99+
jdk: [ 1.8, 11, 16 ]
100+
fail-fast: false
101+
102+
steps:
103+
- uses: actions/checkout@v2
104+
- name: Set up JDK ${{ matrix.jdk }}
105+
uses: actions/setup-java@v1
106+
with:
107+
java-version: ${{ matrix.jdk }}
108+
- name: Cache Gradle packages
109+
uses: actions/cache@v1
110+
with:
111+
path: ~/.gradle/caches
112+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
113+
restore-keys: ${{ runner.os }}-gradle
114+
- name: Grant execute permission for gradlew
115+
run: chmod +x gradlew
38116
- name: Publish Packages to Artifactory
39117
if: ${{ matrix.jdk == '1.8' }}
40-
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PversionSuffix="-SNAPSHOT" -PbuildNumber="${buildNumber}" artifactoryPublish --stacktrace
118+
run: ./gradlew -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PversionSuffix="-SNAPSHOT" -PbuildNumber="${buildNumber}" artifactoryPublish --no-daemon --stacktrace
41119
env:
42120
bintrayUser: ${{ secrets.bintrayUser }}
43121
bintrayKey: ${{ secrets.bintrayKey }}

.github/workflows/gradle-pr.yml

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,66 @@ on: [pull_request]
44

55
jobs:
66
build:
7+
runs-on: ${{ matrix.os }}
8+
9+
strategy:
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
jdk: [ 1.8, 11, 16 ]
13+
fail-fast: false
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK ${{ matrix.jdk }}
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: ${{ matrix.jdk }}
21+
- name: Cache Gradle packages
22+
uses: actions/cache@v1
23+
with:
24+
path: ~/.gradle/caches
25+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
26+
restore-keys: ${{ runner.os }}-gradle
27+
- name: Grant execute permission for gradlew
28+
run: chmod +x gradlew
29+
- name: Build with Gradle
30+
run: ./gradlew clean build -x test --no-daemon
31+
32+
test:
33+
needs: [build]
34+
runs-on: ${{ matrix.os }}
35+
36+
strategy:
37+
matrix:
38+
os: [ ubuntu-latest ]
39+
jdk: [ 1.8, 11, 16 ]
40+
fail-fast: false
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
- name: Set up JDK ${{ matrix.jdk }}
45+
uses: actions/setup-java@v1
46+
with:
47+
java-version: ${{ matrix.jdk }}
48+
- name: Cache Gradle packages
49+
uses: actions/cache@v1
50+
with:
51+
path: ~/.gradle/caches
52+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
53+
restore-keys: ${{ runner.os }}-gradle
54+
- name: Grant execute permission for gradlew
55+
run: chmod +x gradlew
56+
- name: Build with Gradle
57+
run: ./gradlew test --no-daemon
758

59+
jcstress:
60+
needs: [build]
861
runs-on: ${{ matrix.os }}
962

1063
strategy:
1164
matrix:
1265
os: [ ubuntu-latest ]
13-
jdk: [ 1.8, 11, 14 ]
66+
jdk: [ 1.8, 11, 16 ]
1467
fail-fast: false
1568

1669
steps:
@@ -28,4 +81,4 @@ jobs:
2881
- name: Grant execute permission for gradlew
2982
run: chmod +x gradlew
3083
- name: Build with Gradle
31-
run: ./gradlew clean build
84+
run: ./gradlew jcstress --no-daemon

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
*/
1616

1717
plugins {
18-
id 'com.github.sherter.google-java-format' version '0.8' apply false
18+
id 'com.github.sherter.google-java-format' version '0.9' apply false
1919
id 'com.jfrog.artifactory' version '4.15.2' apply false
2020
id 'com.jfrog.bintray' version '1.8.5' apply false
21-
id 'me.champeau.gradle.jmh' version '0.5.0' apply false
22-
id 'io.spring.dependency-management' version '1.0.9.RELEASE' apply false
21+
id 'me.champeau.gradle.jmh' version '0.5.3' apply false
22+
id 'io.spring.dependency-management' version '1.0.11.RELEASE' apply false
2323
id 'io.morethan.jmhreport' version '0.9.0' apply false
24+
id "io.github.reyerizo.gradle.jcstress" version "0.8.11" apply false
2425
}
2526

2627
boolean isCiServer = ["CI", "CONTINUOUS_INTEGRATION", "TRAVIS", "CIRCLECI", "bamboo_planKey", "GITHUB_ACTION"].with {

rsocket-core/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ plugins {
2121
id 'com.jfrog.bintray'
2222
id 'io.morethan.jmhreport'
2323
id 'me.champeau.gradle.jmh'
24+
id 'io.github.reyerizo.gradle.jcstress'
2425
}
2526

2627
dependencies {
@@ -43,6 +44,13 @@ dependencies {
4344
testCompileOnly 'junit:junit'
4445
testImplementation 'org.hamcrest:hamcrest-library'
4546
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
47+
48+
jcstressImplementation "ch.qos.logback:logback-classic"
49+
}
50+
51+
jcstress {
52+
mode = 'default' //quick, default, tough
53+
jcstressDependency = "org.openjdk.jcstress:jcstress-core:0.7"
4654
}
4755

4856
jar {

0 commit comments

Comments
 (0)