mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-06 18:18:23 +00:00
Update sdk static libs (#349)
This commit is contained in:
commit
19e59dc14c
86
.github/workflows/ci.yml
vendored
Normal file
86
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
name: Compilation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-22.04, windows-2022]
|
||||||
|
include:
|
||||||
|
- os: ubuntu-22.04
|
||||||
|
cc: clang
|
||||||
|
cxx: clang++
|
||||||
|
- os: windows-2022
|
||||||
|
cc: msvc
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
name: ${{ matrix.os }} - ${{ matrix.cc }}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Linux dependencies
|
||||||
|
if: startsWith(runner.os, 'Linux')
|
||||||
|
run: |
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends \
|
||||||
|
gcc-multilib g++-multilib libstdc++6 lib32stdc++6 \
|
||||||
|
libc6-dev libc6-dev-i386 linux-libc-dev \
|
||||||
|
linux-libc-dev:i386 lib32z1-dev ${{ matrix.cc }}
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
name: Setup Python 3.12
|
||||||
|
with:
|
||||||
|
python-version: 3.12
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
name: Repository checkout
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
path: repository
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
name: AMBuild checkout
|
||||||
|
with:
|
||||||
|
repository: alliedmodders/ambuild
|
||||||
|
ref: fe8c99ccd24fa926bf6ac6b9935a5fc03df06a72
|
||||||
|
fetch-depth: 0
|
||||||
|
submodules: recursive
|
||||||
|
path: ambuild
|
||||||
|
|
||||||
|
- name: Setup AMBuild
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd "${{ env.CACHE_PATH }}"
|
||||||
|
python -m pip install ./ambuild
|
||||||
|
|
||||||
|
- name: Select clang compiler
|
||||||
|
if: startsWith(runner.os, 'Linux')
|
||||||
|
run: |
|
||||||
|
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV
|
||||||
|
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
|
||||||
|
${{ matrix.cc }} --version
|
||||||
|
${{ matrix.cxx }} --version
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
shell: bash
|
||||||
|
working-directory: repository
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
python ../configure.py
|
||||||
|
ambuild
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: libs_${{ runner.os }}
|
||||||
|
path: repository/build/lib
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -22,6 +22,7 @@
|
|||||||
#include "tier0/vprof_telemetry.h"
|
#include "tier0/vprof_telemetry.h"
|
||||||
#include <Color.h>
|
#include <Color.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <cstdlib>
|
||||||
#include "tier0/dbg.h"
|
#include "tier0/dbg.h"
|
||||||
#include "tier0/mem.h"
|
#include "tier0/mem.h"
|
||||||
#include "utlbuffer.h"
|
#include "utlbuffer.h"
|
||||||
@ -1385,14 +1386,7 @@ float KeyValues::GetFloat( const char *keyName, float defaultValue )
|
|||||||
switch ( dat->m_iDataType )
|
switch ( dat->m_iDataType )
|
||||||
{
|
{
|
||||||
case TYPE_STRING:
|
case TYPE_STRING:
|
||||||
return (float)atof(dat->m_sValue);
|
return std::strtof(dat->m_sValue, nullptr);
|
||||||
case TYPE_WSTRING:
|
|
||||||
#ifdef WIN32
|
|
||||||
return (float) _wtof(dat->m_wsValue); // no wtof
|
|
||||||
#else
|
|
||||||
Assert( !"impl me" );
|
|
||||||
return 0.0;
|
|
||||||
#endif
|
|
||||||
case TYPE_FLOAT:
|
case TYPE_FLOAT:
|
||||||
return dat->m_flValue;
|
return dat->m_flValue;
|
||||||
case TYPE_INT:
|
case TYPE_INT:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user