@@ -2,10 +2,6 @@ name: Build
22
33on : [push, pull_request]
44
5- concurrency :
6- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
7- cancel-in-progress : true
8-
95jobs :
106 fetch-deps :
117 name : Download original binaries
@@ -104,104 +100,9 @@ jobs:
104100 build/LEGO1.DLL
105101 build/LEGO1.PDB
106102
107- build-with-entropy :
108- name : ' MSVC 4.20 with entropy'
109- needs : [fetch-deps]
110- runs-on : windows-latest
111- strategy :
112- matrix :
113- instance : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
114- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
115- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]
116-
117- steps :
118- - uses : actions/checkout@v4
119-
120- - uses : actions/setup-python@v5
121- with :
122- python-version : ' 3.12'
123-
124- - uses : actions/checkout@v4
125- with :
126- repository : itsmattkc/msvc420
127- path : msvc420
128-
129- - name : Setup cmake
130- uses : jwlawson/actions-setup-cmake@v2
131- with :
132- # Use minimum supported version
133- cmake-version : ' 3.15.x'
134-
135- - name : Patch MSVC 4.2
136- run : |
137- tools/patch_c2.py msvc420/bin/C2.EXE
138-
139- - name : Generate Entropy
140- shell : bash
141- run : |
142- # Get the first 8 characters of the SHA (enough for a decent seed)
143- SHA_PREFIX=$(echo "${{ github.sha }}" | cut -c 1-8)
144- ENTROPY_SEED=$((16#$SHA_PREFIX + ${{ matrix.instance }}))
145-
146- echo "Using seed: $ENTROPY_SEED"
147- python3 tools/entropy.py $ENTROPY_SEED > entropy.h
148-
149- - name : Build
150- shell : cmd
151- run : |
152- call .\msvc420\bin\VCVARS32.BAT x86
153- cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DISLE_INCLUDE_ENTROPY=ON -G "NMake Makefiles"
154- cmake --build build
155-
156- - name : Restore cached original binaries
157- id : cache-original-binaries
158- uses : actions/cache/restore@v4
159- with :
160- enableCrossOsArchive : true
161- path : legobin
162- key : legobin
163-
164- - name : Install python packages
165- shell : bash
166- run : |
167- pip install -r tools/requirements.txt
168-
169- - name : Detect binaries
170- run : |
171- reccmp-project detect --what original --search-path legobin
172- reccmp-project detect --what recompiled --search-path build
173-
174- - name : Summarize Accuracy
175- shell : bash
176- run : |
177- reccmp-reccmp --target CONFIG --json CONFIGPROGRESS.json
178- reccmp-reccmp --target ISLE --json ISLEPROGRESS.json
179- reccmp-reccmp --target LEGO1 --json LEGO1PROGRESS.json
180-
181- - name : Upload Artifact
182- uses : actions/upload-artifact@main
183- with :
184- name : Win32-Entropy-${{ matrix.instance }}
185- path : |
186- CONFIGPROGRESS.json
187- ISLEPROGRESS.json
188- LEGO1PROGRESS.json
189-
190- merge-entropy-artifacts :
191- name : ' Merge entropy artifacts'
192- runs-on : ubuntu-latest
193- needs : build-with-entropy
194- steps :
195- - name : Merge Artifacts
196- uses : actions/upload-artifact/merge@v4
197- with :
198- name : Win32-Entropy
199- pattern : Win32-Entropy-*
200- separate-directories : true
201-
202- compare :
203- name : Compare with master
204- needs : [build, merge-entropy-artifacts, fetch-deps]
103+ verify :
104+ name : Verify decomp
105+ needs : [build, fetch-deps]
205106 runs-on : windows-latest
206107 steps :
207108 - uses : actions/checkout@main
@@ -212,13 +113,8 @@ jobs:
212113
213114 - uses : actions/download-artifact@main
214115 with :
215- name : Win32
216- path : build
217-
218- - uses : actions/download-artifact@main
219- with :
220- name : Win32-Entropy
221- path : build-entropy
116+ name : Win32
117+ path : build
222118
223119 - name : Restore cached original binaries
224120 id : cache-original-binaries
@@ -260,28 +156,6 @@ jobs:
260156 reccmp-reccmp --target ISLE --diff ISLEPROGRESS-old.json || echo "Current master not found"
261157 reccmp-reccmp --target LEGO1 --diff LEGO1PROGRESS-old.json || echo "Current master not found"
262158
263- - name : Aggregate Accuracy
264- shell : bash
265- run : |
266- reccmp-aggregate --samples $(find build-entropy -type f -name "CONFIGPROGRESS.json") --output CONFIGPROGRESS-agg.json --html CONFIGPROGRESS-agg.html
267- reccmp-aggregate --samples $(find build-entropy -type f -name "ISLEPROGRESS.json") --output ISLEPROGRESS-agg.json --html ISLEPROGRESS-agg.html
268- reccmp-aggregate --samples $(find build-entropy -type f -name "LEGO1PROGRESS.json") --output LEGO1PROGRESS-agg.json --html LEGO1PROGRESS-agg.html
269-
270- - name : Compare Aggregate Accuracy With Current Master
271- shell : bash
272- env :
273- RELEASE_URL : https://github.com/isledecomp/isle/releases/download/continuous
274- run : |
275- # Download the current master state
276- curl -fLSs -o CONFIGPROGRESS-agg-old.json $RELEASE_URL/CONFIGPROGRESS-agg.json || echo "" >CONFIGPROGRESS-agg-old.json
277- curl -fLSs -o ISLEPROGRESS-agg-old.json $RELEASE_URL/ISLEPROGRESS-agg.json || echo "" >ISLEPROGRESS-agg-old.json
278- curl -fLSs -o LEGO1PROGRESS-agg-old.json $RELEASE_URL/LEGO1PROGRESS-agg.json || echo "" >LEGO1PROGRESS-agg-old.json
279-
280- # Compare with current master
281- reccmp-aggregate --diff CONFIGPROGRESS-agg-old.json CONFIGPROGRESS-agg.json || echo "Current master not found"
282- reccmp-aggregate --diff ISLEPROGRESS-agg-old.json ISLEPROGRESS-agg.json || echo "Current master not found"
283- reccmp-aggregate --diff LEGO1PROGRESS-agg-old.json LEGO1PROGRESS-agg.json || echo "Current master not found"
284-
285159 - name : Test Exports
286160 shell : bash
287161 run : |
@@ -297,9 +171,9 @@ jobs:
297171 - name : Check Variables
298172 shell : bash
299173 run : |
300- reccmp-datacmp --target CONFIG
301- reccmp-datacmp --target ISLE
302- reccmp-datacmp --target LEGO1
174+ reccmp-datacmp --target CONFIG
175+ reccmp-datacmp --target ISLE
176+ reccmp-datacmp --target LEGO1
303177
304178 - name : Upload Artifact
305179 uses : actions/upload-artifact@main
@@ -312,7 +186,7 @@ jobs:
312186
313187 upload :
314188 name : Upload artifacts
315- needs : [build, compare ]
189+ needs : [verify ]
316190 runs-on : ubuntu-latest
317191 if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle' }}
318192 steps :
0 commit comments