From ea91552700bb9df764eaed57a9ff3c55fd97566e Mon Sep 17 00:00:00 2001 From: Stefan Jung Date: Mon, 6 Nov 2023 21:15:07 +0100 Subject: [PATCH] Implement GitHub Action --- .github/workflows/main.yml | 95 +++++++++++++++++++++++++++++++++ build_schematron-validation.xml | 12 ++--- samples/samples.xml | 16 ++++++ 3 files changed, 117 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/main.yml create mode 100644 samples/samples.xml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..2ce52ae --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,95 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +env: + DITA_OT_VERSION: 4.1.2 + +jobs: + + dita-ot_4-1-2: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Java 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'zulu' + - name: DITA-OT + run: | + curl --location --remote-name https://github.com/dita-ot/dita-ot/releases/download/4.1.2/dita-ot-4.1.2.zip + unzip dita-ot-4.1.2 + chmod +x dita-ot-4.1.2/bin/dita + chmod +x dita-ot-4.1.2/bin/ant + zip -qq -r org.jung.schematron.zip . -x ./.git/**\* + dita-ot-4.1.2/bin/dita install org.jung.schematron.zip --force + - name: Build test files + run: | + dita-ot-4.1.2/bin/dita --project=samples/samples.xml --output=4.1.2 --processing-mode=strict --verbose + - name: Archive production artifacts + uses: actions/upload-artifact@v3 + with: + name: org.jung.terminology-4-1-2 + path: | + 4.1.2 + + dita-ot_4-0-2: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Java 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'zulu' + - name: DITA-OT + run: | + curl --location --remote-name https://github.com/dita-ot/dita-ot/releases/download/4.0.2/dita-ot-4.0.2.zip + unzip dita-ot-4.0.2 + chmod +x dita-ot-4.0.2/bin/dita + chmod +x dita-ot-4.0.2/bin/ant + zip -qq -r org.jung.schematron.zip . -x ./.git/**\* + dita-ot-4.0.2/bin/dita install org.jung.schematron.zip --force + - name: Build test files + run: | + dita-ot-4.0.2/bin/dita --project=samples/samples.xml --output=4.0.2 --processing-mode=strict --verbose + - name: Archive production artifacts + uses: actions/upload-artifact@v3 + with: + name: org.jung.terminology-4-0-2 + path: | + 4.0.2 + + dita-ot_3-7-4: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Java 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'zulu' + - name: DITA-OT + run: | + curl --location --remote-name https://github.com/dita-ot/dita-ot/releases/download/3.7.4/dita-ot-3.7.4.zip + unzip dita-ot-3.7.4 + chmod +x dita-ot-3.7.4/bin/dita + chmod +x dita-ot-3.7.4/bin/ant + zip -qq -r org.jung.terminology.zip . -x ./.git/**\* + zip -qq -r org.jung.schematron.zip . -x ./.git/**\* + dita-ot-3.7.4/bin/dita install org.jung.schematron.zip --force + - name: Build test files + run: | + dita-ot-3.7.4/bin/dita --project=samples/samples.xml --output=3.7.4 --processing-mode=strict --verbose + - name: Archive production artifacts + uses: actions/upload-artifact@v3 + with: + name: org.jung.terminology-3-7-4 + path: | + 3.7.4 diff --git a/build_schematron-validation.xml b/build_schematron-validation.xml index 8f5b714..f639e8a 100644 --- a/build_schematron-validation.xml +++ b/build_schematron-validation.xml @@ -45,12 +45,12 @@ ******************************************************************* - schematron.fail=${schematron.fail} - schematron.failon.fatal=${schematron.failon.fatal} - schematron.failon.error=${schematron.failon.error} - schematron.failon.warning=${schematron.failon.warning} - schematron.failon.info=${schematron.failon.info} - schematron.svrl.dir=${schematron.svrl.dir} + schematron.fail = ${schematron.fail} + schematron.failon.fatal = ${schematron.failon.fatal} + schematron.failon.error = ${schematron.failon.error} + schematron.failon.warning = ${schematron.failon.warning} + schematron.failon.info = ${schematron.failon.info} + schematron.svrl.dir = ${schematron.svrl.dir} ******************************************************************* diff --git a/samples/samples.xml b/samples/samples.xml new file mode 100644 index 0000000..37a98ab --- /dev/null +++ b/samples/samples.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + +