Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Normalize text files to LF by default to avoid cross-platform line-ending churn
* text=auto eol=lf

# Keep Windows-native scripts/projects in CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcproj text eol=crlf
*.props text eol=crlf
*.targets text eol=crlf

# Ensure source and build scripts stay LF
*.lua text eol=lf
*.c text eol=lf
*.cc text eol=lf
*.cpp text eol=lf
*.h text eol=lf
*.hpp text eol=lf
*.cmake text eol=lf
CMakeLists.txt text eol=lf
*.sh text eol=lf
*.py text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.json text eol=lf
*.toml text eol=lf
310 changes: 154 additions & 156 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,156 +1,154 @@
name: build

permissions:
contents: write

on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master

jobs:
compile:
env:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-bincache
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.vcpkg-bincache,readwrite
strategy:
fail-fast: false
matrix:
include:
- { os: windows-2022, target: windows, platform: win32-x64 }
- { os: ubuntu-24.04, target: linux, platform: linux-x64 }
- { os: macos-14, target: macos, platform: macos-x64 }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Restore vcpkg binary cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.vcpkg-bincache
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'CMakeLists.txt', 'cmake/custom-triplets/**', 'cmake/ports/**') }}
restore-keys: |
${{ runner.os }}-vcpkg-
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.31.6 # <--= optional, stick to exactly 3.25.2 version
ninjaVersion: 1.11.1 # <--= optional, stick to exactly 1.11.1 version
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Restore from cache and setup vcpkg executable and data files.
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'

- name: Run CMake+vcpkg+Ninja+CTest to build packages and generate/build/test the code.
uses: lukka/run-cmake@v10
with:
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DCMAKE_OSX_ARCHITECTURES=x86_64']"
buildPreset: 'ninja-vcpkg-release-dbg'

- name: CMake install
run: |
cmake --build ./builds/ninja-multi-vcpkg --config RelWithDebInfo --target install

- name: Clean Up linux
if: ${{ matrix.target == 'linux' }}
run: |
rm -rf ${{ github.workspace }}/Mod/bin64/windows
rm -rf ${{ github.workspace }}/Mod/bin64/osx

- name: Clean Up windows
if: ${{ matrix.target == 'windows' }}
run: |
rm -r ${{ github.workspace }}/Mod/bin64/osx
rm -r ${{ github.workspace }}/Mod/bin64/linux

- name: Clean Up macos
if: ${{ matrix.target == 'macos' }}
run: |
rm -rf ${{ github.workspace }}/Mod/bin64/windows
rm -r ${{ github.workspace }}/Mod/bin64/linux

- name: Archive Release
uses: thedoctor0/zip-release@0.7.5
with:
path: ./Mod
filename: ${{ matrix.target }}_Mod.zip
directory: ${{ github.workspace }}

- name: Upload packaged mod
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}-mod-zip
path: ${{ github.workspace }}/${{ matrix.target }}_Mod.zip
if-no-files-found: error

publish-release:
needs: compile
if: startsWith(github.ref, 'refs/tags/')
strategy:
fail-fast: false
matrix:
include:
- { os: windows-2022, target: windows, platform: win32-x64 }
- { os: ubuntu-24.04, target: linux, platform: linux-x64 }
- { os: macos-14, target: macos, platform: macos-x64 }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Download packaged mod
uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}-mod-zip
path: ${{ github.workspace }}

- name: Publish release assets
uses: ncipollo/release-action@v1.14.0
with:
artifacts: ${{ github.workspace }}/${{ matrix.target }}_Mod.zip
allowUpdates: true

publish-preview:
needs: compile
if: ${{ github.ref == 'refs/heads/master' }}
strategy:
fail-fast: false
matrix:
include:
- { os: windows-2022, target: windows, platform: win32-x64 }
- { os: ubuntu-24.04, target: linux, platform: linux-x64 }
- { os: macos-14, target: macos, platform: macos-x64 }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Download packaged mod
uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}-mod-zip
path: ${{ github.workspace }}

- name: Publish preview assets
uses: ncipollo/release-action@v1.14.0
with:
artifacts: ${{ github.workspace }}/${{ matrix.target }}_Mod.zip
allowUpdates: true
prerelease: true
makeLatest: true
tag: "preview"
commit: ${{ github.sha }}
name: build

