Skip to content

APDFL-5452: Add CI for samples #22

APDFL-5452: Add CI for samples

APDFL-5452: Add CI for samples #22

name: test-samples
on:
pull_request:
push:
branches: [ develop, main ]
env:
DOTNET_VERSION: '6.x'
jobs:
run-samples:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-14]
# TODO: AddHeaderFooter won't run due to Times-Roman font not present on runner.
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/'
]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build samples
working-directory: ${{ matrix.dir }}
run: dotnet build -c Release *.csproj
- name: List files
run: |
ls ${{matrix.dir}}
- name: Run samples
working-directory: ${{matrix.dir}}
run: |
dll_name=$(basename "$PWD")
dotnet bin/Release/net6.0/$dll_name.dll