-
Notifications
You must be signed in to change notification settings - Fork 1.5k
114 lines (111 loc) · 3.98 KB
/
continuous-integration.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
112
113
114
name: continuous integration
env:
JAVA_OPTS: "-Dsbt.log.noformat=true"
TRAVIS: "true" # pretend we're TravisCI
SBT_VERSION: 1.7.1
BUILD_VERSION: "v1" # bump this if builds are failing due to a bad cache
defaults:
run:
shell: bash
on:
push:
branches:
- develop
- release
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
scala: [2.12.12, 2.13.6]
java: ['1.8', '1.11']
project: ['finagle-base-http', 'finagle-benchmark', 'finagle-benchmark-thrift', 'finagle-core', 'finagle-example', 'finagle-exp', 'finagle-grpc-context', 'finagle-http', 'finagle-http2','finagle-init','finagle-integration','finagle-memcached','finagle-mux','finagle-mysql','finagle-netty4','finagle-netty4-http','finagle-opencensus-tracing','finagle-partitioning','finagle-redis','finagle-scribe','finagle-serversets','finagle-stats','finagle-stats-core','finagle-thrift','finagle-thriftmux','finagle-toggle','finagle-tunable','finagle-zipkin-core','finagle-zipkin-scribe']
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: echo java version
run: java -Xmx32m -version
- name: echo javac version
run: javac -J-Xmx32m -version
- name: cache build dependencies
uses: actions/cache@v2
env:
cache-name: cache-build-deps
with:
path: |
~/.dodo
~/.ivy2/cache
~/.ivy2/local/com.twitter
~/.sbt
key: ${{ runner.os }}-build-${{ env.BUILD_VERSION }}-${{ env.cache-name }}-${{ env.SBT_VERSION }}-${{ matrix.scala }}-${{ matrix.java }}
- name: update cache
run: |
if [ -f ~/.ivy2/cache ]; then
find ~/.ivy2/cache -name "ivydata-*.properties" -delete
fi
if [ -f ~/.sbt ]; then
find ~/.sbt -name "*.lock" -delete
fi
- name: build dependencies
uses: twitter/dodo-build@v3
with:
branch: develop
project: finagle
no-test: true
publish-m2: true
verbose: true
- name: test
run: ${{ format('./sbt ++{0} clean "{1}/test"', matrix.scala, matrix.project) }}
build-with-netty-snapshot:
strategy:
fail-fast: false
matrix:
scala: [2.12.12, 2.13.6]
java: ['1.8', '1.11']
project: ['finagle-base-http','finagle-core','finagle-http','finagle-http2','finagle-integration','finagle-mux','finagle-mysql','finagle-netty4','finagle-netty4-http','finagle-thriftmux']
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: echo java version
run: java -Xmx32m -version
- name: echo javac version
run: javac -J-Xmx32m -version
- name: cache build dependencies
uses: actions/cache@v2
env:
cache-name: cache-build-deps
with:
path: |
~/.dodo
~/.ivy2/cache
~/.ivy2/local/com.twitter
~/.sbt
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.SBT_VERSION }}-${{ matrix.scala }}-${{ matrix.java }}
- name: update cache
run: |
if [ -f ~/.ivy2/cache ]; then
find ~/.ivy2/cache -name "ivydata-*.properties" -delete
fi
if [ -f ~/.sbt ]; then
find ~/.sbt -name "*.lock" -delete
fi
- name: build dependencies
uses: twitter/dodo-build@v3
with:
branch: develop
project: finagle
no-test: true
publish-m2: true
verbose: true
- name: set up netty snapshot
run: source ./netty-snapshot-env.sh
- name: test
run: ${{ format('./sbt ++{0} clean "{1}/test"', matrix.scala, matrix.project) }}