-
Notifications
You must be signed in to change notification settings - Fork 1.6k
111 lines (109 loc) · 4 KB
/
examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: examples
permissions: read-all
on: [ push, pull_request ]
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
JAVA_VERSION: 21
jobs:
examples:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
api.adoptium.net:443
caffeine.gradle-enterprise.cloud:443
download.oracle.com:443
downloads.gradle.org:443
downloads.gradle-dn.com:443
gds.oracle.com:443
github.com:443
jcenter.bintray.com:443
objects.githubusercontent.com:443
plugins.gradle.org:443
plugins-artifacts.gradle.org:443
repo.maven.apache.org:443
repo1.maven.org:443
services.gradle.org:443
www.graalvm.org:443
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
with:
add-job-summary: never
cache-read-only: false
- name: Simulator
run: >
./gradlew simulator:run
-Dcaffeine.simulator.report.output=$(pwd)/simulation.md
-Dcaffeine.simulator.files.paths.0="corda:trace_vaultservice.gz"
-Dcaffeine.simulator.files.paths.1="lirs:loop.trace.gz"
-Dcaffeine.simulator.files.paths.2="corda:trace_vaultservice.gz"
- name: Publish Simulator Results
run: |
{
echo '### Adaptivity'
echo '```'
cat $(pwd)/simulation.md
echo '```'
} >> $GITHUB_STEP_SUMMARY
- name: Chart Simulation
run: ./gradlew -q simulator:simulate --maximumSize=100,200,300
- name: Memory Overhead
run: ./gradlew -q caffeine:memoryOverhead
- name: Stresser (read)
run: >
timeout 1m ./gradlew -q caffeine:stress --workload=read
|| ([[ $? -eq 124 ]] && echo "Timeout reached, but that's OK")
- name: Stresser (write)
run: >
timeout 1m ./gradlew -q caffeine:stress --workload=write
|| ([[ $? -eq 124 ]] && echo "Timeout reached, but that's OK")
- name: Stresser (refresh)
run: >
timeout 1m ./gradlew -q caffeine:stress --workload=refresh
|| ([[ $? -eq 124 ]] && echo "Timeout reached, but that's OK")
- name: Write-behind (rxjava)
working-directory: examples/write-behind-rxjava
run: ./gradlew build
- name: Coalescing Bulkloader (reactor)
working-directory: examples/coalescing-bulkloader-reactor
run: ./gradlew build
- name: Hibernate (jcache)
working-directory: examples/hibernate
run: ./gradlew build
- name: Indexable
working-directory: examples/indexable
run: ./gradlew build
- name: Resilience (failsafe)
working-directory: examples/resilience-failsafe
run: ./gradlew build
- name: Prepare for Graal Native Image
uses: ./.github/actions/run-gradle
env:
SNAPSHOT: true
with:
java: GraalVM
token: ${{ secrets.GITHUB_TOKEN }}
arguments: -q caffeine:clean caffeine:jar
- name: Graal Native Image
uses: ./.github/actions/run-gradle
env:
SNAPSHOT: true
with:
java: GraalVM
token: ${{ secrets.GITHUB_TOKEN }}
arguments: >
--project-dir examples/graal-native
-Pagent run
metadataCopy --task run --dir src/main/resources/META-INF/native-image
nativeRun nativeTest