permissions:
contents: write

on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master

jobs:
compile:
env:
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/.vcpkg-bincache
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/.vcpkg-bincache,readwrite
strategy:
fail-fast: false
matrix:
include:
- { os: windows-2022, target: windows, platform: win32-x64 }
- { os: ubuntu-24.04, target: linux, platform: linux-x64 }
- { os: macos-14, target: macos, platform: macos-x64 }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Restore vcpkg binary cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.vcpkg-bincache
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'CMakeLists.txt', 'cmake/custom-triplets/**', 'cmake/ports/**') }}
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.31.6 # <--= optional, stick to exactly 3.25.2 version
ninjaVersion: 1.11.1 # <--= optional, stick to exactly 1.11.1 version
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Restore from cache and setup vcpkg executable and data files.
uses: lukka/run-vcpkg@v11
with:
vcpkgJsonGlob: 'vcpkg.json'

- name: Run CMake+vcpkg+Ninja+CTest to build packages and generate/build/test the code.
uses: lukka/run-cmake@v10
with:
configurePreset: 'ninja-multi-vcpkg'
configurePresetAdditionalArgs: "['-DCMAKE_OSX_ARCHITECTURES=x86_64']"
buildPreset: 'ninja-vcpkg-release-dbg'

- name: CMake install
run: |
cmake --build ./builds/ninja-multi-vcpkg --config RelWithDebInfo --target install

- name: Clean Up linux
if: ${{ matrix.target == 'linux' }}
run: |
rm -rf ${{ github.workspace }}/Mod/bin64/windows
rm -rf ${{ github.workspace }}/Mod/bin64/osx

- name: Clean Up windows
if: ${{ matrix.target == 'windows' }}
run: |
rm -r ${{ github.workspace }}/Mod/bin64/osx
rm -r ${{ github.workspace }}/Mod/bin64/linux

- name: Clean Up macos
if: ${{ matrix.target == 'macos' }}
run: |
rm -rf ${{ github.workspace }}/Mod/bin64/windows
rm -r ${{ github.workspace }}/Mod/bin64/linux

- name: Archive Release
uses: thedoctor0/zip-release@0.7.5
with:
path: ./Mod
filename: ${{ matrix.target }}_Mod.zip
directory: ${{ github.workspace }}

- name: Upload packaged mod
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}-mod-zip
path: ${{ github.workspace }}/${{ matrix.target }}_Mod.zip
if-no-files-found: error

publish-release:
needs: compile
if: startsWith(github.ref, 'refs/tags/')
strategy:
fail-fast: false
matrix:
include:
- { os: windows-2022, target: windows, platform: win32-x64 }
- { os: ubuntu-24.04, target: linux, platform: linux-x64 }
- { os: macos-14, target: macos, platform: macos-x64 }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Download packaged mod
uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}-mod-zip
path: ${{ github.workspace }}

- name: Publish release assets
uses: ncipollo/release-action@v1.14.0
with:
artifacts: ${{ github.workspace }}/${{ matrix.target }}_Mod.zip
allowUpdates: true

publish-preview:
needs: compile
if: ${{ github.ref == 'refs/heads/master' }}
strategy:
fail-fast: false
matrix:
include:
- { os: windows-2022, target: windows, platform: win32-x64 }
- { os: ubuntu-24.04, target: linux, platform: linux-x64 }
- { os: macos-14, target: macos, platform: macos-x64 }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

- name: Download packaged mod
uses: actions/download-artifact@v4
with:
name: ${{ matrix.target }}-mod-zip
path: ${{ github.workspace }}

- name: Publish preview assets
uses: ncipollo/release-action@v1.14.0
with:
artifacts: ${{ github.workspace }}/${{ matrix.target }}_Mod.zip
allowUpdates: true
prerelease: true
makeLatest: true
tag: "preview"
commit: ${{ github.sha }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ cmake-build-debug/

vcpkg_installed/
src/missfunc.h
src/modinfo.hpp
src/signatures.hpp
/CMakeFiles
Mod/scripts/jit
.venv/
.venv/
cmake/GameDir.cmake
Mod/**/*.dll
Loading
Loading