Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync main with develop #61

Merged
merged 19 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
43bd879
Expand workflow to build sample JARs to run in CI
datalogics-saharay Mar 29, 2024
010d03d
Remove step that cleans target folder
datalogics-saharay Mar 29, 2024
309bcd3
Fix FacturXConverter sample
datalogics-saharay Mar 29, 2024
f5cf90d
Disable the ConvertToOffice and CreateDocFromXPS on mac platform
datalogics-saharay Apr 1, 2024
25ca978
Add logic to run Java samples in CI
datalogics-saharay Apr 3, 2024
7b4f63e
Specify branches for workflow trigger
datalogics-saharay Apr 5, 2024
68af51f
Disable the Display and Printing samples in CI
datalogics-saharay Apr 8, 2024
3fe6cfc
Disable the ImageDisplayByteArray sample in CI
datalogics-saharay Apr 8, 2024
75387ce
Rename the PDFObject source file so it runs in CI
datalogics-saharay Apr 8, 2024
ad050fc
Install Microsoft Core Fonts for samples that require it
datalogics-saharay Apr 9, 2024
52ee9e8
Correct artifact id for ListBookmarks sample
datalogics-saharay Apr 9, 2024
a3f817e
Unpack the APDFL resources ZIP file
datalogics-saharay Apr 9, 2024
b6ace0e
Pass proper command line arguments for DocToImages sample
datalogics-saharay Apr 9, 2024
532eb7e
Correct RUNNER_OS logic for macOS
datalogics-saharay Apr 11, 2024
f1116c8
Add logic to archive sample output
datalogics-saharay Apr 11, 2024
5a069e3
Disable CreateDocFromXPS and ConvertToOffice samples on macOS
datalogics-saharay Apr 11, 2024
166cff6
Merge pull request #54 from datalogics-saharay/APDFL-5515-add-CI-for-…
datalogics-robl Apr 12, 2024
1d173a1
Update PDFL version to 18.35.0
datalogics-bruceh Apr 29, 2024
14eeba6
Merge pull request #60 from datalogics-bruceh/update-to-18.35.0
datalogics-robl Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 113 additions & 2 deletions .github/workflows/test-java-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ name: test-samples

on:
pull_request:
branches:
- develop
- main
push:
branches: [ develop, main ]
branches:
- develop
- main


env:
JAVA_VERSION: '11'
Expand Down Expand Up @@ -61,7 +67,7 @@ jobs:
'DocumentConversion/ColorConvertDocument/',
'DocumentConversion/ConvertToOffice/',
'DocumentConversion/CreateDocFromXPS/',
'DocumentConversion/Factur-XConverter/',
'DocumentConversion/FacturXConverter/',
'DocumentConversion/PDFAConverter/',
'DocumentConversion/PDFXConverter/',
'DocumentConversion/ZUGFeRDConverter/',
Expand Down Expand Up @@ -105,8 +111,113 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'adopt'

- name: Setup Microsoft Core Fonts
working-directory: ${{ matrix.dir }}
run: |
sample_name=$(basename "$PWD")
if [ "${{ matrix.os }}" == 'ubuntu-latest' ]; then
case "$sample_name" in "AddHeaderFooter" | "AddElements")
echo 'ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true' | sudo debconf-set-selections
sudo apt-get install ttf-mscorefonts-installer
;;
esac
fi

- name: Unpack APDFL from Maven Central
working-directory: ${{ matrix.dir }}
run: |
sample_name=$(basename "$PWD")
if { [ "$sample_name" != "ConvertToOffice" ] && [ "$sample_name" != "CreateDocFromXPS" ]; } || [ "${{ matrix.os }}" != 'macos-14' ]; then
mvn -e process-resources
else
echo "Not available on this os"
fi

- name: Unpack APDFL resources ZIP file
working-directory: ${{ matrix.dir }}
run: |
sample_name=$(basename "$PWD")
if [ "$sample_name" == "DocToImages" ] && [ "$RUNNER_OS" != "macOS" ] ; then
unzip $HOME/.m2/repository/com/datalogics/pdfl/pdfl/**/*-resources.zip
ls -la
fi

- name: Compile and assemble sample JAR files with dependencies
working-directory: ${{ matrix.dir }}
run: |
sample_name=$(basename "$PWD")
if { [ "$sample_name" != "ConvertToOffice" ] && [ "$sample_name" != "CreateDocFromXPS" ]; } || [ "${{ matrix.os }}" != 'macos-14' ]; then
mvn -e package
else
echo "Not available on this os"
fi

