Repository navigation
112 lines (107 loc) · 4.7 KB
/
Copy pathdocument-extraction.yml
File metadata and controls
112 lines (107 loc) · 4.7 KB
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
name: Document extraction
on:
push:
branches: [main]
paths:
- 'DocumentExtraction/**'
- 'Directory.Build.props'
- 'Directory.Build.targets'
- 'Directory.Packages.props'
- 'CommunityToolkit.AI.slnx'
- 'global.json'
- 'eng/Bootstrap-DocumentExtractionCore.ps1'
- 'eng/New-DocumentExtractionNuGetConfig.ps1'
- 'eng/Test-DocumentExtractionPackages.ps1'
- 'eng/DocumentExtraction.PackageSmoke/**'
- 'eng/LegacySupport.props'
- 'Shared/**'
- 'nuget.config'
- '.github/workflows/document-extraction.yml'
pull_request:
branches: [main, 'copilot/*']
paths:
- 'DocumentExtraction/**'
- 'Directory.Build.props'
- 'Directory.Build.targets'
- 'Directory.Packages.props'
- 'CommunityToolkit.AI.slnx'
- 'global.json'
- 'eng/Bootstrap-DocumentExtractionCore.ps1'
- 'eng/New-DocumentExtractionNuGetConfig.ps1'
- 'eng/Test-DocumentExtractionPackages.ps1'
- 'eng/DocumentExtraction.PackageSmoke/**'
- 'eng/LegacySupport.props'
- 'Shared/**'
- 'nuget.config'
- '.github/workflows/document-extraction.yml'
workflow_dispatch:
permissions:
contents: read
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
bootstrap-core:
name: Pack pinned public upstream core
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/document-extraction-sdk
with:
dotnet-version: 11.0.100-rc.3.26522.148
- name: Pack original owning upstream projects
shell: pwsh
env:
# Match the verified ordinary owning-project recipe rather than
# enabling upstream CI-only build defaults.
CI: 'false'
run: ./eng/Bootstrap-DocumentExtractionCore.ps1 -OutputDirectory "${{ runner.temp }}/document-extraction-core" -DotnetPath "${{ runner.temp }}/document-extraction-sdk/dotnet.exe"
- uses: actions/upload-artifact@v6
with:
name: document-extraction-core-source-packages
path: |
${{ runner.temp }}/document-extraction-core/*.11.0.0-review.20261106.1.nupkg
${{ runner.temp }}/document-extraction-core/core-bootstrap.json
if-no-files-found: error
build-test-pack:
name: Offline acceptance (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: bootstrap-core
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5
with:
global-json-file: global.json
- uses: actions/download-artifact@v7
with:
name: document-extraction-core-source-packages
path: ${{ runner.temp }}/document-extraction-core
- name: Configure isolated source-built core feed
shell: pwsh
run: ./eng/New-DocumentExtractionNuGetConfig.ps1 -CorePackageDirectory "${{ runner.temp }}/document-extraction-core" -OutputPath "${{ runner.temp }}/document-extraction-nuget.config"
- name: Restore exact dependencies
run: dotnet restore DocumentExtraction/DocumentExtraction.slnf --configfile "${{ runner.temp }}/document-extraction-nuget.config"
- name: Build
run: dotnet build DocumentExtraction/DocumentExtraction.slnf --no-restore -c Release
- name: Offline tests
run: dotnet test DocumentExtraction/DocumentExtraction.slnf --no-build --no-restore -c Release
- name: Restore portable test dependency closure
run: dotnet restore DocumentExtraction/DocumentExtraction.slnf -p:DocumentExtractionTestAsset=netstandard2.0 --configfile "${{ runner.temp }}/document-extraction-nuget.config"
- name: Offline tests using actual netstandard assets
run: dotnet test DocumentExtraction/DocumentExtraction.slnf --no-restore -c Release -p:DocumentExtractionTestAsset=netstandard2.0
- name: Pack preview artifacts
run: dotnet pack DocumentExtraction/DocumentExtraction.slnf --no-build --no-restore -c Release --output artifacts/document-extraction
- name: Verify packaged assets and experimental opt-in
shell: pwsh
run: ./eng/Test-DocumentExtractionPackages.ps1 -PackageDirectory artifacts/document-extraction -CorePackageDirectory "${{ runner.temp }}/document-extraction-core" -NuGetConfig "${{ runner.temp }}/document-extraction-nuget.config" -OutputDirectory "${{ runner.temp }}/document-extraction-package-checks"
- uses: actions/upload-artifact@v6
with:
name: document-extraction-preview-packages-${{ matrix.os }}
path: artifacts/document-extraction/*.nupkg
if-no-files-found: error