-
-
Notifications
You must be signed in to change notification settings - Fork 285
88 lines (78 loc) · 2.35 KB
/
test.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
SCALA_VERSION: ${{matrix.scala}}
strategy:
matrix:
scala: [2_12, 2_13, 3]
script: [e2e, test]
include:
- scala: 2_12
script: examples_and_formatting
- scala: 2_13
script: scala3_compat_test
- scala: 3
script: scala3_compat_test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
- name: Mount caches
uses: actions/cache@v4
with:
path: |
~/.sbt
~/.ivy2/cache
~/.cache/coursier
key: ${{ runner.os }}-sbt-${{matrix.scala}}-${{matrix.script}}-${{ hashFiles('**/*.sbt') }}
- name: ${{matrix.script}}
run: |
./${{matrix.script}}.sh
env:
JAVA_OPTS: -Xmx4G -XX:+UseG1GC
JVM_OPTS: -Xmx4G -XX:+UseG1GC
conformance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: conformance-cache
with:
key: conformance-${{ runner.os }}-${{hashFiles('conformance/build_test_runner.sh')}}
path: /tmp/conformance-test-runner
# Build conformance_test_runner on a cache miss
- uses: bazelbuild/setup-bazelisk@v3
if: steps.conformance-cache.outputs.cache-hit != 'true'
- uses: actions/cache@v4
if: steps.conformance-cache.outputs.cache-hit != 'true'
with:
path: |
~/.cache/bazel
key: bazel
- run: conformance/build_test_runner.sh
if: steps.conformance-cache.outputs.cache-hit != 'true'
- uses: actions/cache@v4
with:
path: |
~/.sbt
~/.ivy2/cache
~/.cache/coursier
key: ${{ runner.os }}-sbt-${{matrix.scala}}-${{matrix.script}}-${{ hashFiles('**/*.sbt') }}
- run: |
sbt conformanceJVM2_13/assembly
/tmp/conformance-test-runner/conformance_test_runner --enforce_recommended \
--failure_list conformance/failure_list_scalapb.txt \
--text_format_failure_list conformance/text_format_failure_list_scalapb.txt \
conformance/target/jvm-2.13/conformance
shell: bash
# Single final job for mergify.
ci-passed:
runs-on: ubuntu-latest
needs: [build, conformance]
steps:
- run: ':'