-
Notifications
You must be signed in to change notification settings - Fork 636
202 lines (197 loc) · 8.55 KB
/
dynamoBinDiff.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
195
196
197
198
199
200
201
202
# Build Dynamo using latest VS and DotNET and perform a Bin Diff
name: Dynamo-BinDiff
on: [push, pull_request]
jobs:
build-current:
runs-on: windows-latest
steps:
- name: Checkout Dynamo Repo current branch
uses: actions/checkout@v3
with:
path: Dynamo
repository: DynamoDS/Dynamo
- name: Setup Nuget.exe to use on VM (current)
uses: nuget/setup-nuget@v1
- name: Nuget Restore in Dynamo solution (current)
run: nuget restore $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln
- name: Test var
run: echo "${{ github.workspace }}"
- name: Build Dynamo current branch with MSBuild
run: |
echo "***Continue with the build, Good luck developer!***"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln /p:Configuration=Release
- name: Confirm Dynamo Build (current)
run: |
cd "$Env:GITHUB_WORKSPACE\Dynamo\bin\AnyCPU\Release"
echo "***Locating DynamoSandbox after current build!***"
test ".\DynamoSandbox.exe" && echo "DynamoSandbox exists!"
- name: Cache Current Build
uses: actions/cache/save@v3
with:
path: |
${{ github.workspace }}\Dynamo\bin\AnyCPU\Release
${{ github.workspace }}\Dynamo\.github\scripts
key: ${{ github.run_id }}-${{ github.run_attempt }}-cache-current
build-master:
runs-on: windows-latest
steps:
- name: Checkout Dynamo Repo master branch
uses: actions/checkout@v3
with:
ref: master
path: master_Dynamo
repository: DynamoDS/Dynamo
- name: Setup Nuget.exe to use on VM (master)
uses: nuget/setup-nuget@v1
- name: Nuget Restore in Dynamo solution (master)
run: nuget restore $Env:GITHUB_WORKSPACE\master_Dynamo\src\Dynamo.All.sln
- name: Build Dynamo master branch with MSBuild
run: |
echo "***Continue with the build, Good luck developer!***"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\master_Dynamo\src\Dynamo.All.sln /p:Configuration=Release
- name: Confirm Dynamo Build (master)
run: |
cd "$Env:GITHUB_WORKSPACE\master_Dynamo\bin\AnyCPU\Release"
echo "***Locating DynamoSandbox after master build!***"
test ".\DynamoSandbox.exe" && echo "DynamoSandbox exists!"
- name: Cache Master Build
uses: actions/cache/save@v3
with:
path: ${{ github.workspace }}\master_Dynamo\bin\AnyCPU\Release
key: ${{ github.run_id }}-${{ github.run_attempt }}-cache-master
run-bin-diff:
needs: [build-current, build-master]
runs-on: windows-latest
steps:
- name: Restore Current Build
uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
path: |
${{ github.workspace }}\Dynamo\bin\AnyCPU\Release
${{ github.workspace }}\Dynamo\.github\scripts
key: ${{ github.run_id }}-${{ github.run_attempt }}-cache-current
- name: Restore Master Build
uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
path: ${{ github.workspace }}\master_Dynamo\bin\AnyCPU\Release
key: ${{ github.run_id }}-${{ github.run_attempt }}-cache-master
- name: Run Binary Diff Job
id: Diff1
run: |
echo "***Running the binary diff job between the current branch and the master branch!***"
cd "$Env:GITHUB_WORKSPACE\Dynamo\.github\scripts"
.\bin_diff.ps1 $Env:GITHUB_WORKSPACE\master_Dynamo\bin\AnyCPU\Release,$Env:GITHUB_WORKSPACE\Dynamo\bin\AnyCPU\Release -src ${{ github.job }}
echo "Diff1=$(cat ./result.txt)" >> $Env:GITHUB_OUTPUT
outputs:
Diff1: ${{ steps.Diff1.outputs.Diff1 }}
build-dotnet-windows-current:
runs-on: windows-latest
steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v3
with:
path: net60_Win_Dynamo
repository: DynamoDS/Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Disable problem matcher
run: echo "::remove-matcher owner=csc::"
- name: Install dependencies for windows runtime
run: dotnet restore $Env:GITHUB_WORKSPACE\net60_Win_Dynamo\src\Dynamo.All.Net6.sln -p:Platform=NET60_Windows --runtime=win10-x64
- name: Build Dynamo current branch with MSBuild for NET60-Windows
run: |
echo "***Continue with the build, Good luck developer!***"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\net60_Win_Dynamo\src\Dynamo.All.Net6.sln /p:Configuration=Release /p:Platform=NET60_Windows
- name: Navigate to Dynamo DotNet6 Windows Folder
run: |
cd "$Env:GITHUB_WORKSPACE\net60_Win_Dynamo\bin\NET60_Windows\Release"
echo "***Locating DynamoCLI for Windows!***"
test ".\DynamoCLI.exe" && echo "DynamoCLI exists!"
- name: Cache Current NET6 Windows Build
uses: actions/cache/save@v3
with:
path: |
${{ github.workspace }}\net60_Win_Dynamo\bin\NET60_Windows\Release
${{ github.workspace }}\net60_Win_Dynamo\.github\scripts
key: ${{ github.run_id }}-${{ github.run_attempt }}-cache-net60Win-current
build-dotnet-windows-master:
runs-on: windows-latest
steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v3
with:
ref: master
path: master_net60_Win_Dynamo
repository: DynamoDS/Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Disable problem matcher
run: echo "::remove-matcher owner=csc::"
- name: Install dependencies for windows runtime
run: dotnet restore $Env:GITHUB_WORKSPACE\master_net60_Win_Dynamo\src\Dynamo.All.sln --runtime=win10-x64
- name: Build Dynamo master branch with MSBuild for NET60-Windows
run: |
echo "***Continue with the build, Good luck developer!***"
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\"
.\MSBuild.exe $Env:GITHUB_WORKSPACE\master_net60_Win_Dynamo\src\Dynamo.All.sln /p:Configuration=Release
- name: Navigate to Dynamo DotNet6 Windows Folder
run: |
cd "$Env:GITHUB_WORKSPACE\master_net60_Win_Dynamo\bin\AnyCPU\Release"
echo "***Locating DynamoCLI for Windows!***"
test ".\DynamoCLI.exe" && echo "DynamoCLI exists!"
- name: Cache Current NET6 Windows Build
uses: actions/cache/save@v3
with:
path: ${{ github.workspace }}\master_net60_Win_Dynamo\bin\AnyCPU\Release
key: ${{ github.run_id }}-${{ github.run_attempt }}-cache-net60Win-master
run-bin-diff-net60-windows:
needs: [build-dotnet-windows-current, build-dotnet-windows-master]
runs-on: windows-latest
steps:
- name: Restore Current Net60 Windows Build
uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
path: |
${{ github.workspace }}\net60_Win_Dynamo\bin\NET60_Windows\Release
${{ github.workspace }}\net60_Win_Dynamo\.github\scripts
key: ${{ github.run_id }}-${{ github.run_attempt }}-cache-net60Win-current
- name: Restore Master Net60 Windows Build
uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
path: ${{ github.workspace }}\master_net60_Win_Dynamo\bin\AnyCPU\Release
key: ${{ github.run_id }}-${{ github.run_attempt }}-cache-net60Win-master
- name: Run Binary Diff Job
id: Diff2
run: |
echo "***Running the binary diff job between the current branch and the master branch of NET60-Windows Config!***"
cd "$Env:GITHUB_WORKSPACE\net60_Win_Dynamo\.github\scripts"
.\bin_diff.ps1 $Env:GITHUB_WORKSPACE\master_net60_Win_Dynamo\bin\AnyCPU\Release,$Env:GITHUB_WORKSPACE\net60_Win_Dynamo\bin\NET60_Windows\Release -src ${{ github.job }}
echo "Diff2=$(cat ./result.txt)" >> $Env:GITHUB_OUTPUT
outputs:
Diff2: ${{ steps.Diff2.outputs.Diff2 }}
save-PR-Data:
needs: [run-bin-diff-net60-windows, run-bin-diff]
runs-on: ubuntu-latest
steps:
- name: Save PR Data
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
echo ${{ github.run_id }}-${{ github.run_attempt }} > ./pr/WN
echo "${{ needs.run-bin-diff.outputs.Diff1 }}" > ./pr/Diff1
echo "${{ needs.run-bin-diff-net60-windows.outputs.Diff2 }}" > ./pr/Diff2
- uses: actions/upload-artifact@v3
with:
name: pr
path: pr/