From 1ab11d08024f9d815772811c3ebdd110ad228ce8 Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Mon, 23 Oct 2023 14:50:21 -0400 Subject: [PATCH] ensure java 6 compatable --- .github/workflows/pipeline.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index a66ae7b..39d23e2 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -10,6 +10,34 @@ on: branches: [ master ] jobs: + # old-school build and jar method. No tests run or compiled. + build-1_6: + runs-on: ubuntu-latest + strategy: + matrix: + # build for java 1.6, however don't run any tests + java: [ 1.6 ] + name: Java ${{ matrix.java }} + steps: + - uses: actions/checkout@v3 + - name: Setup java + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.java }} + - name: Compile Java ${{ matrix.java }} + run: | + mkdir -p target/classes + javac -version + 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 JAR ${{ matrix.java }} + if: ${{ always() }} + uses: actions/upload-artifact@v3 + with: + name: Create java ${{ matrix.java }} JAR + path: target/*.jar build: runs-on: ubuntu-latest strategy: