mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 23:01:16 +00:00
Update build action
This commit is contained in:
parent
21422155dc
commit
6c209ac114
268
.github/workflows/build.yml
vendored
268
.github/workflows/build.yml
vendored
@ -1,6 +1,9 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fetch-deps:
|
fetch-deps:
|
||||||
@ -17,12 +20,15 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
toolchain:
|
toolchain:
|
||||||
- { name: 'MSVC', shell: 'sh', setup-cmake: true, setup-ninja: true, setup-msvc: true }
|
- { name: 'MSVC', shell: 'sh', setup-cmake: true, setup-ninja: true, setup-msvc: true }
|
||||||
- { name: 'msys2 mingw32', shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, clang-tidy: true, werror: true }
|
- { name: 'msys2 mingw32', shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686, clang-tidy: true, werror: true }
|
||||||
- { name: 'msys2 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, werror: true, no-dx5-libs: true }
|
- { name: 'msys2 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, werror: true, no-dx5-libs: true }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up MSYS2
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup MSYS2
|
||||||
if: ${{ !!matrix.toolchain.msystem }}
|
if: ${{ !!matrix.toolchain.msystem }}
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
@ -33,21 +39,19 @@ jobs:
|
|||||||
${{ matrix.toolchain.msys-env }}-ninja
|
${{ matrix.toolchain.msys-env }}-ninja
|
||||||
${{ matrix.toolchain.msys-env }}-clang-tools-extra
|
${{ matrix.toolchain.msys-env }}-clang-tools-extra
|
||||||
|
|
||||||
- name: Setup cmake
|
- name: Setup CMake
|
||||||
if: matrix.toolchain.setup-cmake
|
if: matrix.toolchain.setup-cmake
|
||||||
uses: jwlawson/actions-setup-cmake@v2
|
uses: jwlawson/actions-setup-cmake@v2
|
||||||
|
|
||||||
- name: Setup ninja
|
- name: Setup ninja
|
||||||
if: matrix.toolchain.setup-ninja
|
if: matrix.toolchain.setup-ninja
|
||||||
uses: ashutoshvarma/setup-ninja@master
|
uses: larziwau/gha-setup-ninja@master
|
||||||
|
|
||||||
- name: Setup vcvars
|
- name: Setup vcvars
|
||||||
if: matrix.toolchain.setup-msvc
|
if: matrix.toolchain.setup-msvc
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
with:
|
with:
|
||||||
arch: amd64_x86 # Use the 64-bit x64-native cross tools to build 32-bit x86 code
|
arch: amd64_x86
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@ -60,126 +64,129 @@ jobs:
|
|||||||
cmake --build build -- -k0
|
cmake --build build -- -k0
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: 'MSVC 4.20'
|
name: MSVC 4.20
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout MSVC repository
|
||||||
with:
|
uses: actions/checkout@v4
|
||||||
repository: itsmattkc/msvc420
|
with:
|
||||||
path: msvc420
|
repository: itsmattkc/MSVC420
|
||||||
|
path: msvc420
|
||||||
|
|
||||||
- name: Setup cmake
|
- name: Setup CMake
|
||||||
uses: jwlawson/actions-setup-cmake@v2
|
uses: jwlawson/actions-setup-cmake@v2
|
||||||
with:
|
with:
|
||||||
# Use minimum supported version
|
cmake-version: '3.31.x'
|
||||||
cmake-version: '3.15.x'
|
|
||||||
|
|
||||||
- name: Patch MSVC 4.2
|
- name: Patch MSVC
|
||||||
run: |
|
run: |
|
||||||
tools/patch_c2.py msvc420/bin/C2.EXE
|
tools/patch_c2.py msvc420/bin/C2.EXE
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
call .\msvc420\bin\VCVARS32.BAT x86
|
call .\msvc420\bin\VCVARS32.BAT x86
|
||||||
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
|
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
|
||||||
cmake --build build
|
cmake --build build
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Win32
|
name: Win32
|
||||||
path: |
|
path: |
|
||||||
build/CONFIG.EXE
|
build/CONFIG.EXE
|
||||||
build/CONFIG.PDB
|
build/CONFIG.PDB
|
||||||
build/ISLE.EXE
|
build/ISLE.EXE
|
||||||
build/ISLE.PDB
|
build/ISLE.PDB
|
||||||
build/LEGO1.DLL
|
build/LEGO1.DLL
|
||||||
build/LEGO1.PDB
|
build/LEGO1.PDB
|
||||||
|
|
||||||
compare:
|
compare:
|
||||||
name: Compare with master
|
name: Compare with master
|
||||||
needs: [build, fetch-deps]
|
needs: [build, fetch-deps]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@main
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-python@v5
|
- name: Setup Python
|
||||||
with:
|
uses: actions/setup-python@v5
|
||||||
python-version: '3.12'
|
with:
|
||||||
|
python-version: '3.13'
|
||||||
|
|
||||||
- uses: actions/download-artifact@main
|
- name: Download artifact
|
||||||
with:
|
uses: actions/download-artifact@v4
|
||||||
name: Win32
|
with:
|
||||||
path: build
|
name: Win32
|
||||||
|
path: build
|
||||||
|
|
||||||
- name: Restore cached original binaries
|
- name: Restore cached original binaries
|
||||||
id: cache-original-binaries
|
id: cache-original-binaries
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
enableCrossOsArchive: true
|
enableCrossOsArchive: true
|
||||||
path: legobin
|
path: legobin
|
||||||
key: legobin
|
key: legobin
|
||||||
|
|
||||||
- name: Install python packages
|
- name: Setup Python modules
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
pip install -r tools/requirements.txt
|
pip install -r tools/requirements.txt
|
||||||
|
|
||||||
- name: Detect binaries
|
- name: Detect binaries
|
||||||
run: |
|
run: |
|
||||||
reccmp-project detect --what original --search-path legobin
|
reccmp-project detect --what original --search-path legobin
|
||||||
reccmp-project detect --what recompiled --search-path build
|
reccmp-project detect --what recompiled --search-path build
|
||||||
|
|
||||||
- name: Summarize Accuracy
|
- name: Summarize accuracy
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
reccmp-reccmp -S CONFIGPROGRESS.SVG --svg-icon assets/config.png --target CONFIG | tee CONFIGPROGRESS.TXT
|
reccmp-reccmp -S CONFIGPROGRESS.SVG --svg-icon assets/config.png --target CONFIG | tee CONFIGPROGRESS.TXT
|
||||||
reccmp-reccmp -S ISLEPROGRESS.SVG --svg-icon assets/isle.png --target ISLE | tee ISLEPROGRESS.TXT
|
reccmp-reccmp -S ISLEPROGRESS.SVG --svg-icon assets/isle.png --target ISLE | tee ISLEPROGRESS.TXT
|
||||||
reccmp-reccmp -S LEGO1PROGRESS.SVG --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
|
reccmp-reccmp -S LEGO1PROGRESS.SVG --svg-icon assets/lego1.png --target LEGO1 | tee LEGO1PROGRESS.TXT
|
||||||
|
|
||||||
- name: Compare Accuracy With Current Master
|
- name: Compare accuracy with current master
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Compare with current master
|
curl -fLSs -o CONFIGPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/CONFIGPROGRESS.TXT || echo "" >CONFIGPROGRESS-OLD.TXT
|
||||||
curl -fLSs -o CONFIGPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/CONFIGPROGRESS.TXT || echo "" >CONFIGPROGRESS-OLD.TXT
|
curl -fLSs -o ISLEPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/ISLEPROGRESS.TXT || echo "" >ISLEPROGRESS-OLD.TXT
|
||||||
curl -fLSs -o ISLEPROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/ISLEPROGRESS.TXT || echo "" >ISLEPROGRESS-OLD.TXT
|
curl -fLSs -o LEGO1PROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/LEGO1PROGRESS.TXT || echo "" >LEGO1PROGRESS-OLD.TXT
|
||||||
curl -fLSs -o LEGO1PROGRESS-OLD.TXT https://github.com/isledecomp/isle/releases/download/continuous/LEGO1PROGRESS.TXT || echo "" >LEGO1PROGRESS-OLD.TXT
|
|
||||||
|
|
||||||
diff -u0 CONFIGPROGRESS-OLD.TXT CONFIGPROGRESS.TXT || true
|
diff -u0 CONFIGPROGRESS-OLD.TXT CONFIGPROGRESS.TXT || true
|
||||||
diff -u0 ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
|
diff -u0 ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
|
||||||
diff -u0 LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
|
diff -u0 LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
|
||||||
|
|
||||||
- name: Test Exports
|
- name: Test exports
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
reccmp-verexp --target LEGO1
|
reccmp-verexp --target LEGO1
|
||||||
|
|
||||||
- name: Check Vtables
|
- name: Check vtables
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
reccmp-vtable --target CONFIG
|
reccmp-vtable --target CONFIG
|
||||||
reccmp-vtable --target ISLE
|
reccmp-vtable --target ISLE
|
||||||
reccmp-vtable --target LEGO1
|
reccmp-vtable --target LEGO1
|
||||||
|
|
||||||
- name: Check Variables
|
- name: Check variables
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
reccmp-datacmp --target CONFIG
|
reccmp-datacmp --target CONFIG
|
||||||
reccmp-datacmp --target ISLE
|
reccmp-datacmp --target ISLE
|
||||||
reccmp-datacmp --target LEGO1
|
reccmp-datacmp --target LEGO1
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Accuracy Report
|
name: Accuracy Report
|
||||||
path: |
|
path: |
|
||||||
CONFIGPROGRESS.*
|
CONFIGPROGRESS.*
|
||||||
ISLEPROGRESS.*
|
ISLEPROGRESS.*
|
||||||
LEGO1PROGRESS.*
|
LEGO1PROGRESS.*
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
name: Upload artifacts
|
name: Upload artifacts
|
||||||
@ -187,32 +194,35 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout uploadtool repository
|
||||||
with:
|
uses: actions/checkout@v4
|
||||||
repository: probonopd/uploadtool
|
with:
|
||||||
|
repository: probonopd/uploadtool
|
||||||
|
|
||||||
- uses: actions/download-artifact@main
|
- name: Download build artifact
|
||||||
with:
|
uses: actions/download-artifact@v4
|
||||||
name: Win32
|
with:
|
||||||
path: build
|
name: Win32
|
||||||
|
path: build
|
||||||
|
|
||||||
- uses: actions/download-artifact@main
|
- name: Download accuracy report artifact
|
||||||
with:
|
uses: actions/download-artifact@v4
|
||||||
name: Accuracy Report
|
with:
|
||||||
|
name: Accuracy Report
|
||||||
|
|
||||||
- name: Upload Continuous Release
|
- name: Upload continuous release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
|
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
|
||||||
run: |
|
run: |
|
||||||
./upload.sh \
|
./upload.sh \
|
||||||
build/CONFIG.EXE \
|
build/CONFIG.EXE \
|
||||||
build/ISLE.EXE \
|
build/ISLE.EXE \
|
||||||
build/LEGO1.DLL \
|
build/LEGO1.DLL \
|
||||||
CONFIGPROGRESS.* \
|
CONFIGPROGRESS.* \
|
||||||
ISLEPROGRESS.* \
|
ISLEPROGRESS.* \
|
||||||
LEGO1PROGRESS.*
|
LEGO1PROGRESS.*
|
||||||
|
|
||||||
curl -X POST -F key=$UPLOAD_KEY -F 'file=@CONFIGPROGRESS.SVG' https://legoisland.org/progress/
|
curl -X POST -F key=$UPLOAD_KEY -F 'file=@CONFIGPROGRESS.SVG' https://legoisland.org/progress/
|
||||||
curl -X POST -F key=$UPLOAD_KEY -F 'file=@ISLEPROGRESS.SVG' https://legoisland.org/progress/
|
curl -X POST -F key=$UPLOAD_KEY -F 'file=@ISLEPROGRESS.SVG' https://legoisland.org/progress/
|
||||||
curl -X POST -F key=$UPLOAD_KEY -F 'file=@LEGO1PROGRESS.SVG' https://legoisland.org/progress/
|
curl -X POST -F key=$UPLOAD_KEY -F 'file=@LEGO1PROGRESS.SVG' https://legoisland.org/progress/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user