# 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: Java CI with Maven on: push: # branches: [ master ] pull_request: branches: [ master ] jobs: # old-school build and jar method. No tests run or compiled. build-1_6: runs-on: ubuntu-16.04 strategy: matrix: # build for java 1.6, however don't run any tests java: [ 1.6 ] name: Java ${{ matrix.java }} steps: - uses: actions/checkout@v2 - name: Setup java uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} - name: Compile Java ${{ matrix.java }} run: | mkdir -p target/classes javac -d target/classes/ src/main/java/org/json/*.java - name: Create java ${{ matrix.java }} JAR run: | jar cvf target/org.json.jar -C target/classes . - name: Upload Java ${{ matrix.java }} JAR uses: actions/upload-artifact@v1 with: name: Java ${{ matrix.java }} JAR path: target/org.json.jar build: runs-on: ubuntu-16.04 strategy: matrix: # build against supported Java LTS versions: java: [ 1.7, 8, 11 ] name: Java ${{ matrix.java }} Compile steps: - uses: actions/checkout@v2 - name: Setup java uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} - run: mvn clean compile -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true - run: mvn test -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true