-
Notifications
You must be signed in to change notification settings - Fork 94
129 lines (116 loc) · 3.44 KB
/
ci.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Jandex
on:
push:
branches:
- main
paths-ignore:
- '.gitattributes'
- '.gitignore'
- 'LICENSE.txt'
- 'README.md'
pull_request:
paths-ignore:
- '.gitattributes'
- '.gitignore'
- 'LICENSE.txt'
- 'README.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
java:
# we want: all LTS versions (that we care about), latest GA, upcoming
- 8
- 11
- 17
- 21
- 22-ea
compiler:
- javac
- ecj
parameters:
- true
- false
os:
- ubuntu-latest
- windows-latest
exclude:
- java: 8
compiler: ecj
runs-on: ${{ matrix.os }}
name: "JDK ${{ matrix.java }}, ${{ matrix.compiler}}, params: ${{ matrix.parameters }}, ${{ matrix.os }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.7
- name: Build with Maven
shell: bash
run: mvn -s .github/maven-ci-settings.xml -B verify --file pom.xml -Dcompiler=${{ matrix.compiler }} -Dparameters=${{ matrix.parameters }}
calcite-regression:
strategy:
matrix:
# javac 8 and 11 might produce slightly different bytecode
java:
- 8
- 11
- 17
runs-on: ubuntu-latest
name: 'Calcite regression test (JDK ${{ matrix.java }})'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 50
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.7
- name: Build with Maven
run: |
# Set 1.0.0-dev version to ensure it will be used when building Calcite later
mvn -s .github/maven-ci-settings.xml -B versions:set -DnewVersion=1.0.0-dev-SNAPSHOT
mvn -s .github/maven-ci-settings.xml -B versions:commit
mvn -s .github/maven-ci-settings.xml -B install -DskipTests --file pom.xml
- name: Clone Calcite
run: |
git clone --branch main --depth 100 https://github.com/apache/calcite.git ../calcite
echo 'allprojects { plugins.withType<JavaPlugin> { dependencies { "jandexClasspath"("io.smallrye:jandex:1.0.0-dev-SNAPSHOT") } } }' >> ../calcite/build.gradle.kts
- name: Verify Calcite bytecode
uses: burrunan/gradle-cache-action@feb985ecf49f57f54f31920821a50d0394faf122
with:
job-id: calcite-jdk${{ matrix.java-version }}
build-root-directory: ../calcite
arguments: --scan --no-parallel --no-daemon --continue jandex
properties: |
enableMavenLocal=true
jandex.version=1.0.0-dev-SNAPSHOT
skipJandex=false
maven-local-ignore-paths: |
org/jboss/jandex/
io/smallrye/jandex/
- name: Prepare failure archive (if run failed)
if: failure()
shell: bash
run: |
pwd
tar -czf calcite-work.tgz ../calcite
- name: Upload failure archive (if run failed)
uses: actions/upload-artifact@v3
if: failure()
with:
name: calcite-work
path: calcite-work.tgz