Update actions (#1275)

* Update analyze action

* Update build action

* Update format action

* Update legobin action

* Update naming action
This commit is contained in:
larzie
2024-12-25 18:39:26 +03:00
committed by GitHub
parent 0f338a882b
commit 457300ddba
5 changed files with 227 additions and 203 deletions

View File

@@ -1,6 +1,9 @@
name: Analyze
on: [push, pull_request]
on:
push:
pull_request:
workflow_dispatch:
jobs:
decomplint-isle:
@@ -15,13 +18,15 @@ jobs:
- LEGO1
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Install python libraries
- name: Setup Python modules
run: |
pip install -r tools/requirements.txt

View File

@@ -1,6 +1,9 @@
name: Build
on: [push, pull_request]
on:
push:
pull_request:
workflow_dispatch:
jobs:
fetch-deps:
@@ -22,6 +25,9 @@ jobs:
- { name: 'msys2 clang32', shell: 'msys2 {0}', msystem: clang32, msys-env: mingw-w64-clang-i686, clang-tidy: true, werror: true, no-dx5-libs: true }
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup MSYS2
if: ${{ !!matrix.toolchain.msystem }}
uses: msys2/setup-msys2@v2
@@ -33,21 +39,19 @@ jobs:
${{ matrix.toolchain.msys-env }}-ninja
${{ matrix.toolchain.msys-env }}-clang-tools-extra
- name: Setup cmake
- name: Setup CMake
if: matrix.toolchain.setup-cmake
uses: jwlawson/actions-setup-cmake@v2
- name: Setup ninja
if: matrix.toolchain.setup-ninja
uses: ashutoshvarma/setup-ninja@master
uses: larziwau/gha-setup-ninja@master
- name: Setup vcvars
if: matrix.toolchain.setup-msvc
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86 # Use the 64-bit x64-native cross tools to build 32-bit x86 code
- uses: actions/checkout@v4
arch: amd64_x86
- name: Build
run: |
@@ -60,24 +64,25 @@ jobs:
cmake --build build -- -k0
build:
name: 'MSVC 4.20'
name: MSVC 4.20
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: Checkout MSVC repository
uses: actions/checkout@v4
with:
repository: itsmattkc/msvc420
repository: itsmattkc/MSVC420
path: msvc420
- name: Setup cmake
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
# Use minimum supported version
cmake-version: '3.15.x'
cmake-version: '3.31.x'
- name: Patch MSVC 4.2
- name: Patch MSVC
run: |
tools/patch_c2.py msvc420/bin/C2.EXE
@@ -88,8 +93,8 @@ jobs:
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
cmake --build build
- name: Upload Artifact
uses: actions/upload-artifact@main
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Win32
path: |
@@ -105,13 +110,16 @@ jobs:
needs: [build, fetch-deps]
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- uses: actions/download-artifact@main
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: Win32
path: build
@@ -124,7 +132,7 @@ jobs:
path: legobin
key: legobin
- name: Install python packages
- name: Setup Python modules
shell: bash
run: |
pip install -r tools/requirements.txt
@@ -134,17 +142,16 @@ jobs:
reccmp-project detect --what original --search-path legobin
reccmp-project detect --what recompiled --search-path build
- name: Summarize Accuracy
- name: Summarize accuracy
shell: bash
run: |
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 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
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 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
@@ -153,27 +160,27 @@ jobs:
diff -u0 ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
diff -u0 LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
- name: Test Exports
- name: Test exports
shell: bash
run: |
reccmp-verexp --target LEGO1
- name: Check Vtables
- name: Check vtables
shell: bash
run: |
reccmp-vtable --target CONFIG
reccmp-vtable --target ISLE
reccmp-vtable --target LEGO1
- name: Check Variables
- name: Check variables
shell: bash
run: |
reccmp-datacmp --target CONFIG
reccmp-datacmp --target ISLE
reccmp-datacmp --target LEGO1
- name: Upload Artifact
uses: actions/upload-artifact@main
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Accuracy Report
path: |
@@ -187,20 +194,23 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'isledecomp/isle' }}
steps:
- uses: actions/checkout@v4
- name: Checkout uploadtool repository
uses: actions/checkout@v4
with:
repository: probonopd/uploadtool
- uses: actions/download-artifact@main
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: Win32
path: build
- uses: actions/download-artifact@main
- name: Download accuracy report artifact
uses: actions/download-artifact@v4
with:
name: Accuracy Report
- name: Upload Continuous Release
- name: Upload continuous release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}

View File

@@ -1,6 +1,9 @@
name: Format
on: [push, pull_request]
on:
push:
pull_request:
workflow_dispatch:
jobs:
clang-format:
@@ -8,7 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
- name: Run clang-format
run: |

View File

@@ -2,12 +2,12 @@ name: Download legobin
on:
workflow_call:
workflow_dispatch:
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- name: Restore cached original binaries
id: cache-original-binaries
uses: actions/cache/restore@v4
@@ -16,7 +16,7 @@ jobs:
path: legobin
key: legobin
- name: Download original island binaries
- name: Download original Island binaries
if: ${{ !steps.cache-original-binaries.outputs.cache-hit }}
run: |
wget https://legoisland.org/download/CONFIG.EXE --directory-prefix=legobin

View File

@@ -1,6 +1,9 @@
name: Naming
on: [push, pull_request]
on:
push:
pull_request:
workflow_dispatch:
jobs:
ncc:
@@ -8,18 +11,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
- name: Install LLVM and Clang
- name: Setup LLVM and Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: '16'
- uses: actions/setup-python@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Install python libraries
- name: Setup Python modules
run: |
pip install -r tools/requirements.txt