forked from smallrye/jandex
-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (68 loc) · 2.38 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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Jandex CI
on:
[push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java-version: [8, 11]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java.name }}
# Uses sha for added security since tags can be updated
uses: joschi/setup-jdk@ccd4eb6437f6a33d3c033551a6004cc6f3078307
with:
java-version: ${{ matrix.java-version }}
- name: Build with Maven
run: mvn -B package --file pom.xml
calcite-regression:
name: 'regression: Calcite, Java ${{ matrix.java-version }}'
runs-on: ubuntu-latest
strategy:
matrix:
# javac 8 and 11 might produce slightly different bytecode
java-version: [8, 11]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- name: 'Set up JDK 11'
# Uses sha for added security since tags can be updated
uses: joschi/setup-jdk@ccd4eb6437f6a33d3c033551a6004cc6f3078307
with:
java-version: ${{ matrix.java-version }}
- name: Build with Maven
run: |
# Set 1.0.0-dev version to ensure it will be used when building Calcite later
mvn -B versions:set -DnewVersion=1.0.0-dev-SNAPSHOT
mvn -B versions:commit
mvn -B install -DskipTests --file pom.xml
- name: 'Clone Calcite'
run: |
git clone --branch master --depth 100 https://github.com/apache/calcite.git ../calcite
- 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
- 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@v1
if: failure()
with:
name: calcite-work
path: calcite-work.tgz