Skip to content

Implement miscellaneous utility functions #582

Implement miscellaneous utility functions

Implement miscellaneous utility functions #582

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
Build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
environment:
name: gist-environment
deployment: false
strategy:
fail-fast: false
matrix:
platform:
- { name: MinGW, os: ubuntu-latest, cmake-args: '-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/mingw32.cmake', werror: true }
- { name: MSVC, os: windows-latest, werror: true }
- { name: MSVC5, os: windows-2025-vs2026, msvc5: true, cmake-args: '-DREC2_MATCHING=TRUE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl', werror: false }
steps:
- name: Fetch rec2 sources
uses: actions/checkout@v6
with:
submodules: true
- name: Fetch MSVC11 (Visual C++ 97 SP3)
uses: actions/checkout@v6
if: ${{ matrix.platform.msvc5 }}
with:
repository: archaic-msvc/msvc500sp3
path: msvc500
- name: Setup MSVC11 (Visual C++ 97 SP3)
if: ${{ matrix.platform.msvc5 }}
shell: cmd
run: |
echo INCLUDE=${{ github.workspace }}\msvc500\include;${{ github.workspace }}\msvc500\atl\include;${{ github.workspace }}\msvc500\mfc\include>>%GITHUB_ENV%
echo LIB=${{ github.workspace }}\msvc500\lib;${{ github.workspace }}\msvc500\mfc\lib>>%GITHUB_ENV%
echo ${{ github.workspace }}\msvc500\bin>>%GITHUB_PATH%
echo ${{ github.workspace }}\msvc500\redist>>%GITHUB_PATH%
- name: Setup Ninja
uses: ./.github/actions/setup-ninja
- name: Setup modern MSVC
uses: TheMrMilchmann/setup-msvc-dev@v4
if: ${{ matrix.platform.name == 'MSVC' }}
with:
arch: x86
- name: Install MinGW
if: ${{ matrix.platform.name == 'MinGW' }}
run: |
sudo apt-get update
sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686
- name: CMake (configure)
run: |
cmake -S . -B build -GNinja ${{ matrix.platform.cmake-args }} -DREC2_VENDORED=ON -DREC2_WERROR=${{ (matrix.platform.werror && 'ON') || 'OFF' }}
- name: CMake (build)
run: |
cmake --build build ${{ matrix.platform.build-args }}
- name: Download binaries for reccmp
uses: actions/setup-python@main
with:
python-version: 3.x
- name: Download binaries for reccmp
if: ${{ matrix.platform.msvc5 }}
shell: sh
run: |
mkdir originals
curl -fLSs -o d3d.bdd.txt https://gist.githubusercontent.com/madebr/92b121cfd427c51b771fb614b4c893f4/raw/d3d.bdd.txt
python .github/binendec.py -D -i d3d.bdd.txt -o originals/d3d.bdd
curl -fLSs -o CARMA2_HW.EXE.txt https://gist.githubusercontent.com/madebr/92b121cfd427c51b771fb614b4c893f4/raw/CARMA2_HW.EXE.txt
python .github/binendec.py -D -i CARMA2_HW.EXE.txt -o originals/CARMA2_HW.EXE
curl -fLSs -o carma2.exe.txt https://gist.githubusercontent.com/madebr/92b121cfd427c51b771fb614b4c893f4/raw/carma2.exe.txt
python .github/binendec.py -D -i carma2.exe.txt -o originals/carma2.exe
- name: Run reccmp
uses: ./.github/actions/reccmp
if: ${{ matrix.platform.msvc5 }}
with:
root-repo: madebr/rec2
root-branch: master
gist-repo: madebr/92b121cfd427c51b771fb614b4c893f4
target: CARMA2_HW
original-search-path: '${{ github.workspace }}/originals'
working-directory: '${{ github.workspace }}/build'
gist-token: ${{ secrets.GIST_TOKEN }}