forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 1
94 lines (85 loc) · 2.94 KB
/
check-supported-versions.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
name: Check Supported Java Versions
on:
push:
branches:
- master
jobs:
build:
name: 'Build: JDK ${{ matrix.java }} (${{ matrix.os }})'
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [8, 11]
os: [ubuntu-latest]
include:
- java: 8
os: windows-latest
- java: 13
os: ubuntu-latest
# Need to update to Gradle version with v13 support in modules/openapi-generator-gradle-plugin/pom.xml
flags: -am -pl modules/openapi-generator-cli
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml', 'modules/**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('modules/openapi-generator-gradle-plugin/pom.xml') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Maven
shell: bash
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}
- name: Upload Maven build artifact
uses: actions/upload-artifact@v1
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
with:
name: artifact
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
- name: Test Gradle plugin usage
shell: bash
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
- name: Test Maven plugin integration
if: matrix.java == '8'
shell: bash
run: |
cd modules/openapi-generator-maven-plugin
mvn verify -Pintegration
verify:
name: Verify outputs on ${{ matrix.os }}
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# include:
# - os: windows-latest
# flags: --skip-docs
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Download build artifact
uses: actions/download-artifact@v1
with:
name: artifact
- name: Run Ensures Script
shell: bash
run: |
git config --global core.fileMode false
git config --global core.safecrlf false
git config --global core.autocrlf true
mkdir -p modules/openapi-generator-cli/target/
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
./bin/utils/ensure-up-to-date ${{ matrix.flags }}