-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Verify supported JDK versions on master push (#7085)
- Loading branch information
1 parent
930c622
commit 5bbcf30
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Check Supported Java Versions | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
name: Build on JDK ${{ matrix.java }} and ${{ 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: Test gradle | ||
shell: bash | ||
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace | ||
|
||
- name: Upload Maven build artifact | ||
uses: actions/upload-artifact@v1 | ||
if: matrix.java == '8' | ||
with: | ||
name: artifact | ||
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar | ||
|
||
verify: | ||
name: Verifies integrity of the commit on ${{ matrix.os }} | ||
needs: build | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
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 | ||
run: | | ||
mkdir -p modules/openapi-generator-cli/target/ | ||
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/ | ||
./bin/utils/ensure-up-to-date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters