Try build pipeline changes

This commit is contained in:
Christian Semmler 2025-02-26 19:41:03 -07:00
parent 866c370353
commit 8229d3595f
2 changed files with 95 additions and 82 deletions

View File

@ -59,70 +59,6 @@ jobs:
-Werror=dev
cmake --build build -- -k0
build-with-entropy:
name: 'MSVC 4.20 with entropy'
runs-on: windows-latest
strategy:
matrix:
instance: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: itsmattkc/msvc420
path: msvc420
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
# Use minimum supported version
cmake-version: '3.15.x'
- name: Patch MSVC 4.2
run: |
tools/patch_c2.py msvc420/bin/C2.EXE
- name: Generate Entropy
shell: bash
run: |
# Get the first 8 characters of the SHA (enough for a decent seed)
SHA_PREFIX=$(echo "${{ github.sha }}" | cut -c 1-8)
tools/entropy.sh $((16#$SHA_PREFIX + ${{ matrix.instance }}))
- name: Build
shell: cmd
run: |
call .\msvc420\bin\VCVARS32.BAT x86
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DISLE_INCLUDE_ENTROPY=ON -G "NMake Makefiles"
cmake --build build
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Win32-Entropy-${{ matrix.instance }}
path: |
build/CONFIG.EXE
build/CONFIG.PDB
build/ISLE.EXE
build/ISLE.PDB
build/LEGO1.DLL
build/LEGO1.PDB
merge-entropy-artifacts:
name: 'Merge entropy artifacts'
runs-on: ubuntu-latest
needs: build-with-entropy
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: Win32-Entropy
pattern: Win32-Entropy-*
separate-directories: true
build:
name: 'MSVC 4.20'
runs-on: windows-latest
@ -164,6 +100,93 @@ jobs:
build/LEGO1.DLL
build/LEGO1.PDB
build-with-entropy:
name: 'MSVC 4.20 with entropy'
needs: [fetch-deps]
runs-on: windows-latest
strategy:
matrix:
instance: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: itsmattkc/msvc420
path: msvc420
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
# Use minimum supported version
cmake-version: '3.15.x'
- name: Patch MSVC 4.2
run: |
tools/patch_c2.py msvc420/bin/C2.EXE
- name: Generate Entropy
shell: bash
run: |
# Get the first 8 characters of the SHA (enough for a decent seed)
SHA_PREFIX=$(echo "${{ github.sha }}" | cut -c 1-8)
tools/entropy.sh $((16#$SHA_PREFIX + ${{ matrix.instance }}))
- name: Build
shell: cmd
run: |
call .\msvc420\bin\VCVARS32.BAT x86
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DISLE_INCLUDE_ENTROPY=ON -G "NMake Makefiles"
cmake --build build
- name: Restore cached original binaries
id: cache-original-binaries
uses: actions/cache/restore@v4
with:
enableCrossOsArchive: true
path: legobin
key: legobin
- name: Install python packages
shell: bash
run: |
pip install -r tools/requirements.txt
- name: Detect binaries
run: |
reccmp-project detect --what original --search-path legobin
reccmp-project detect --what recompiled --search-path build
- name: Summarize Accuracy
shell: bash
run: |
reccmp-reccmp --target CONFIG --json CONFIGPROGRESS.json
reccmp-reccmp --target ISLE --json ISLEPROGRESS.json
reccmp-reccmp --target LEGO1 --json LEGO1PROGRESS.json
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: Win32-Entropy-${{ matrix.instance }}
path: |
CONFIGPROGRESS.json
ISLEPROGRESS.json
LEGO1PROGRESS.json
merge-entropy-artifacts:
name: 'Merge entropy artifacts'
runs-on: ubuntu-latest
needs: build-with-entropy
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: Win32-Entropy
pattern: Win32-Entropy-*
separate-directories: true
compare:
name: Compare with master
needs: [build, merge-entropy-artifacts, fetch-deps]
@ -175,11 +198,6 @@ jobs:
with:
python-version: '3.12'
- uses: actions/download-artifact@main
with:
name: Win32
path: build
- uses: actions/download-artifact@main
with:
name: Win32-Entropy
@ -198,17 +216,12 @@ jobs:
run: |
pip install -r tools/requirements.txt
- name: Detect binaries
run: |
reccmp-project detect --what original --search-path legobin
reccmp-project detect --what recompiled --search-path build
- name: Summarize Accuracy
- name: Denoise Accuracy
shell: bash
run: |
reccmp-reccmp -S CONFIGPROGRESS.SVG --svg-icon assets/config.png --target CONFIG --json CONFIGPROGRESS.json
reccmp-reccmp -S ISLEPROGRESS.SVG --svg-icon assets/isle.png --target ISLE --json ISLEPROGRESS.json
reccmp-reccmp -S LEGO1PROGRESS.SVG --svg-icon assets/lego1.png --target LEGO1 --json LEGO1PROGRESS.json
reccmp-denoise --samples $(find build-entropy -type f -name "CONFIGPROGRESS.json") --output CONFIGPROGRESS.json
reccmp-denoise --samples $(find build-entropy -type f -name "ISLEPROGRESS.json") --output ISLEPROGRESS.json
reccmp-denoise --samples $(find build-entropy -type f -name "LEGO1PROGRESS.json") --output LEGO1PROGRESS.json
- name: Compare Accuracy With Current Master
shell: bash
@ -221,9 +234,9 @@ jobs:
curl -fLSs -o LEGO1PROGRESS-old.json $RELEASE_URL/LEGO1PROGRESS.json || echo "" >LEGO1PROGRESS-old.json
# Compare with current master
reccmp-reccmp --target CONFIG --diff CONFIGPROGRESS-old.json || echo "Current master not found"
reccmp-reccmp --target ISLE --diff ISLEPROGRESS-old.json || echo "Current master not found"
reccmp-reccmp --target LEGO1 --diff LEGO1PROGRESS-old.json || echo "Current master not found"
reccmp-denoise --diff CONFIGPROGRESS-old.json CONFIGPROGRESS.json
reccmp-denoise --diff ISLEPROGRESS-old.json ISLEPROGRESS.json
reccmp-denoise --diff LEGO1PROGRESS-old.json LEGO1PROGRESS.json
- name: Test Exports
shell: bash

View File

@ -1,3 +1,3 @@
reccmp @ git+https://github.com/isledecomp/reccmp
reccmp @ git+https://github.com/disinvite/reccmp@pr-denoise
clang==16.*
pyyaml