arthas/.github/workflows/test.yaml

50 lines
1.3 KiB
YAML
Raw Normal View History

2020-12-14 20:25:18 +08:00
name: JavaCI
2020-12-28 14:51:19 +08:00
on: [push, pull_request]
2020-12-14 20:25:18 +08:00
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
2022-08-25 15:09:34 +08:00
java: [8, 11]
2020-12-14 20:25:18 +08:00
steps:
- uses: actions/checkout@v2
- name: Setup java
2022-08-25 15:09:34 +08:00
uses: actions/setup-java@v3
2020-12-14 20:25:18 +08:00
with:
java-version: ${{ matrix.java }}
2022-08-25 15:09:34 +08:00
distribution: 'zulu'
cache: 'maven'
2020-12-14 20:25:18 +08:00
- name: Build with Maven
run: mvn clean package -P full
build_jdk_ge_12:
runs-on: ubuntu-latest
strategy:
matrix:
2022-08-25 15:09:34 +08:00
# https://static.azul.com/zulu/bin/
java: [12, 13, 14 , 17, 18, '19.0.0-ea.33']
2020-12-14 20:25:18 +08:00
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
2022-08-25 15:09:34 +08:00
uses: actions/setup-java@v3
2020-12-14 20:25:18 +08:00
with:
java-version: 8
2022-08-25 15:09:34 +08:00
distribution: 'zulu'
cache: 'maven'
2020-12-14 20:25:18 +08:00
- name: save java8 home
run: |
export JAVA8_HOME=$JAVA_HOME && echo $JAVA8_HOME
echo "export JAVA8_HOME=$JAVA_HOME" > ~/.testenv
- name: Setup java
2022-08-25 15:09:34 +08:00
uses: actions/setup-java@v3
2020-12-14 20:25:18 +08:00
with:
java-version: ${{ matrix.java }}
2022-08-25 15:09:34 +08:00
distribution: 'zulu'
cache: 'maven'
2020-12-14 20:25:18 +08:00
- name: Build with Maven
run: |
source ~/.testenv
mvn -Dmaven.compiler.fork=true -Dmaven.compiler.executable=$JAVA8_HOME/bin/javac -DJAVA8_HOME=$JAVA8_HOME clean package -P full