-
Notifications
You must be signed in to change notification settings - Fork 14
169 lines (169 loc) · 5.02 KB
/
ci.yaml
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: CI
on:
pull_request:
branches:
- '*'
push:
branches:
- master
jobs:
format:
name: Format
runs-on: ubuntu-22.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v13
with:
java-version: openjdk@1.17
- name: Cache
uses: actions/cache@v3
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Check with Scalafmt
run: sbt ++2.13.14 fmtCheck
build-bench:
name: Compile benchmarks
needs: format
runs-on: ubuntu-22.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v13
with:
java-version: openjdk@1.17
- name: Cache
uses: actions/cache@v3
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Compile benchmarks
run: sbt ++2.13.14 benchBuild
build:
name: Test
needs: format
strategy:
matrix:
scala:
- 2.12.19
- 2.13.14
java:
- openjdk@1.11
- openjdk@1.17
os:
- ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v13
with:
java-version: ${{ matrix.java }}
- name: Cache
uses: actions/cache@v3
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Run redis and KeyDb in containers
run: |
docker run -p 6379:6379 -d redis:alpine
docker run -p 6380:6379 -d eqalpha/keydb
- name: Test (${{ matrix.scala }}, ${{ matrix.java }})
run: SBT_OPTS="-Xms4096M -Xmx4096M -XX:MaxMetaspaceSize=2048M" sbt ++${{matrix.scala}} fullTest
publish_212:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Publish Snapshot 2.12
needs: [ build, build-bench ]
runs-on: ubuntu-22.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v13
with:
java-version: openjdk@1.17
- name: Cache
uses: actions/cache@v3
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Publish Snapshot for Scala 2.12
run: CI_SNAPSHOT_RELEASE=publish sbt ++2.12.19 releaseIt
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
publish_213:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Publish Snapshot 2.13
needs: publish_212
runs-on: ubuntu-22.04
steps:
- name: Branch Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Java And Sbt
uses: olafurpg/setup-scala@v13
with:
java-version: openjdk@1.17
- name: Cache
uses: actions/cache@v3
with:
path: |
$HOME/.cache/coursier
$HOME/.ivy2/cache
$HOME/.sbt/boot/
$HOME/.sbt
lib_managed
target
project/target
key: ${{ runner.os }}-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Publish Snapshot for Scala 2.13
run: CI_SNAPSHOT_RELEASE=publish sbt ++2.13.14 releaseIt
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}