forked from DynamoDS/Dynamo
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (112 loc) · 4.79 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
# Build Dynamo using latest VS and DotNET and perform a Bin Diff
name: Dynamo-BinDiff
on: [push,pull_request]
jobs:
build-dotnet-windows-current:
runs-on: windows-latest
steps:
- name: Checkout Dynamo Repo
uses: actions/checkout@v4
with:
path: net60_Win_Dynamo
repository: DynamoDS/Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v4
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.sln /p:Configuration=Release --runtime=win-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.sln /p:Configuration=Release
- name: Navigate to Dynamo DotNet6 Windows Folder
run: |
cd "$Env:GITHUB_WORKSPACE\net60_Win_Dynamo\bin\AnyCPU\Release"
echo "***Locating DynamoCLI for Windows!***"
test ".\DynamoSandbox.exe" && echo "DynamoSandbox exists!"
- name: Cache Current NET6 Windows Build
uses: actions/cache/save@v3
with:
path: |
${{ github.workspace }}\net60_Win_Dynamo\bin\AnyCPU\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@v4
with:
ref: master
path: master_net60_Win_Dynamo
repository: DynamoDS/Dynamo
- name: Setup dotnet
uses: actions/setup-dotnet@v4
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 /p:Configuration=Release --runtime=win-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\AnyCPU\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\AnyCPU\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]
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-net60-windows.outputs.Diff2 }}" > ./pr/Diff2
- uses: actions/upload-artifact@v3
with:
name: pr
path: pr/