- name: Set up Windows system PATH
working-directory: ${{ matrix.dir }}
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
echo "${{ github.workspace }}\${{ matrix.dir }}\target\lib" >> $GITHUB_PATH
fi

- name: Print PATH
run: echo $PATH

- name: Run samples
working-directory: ${{ matrix.dir }}
run: |
sample_name=$(basename "$PWD")
if [ "$sample_name" == "DisplayPDF" ] || [ "$sample_name" == "ImageDisplay" ] || [ "$sample_name" == "JavaViewer" ] || [ "$sample_name" == "PDFObjectExplorer" ] || [ "$sample_name" == "PrintPDF" ] || [ "$sample_name" == "PrintPDFGUI" ] || [ "$sample_name" == "ImageDisplayByteArray" ]; then
echo "$sample_name will not be run due to GitHub runner limitations."
elif { [ "$sample_name" != "ConvertToOffice" ] && [ "$sample_name" != "CreateDocFromXPS" ]; } || [ "${{matrix.os}}" != 'macos-14' ]; then
if [ "$RUNNER_OS" == "Windows" ]; then
if [ "$sample_name" == "DocToImages" ]; then
java -Djava.library.path="$PATH" -Dfile.encoding=UTF-8 -jar target/$sample_name-1.0-SNAPSHOT-jar-with-dependencies.jar -format=png Sample_Input/ducky.pdf
else
java -Djava.library.path="$PATH" -Dfile.encoding=UTF-8 -jar target/$sample_name-1.0-SNAPSHOT-jar-with-dependencies.jar
fi
elif [ "$RUNNER_OS" == "Linux" ] || [ "$RUNNER_OS" == "macOS" ]; then
if [ "$sample_name" == "DocToImages" ]; then
java -Djava.library.path=./target/lib -Dfile.encoding=UTF-8 -jar target/$sample_name-1.0-SNAPSHOT-jar-with-dependencies.jar -format=png Sample_Input/ducky.pdf
else
java -Djava.library.path=./target/lib -Dfile.encoding=UTF-8 -jar target/$sample_name-1.0-SNAPSHOT-jar-with-dependencies.jar
fi
fi
else
echo "Not available on this os"
fi

- name: Set sample_name variable
id: set-sample-name
working-directory: ${{matrix.dir}}
run: echo "SAMPLE_NAME=$(basename "$PWD")" >> "$GITHUB_ENV"

- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: output-${{ runner.os }}-${{ env.SAMPLE_NAME }}
path: |
${{matrix.dir}}*.docx
${{matrix.dir}}*.xslx
${{matrix.dir}}*.pptx
${{matrix.dir}}*.pdf
${{matrix.dir}}*.tif
${{matrix.dir}}*.png
${{matrix.dir}}*.jpg
${{matrix.dir}}*.eps
${{matrix.dir}}*.tiff
${{matrix.dir}}*.bmp
${{matrix.dir}}*.gif
${{matrix.dir}}*.json
${{matrix.dir}}*.txt
${{matrix.dir}}*.csv

- name: List files
run: |
ls ${{matrix.dir}}
32 changes: 27 additions & 5 deletions Annotations/Annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,32 @@
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>zip</type>
<classifier>${jni.classifier}</classifier>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>zip</type>
<classifier>resources</classifier>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<classifier>javadoc</classifier>
</dependency>
</dependencies>
Expand Down Expand Up @@ -151,6 +151,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.datalogics.pdfl.samples.Annotations</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
32 changes: 27 additions & 5 deletions Annotations/InkAnnotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,32 @@
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>zip</type>
<classifier>${jni.classifier}</classifier>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>zip</type>
<classifier>resources</classifier>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<classifier>javadoc</classifier>
</dependency>
</dependencies>
Expand Down Expand Up @@ -151,6 +151,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.datalogics.pdfl.samples.InkAnnotations</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
32 changes: 27 additions & 5 deletions Annotations/LinkAnnotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,32 +51,32 @@
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>zip</type>
<classifier>${jni.classifier}</classifier>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<type>zip</type>
<classifier>resources</classifier>
</dependency>
<dependency>
<groupId>com.datalogics.pdfl</groupId>
<artifactId>pdfl</artifactId>
<version>18.34.0</version>
<version>18.35.0</version>
<classifier>javadoc</classifier>
</dependency>
</dependencies>
Expand Down Expand Up @@ -151,6 +151,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>com.datalogics.pdfl.samples.LinkAnnotations</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading
Loading