-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (69 loc) · 2.76 KB
/
stride-ndepend-github.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
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build Stride NDepend Analysis for GitHub Pages
env:
PROJECT_PATH_CORE: build/Stride.sln
DEPLOY_DIR: ..\..\_temp\GitHubPages
on:
workflow_dispatch:
jobs:
publish-docs:
runs-on: windows-2022
steps:
- name: Dotnet Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Checkout Stride (note the LFS)
uses: actions/checkout@v4
with:
repository: stride3d/stride
token: ${{ secrets.GITHUB_TOKEN }}
# path: stride
lfs: true
#- name: Restore Stride dependencies
# run: dotnet restore ${{ env.PROJECT_PATH_CORE }}
- name: Create .sarif Folder
run: |
mkdir build\.sarif
- name: Create Directory.Build.props
shell: powershell
run: |
Add-Content -Path Directory.Build.props -Value '<Project>'
Add-Content -Path Directory.Build.props -Value ' <PropertyGroup>'
Add-Content -Path Directory.Build.props -Value ' <ErrorLog>$(SolutionDir)\.sarif\$(MSBuildProjectName).json</ErrorLog>'
Add-Content -Path Directory.Build.props -Value ' </PropertyGroup>'
Add-Content -Path Directory.Build.props -Value '</Project>'
- name: List folder content in the working directory
shell: powershell
run: Get-ChildItem
- name: List folder content in the build directory
shell: powershell
run: Get-ChildItem -Path build
- name: Display Directory.Build.props content
shell: powershell
run: Get-Content -Path Directory.Build.props
- name: Build Stride.sln
run: msbuild build/Stride.build -t:Build
# run: dotnet build ${{ env.PROJECT_PATH_CORE }} --no-restore
- name: NDepend
uses: ndepend/ndepend-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
license: ${{ secrets.NDependLicense }}
solution: ${{ env.PROJECT_PATH_CORE }}
baseline: recent
- name: Prepare deployment files for GitHub Pages
shell: powershell
run: |
New-Item -ItemType Directory -Force -Path ${{ env.DEPLOY_DIR }}
Copy-Item -Path ..\..\_temp\NDependOut\NDependReport.html -Destination ${{ env.DEPLOY_DIR }}\
Copy-Item -Path ..\..\_temp\NDependOut\NDependReportFiles -Destination ${{ env.DEPLOY_DIR }}\ -Recurse
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.DEPLOY_DIR }}
destination_dir: stride/ndepend
publish_branch: gh-pages