-
Notifications
You must be signed in to change notification settings - Fork 8
194 lines (179 loc) · 7.61 KB
/
test-net-framework-samples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: test-samples
on:
pull_request:
branches:
- develop
- main
push:
branches:
- develop
- main
jobs:
test-samples:
runs-on: windows-2019
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
dir: [
'Annotations/Annotations/',
'Annotations/InkAnnotations/',
'Annotations/LinkAnnotation/',
'Annotations/PolygonAnnotations/',
'Annotations/PolyLineAnnotations/',
'ContentCreation/AddElements/',
'ContentCreation/AddHeaderFooter/',
'ContentCreation/Clips/',
'ContentCreation/CreateBookmarks/',
'ContentCreation/GradientShade/',
'ContentCreation/MakeDocWithCalGrayColorSpace/',
'ContentCreation/MakeDocWithCalRGBColorSpace/',
'ContentCreation/MakeDocWithDeviceNColorSpace/',
'ContentCreation/MakeDocWithICCBasedColorSpace/',
'ContentCreation/MakeDocWithIndexedColorSpace/',
'ContentCreation/MakeDocWithLabColorSpace/',
'ContentCreation/MakeDocWithSeparationColorSpace/',
'ContentCreation/NameTrees/',
'ContentCreation/NumberTrees/',
'ContentCreation/RemoteGoToActions/',
'ContentCreation/WriteNChannelTiff/',
'ContentModification/Action/',
'ContentModification/AddCollection/',
'ContentModification/AddQRCode/',
'ContentModification/ChangeLayerConfiguration/',
'ContentModification/ChangeLinkColors/',
'ContentModification/CreateLayer/',
'ContentModification/ExtendedGraphicStates/',
'ContentModification/FlattenTransparency/',
'ContentModification/LaunchActions/',
'ContentModification/MergePDF/',
'ContentModification/PageLabels/',
'ContentModification/PDFObject/',
'ContentModification/UnderlinesAndHighlights/',
'ContentModification/Watermark/',
'Display/DisplayPDF/',
'Display/DotNETViewer/',
'Display/DotNETViewerComponent/',
'Display/PDFObjectExplorer/',
'DocumentConversion/ColorConvertDocument/',
'DocumentConversion/ConvertToOffice/',
'DocumentConversion/CreateDocFromXPS/',
'DocumentConversion/Factur-XConverter/',
'DocumentConversion/PDFAConverter/',
'DocumentConversion/PDFXConverter/',
'DocumentConversion/ZUGFeRDConverter/',
'DocumentOptimization/PDFOptimize/',
'Images/DocToImages/',
'Images/DrawSeparations/',
'Images/DrawToBitmap/',
'Images/EPSSeparations/',
'Images/GetSeparatedImages/',
'Images/ImageEmbedICCProfile/',
'Images/ImageExport/',
'Images/ImageExtraction/',
'Images/ImageFromStream/',
'Images/ImageImport/',
'Images/ImageResampling/',
'Images/ImageSoftMask/',
'Images/OutputPreview/',
'Images/RasterizePage/',
'InformationExtraction/ListBookmarks/',
'InformationExtraction/ListInfo/',
'InformationExtraction/ListLayers/',
'InformationExtraction/ListPaths/',
'InformationExtraction/Metadata/',
'OpticalCharacterRecognition/AddTextToDocument/',
'OpticalCharacterRecognition/AddTextToImage/',
'Other/MemoryFileSystem/',
'Other/StreamIO/',
'Printing/PrintPDF/',
'Printing/PrintPDFGUI/',
'Security/AddRegexRedaction/',
'Security/Redactions/',
'Text/AddGlyphs/',
'Text/AddUnicodeText/',
'Text/AddVerticalText/',
'Text/ExtractAcroFormFieldData/',
'Text/ExtractCJKTextByPatternMatch/',
'Text/ExtractTextByPatternMatch/',
'Text/ExtractTextByRegion/',
'Text/ExtractTextFromAnnotations/',
'Text/ExtractTextFromMultiRegions/',
'Text/ExtractTextPreservingStyleAndPositionInfo/',
'Text/ListWords/',
'Text/RegexExtractText/',
'Text/RegexTextSearch/',
'Text/TextExtract/'
]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Print PATH variable
run: echo $PATH
- name: Setup NuGet.exe
uses: nuget/setup-nuget@v2
- name: Install NuGet packages
working-directory: ${{ matrix.dir }}
run: |
sample_name=$(basename "$PWD")
echo "Installing NuGet packages..."
if [ "$sample_name" == "DotNETViewer" ]; then
nuget.exe restore ../DotNETViewerComponent/DotNETViewerComponent.csproj
nuget.exe restore $sample_name.csproj
else
nuget.exe restore $sample_name.csproj
fi
- name: Build samples
working-directory: ${{ matrix.dir }}
run: |
sample_name=$(basename "$PWD")
echo "Building $sample_name sample..."
if [ "$sample_name" == "DotNETViewer" ]; then
msbuild.exe ../DotNETViewerComponent/DotNETViewerComponent.csproj //p:Configuration=Release //p:Platform=x64
msbuild.exe $sample_name.csproj //p:Configuration=Release //p:Platform=x64
else
msbuild.exe $sample_name.csproj //p:Configuration=Release //p:Platform=x64
fi
- name: Run samples
working-directory: ${{ matrix.dir }}
run: |
sample_name=$(basename "$PWD")
if [ "$sample_name" != "PrintPDF" ] && [ "$sample_name" != "PrintPDFGUI" ] && [ "$sample_name" != "DisplayPDF" ] && [ "$sample_name" != "DotNETViewer" ] && [ "$sample_name" != "DotNETViewerComponent" ] && [ "$sample_name" != "PDFObjectExplorer" ]; then
if [ "$sample_name" == "DocToImages" ]; then
bin/Release/$sample_name.exe -format=png $HOME/.nuget/packages/adobe.pdf.library.sampleinput/1.0.0/build/Resources/Sample_Input/ducky.pdf
else
bin/Release/$sample_name.exe
fi
else
echo "$sample_name will not be run due to GitHub runner limitations."
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-${{ 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}}