Adding legacy java 7 and older Java versions that were in travis.yml

This commit is contained in:
Brian Demers 2021-12-14 12:35:31 -05:00 committed by Brian Demers
parent aa17d5094e
commit 9f789bb4c6
1 changed files with 66 additions and 17 deletions

View File

@ -1,31 +1,80 @@
name: CI name: CI
on: on:
pull_request: pull_request: # all pull requests
branches:
- master
push: push:
branches: branches:
- master - master
jobs: jobs:
build: hotspot:
strategy: strategy:
matrix: matrix:
java: [ '7', '8', '11' ] java: [ '8', '11' ]
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
env: env:
MVN_CMD: ./mvnw --no-transfer-progress -B MVN_CMD: ./mvnw --no-transfer-progress -B
name: java-${{ matrix.java }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2.4.0
- name: Set up JDK - name: Set up JDK
uses: actions/setup-java@v2 uses: actions/setup-java@v2.4.0
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Build
run: ${{env.MVN_CMD}} verify
- name: Code coverage
if: matrix.java == '8'
run: |
${{env.MVN_CMD}} clean clover:setup test
${{env.MVN_CMD}} -pl . clover:clover clover:check coveralls:report \
-DrepoToken="${{ secrets.GITHUB_TOKEN }}" \
-DserviceName=github \
-DserviceBuildNumber="${{ env.GITHUB_RUN_ID }}"
zulu:
strategy:
matrix:
java: [ '9', '10', '14' ]
runs-on: 'ubuntu-latest'
env:
MVN_CMD: ./mvnw --no-transfer-progress -B
name: java-${{ matrix.java }}
steps:
- uses: actions/checkout@v2.4.0
- name: Set up JDK
uses: actions/setup-java@v2.4.0
with: with:
java-version: ${{ matrix.java }} java-version: ${{ matrix.java }}
distribution: 'zulu' distribution: 'zulu'
cache: 'maven' cache: 'maven'
- name: Build - name: Build
run: ${{env.MVN_CMD}} clean install run: ${{env.MVN_CMD}} verify
- name: Code coverage
if: ${{matrix.java}} != '7' java-7:
run: ${{env.MVN_CMD}} clean clover:setup test && ${{env.MVN_CMD}} -pl . clover:clover clover:check coveralls:report; runs-on: 'ubuntu-latest'
env:
MVN_CMD: ./mvnw --no-transfer-progress -B
MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Xmx512m -XX:MaxPermSize=128m"
steps:
- uses: actions/checkout@v2.4.0
- run: |
download_url="https://238dj3282as03k369.s3-us-west-1.amazonaws.com/jdk-7u80-linux-x64.tar.gz"
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url
- name: Set up JDK
uses: actions/setup-java@v2.4.0
with:
distribution: 'jdkfile'
jdkFile: ${{ runner.temp }}/java_package.tar.gz
java-version: '7'
architecture: x64
cache: 'maven'
- name: "Download and install JCE Unlimited Strength Crypto policies for Oracle JDK 7"
run: |
curl -q -L -C - https://238dj3282as03k369.s3-us-west-1.amazonaws.com/UnlimitedJCEPolicyJDK7.zip -o $RUNNER_TEMP/UnlimitedJCEPolicyJDK7.zip
unzip -oj -d "$JAVA_HOME/jre/lib/security" $RUNNER_TEMP/UnlimitedJCEPolicyJDK7.zip \*/\*.jar
rm $RUNNER_TEMP/UnlimitedJCEPolicyJDK7.zip
- name: Build
run: ${{env.MVN_CMD}} verify