Fix github action

This commit is contained in:
Kyle
2022-10-30 17:36:11 +08:00
parent 809fabca92
commit acf40caafa
3 changed files with 30 additions and 11 deletions
+27 -9
View File
@@ -13,26 +13,30 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: os: [ubuntu-latest, windows-latest]
- ubuntu-18.04
- windows-latest
include: include:
- os: ubuntu-18.04 - os: ubuntu-latest
os_short: linux os_short: linux
- os: windows-latest - os: windows-latest
os_short: windows os_short: windows
steps: steps:
- name: Setup Python 3.8 - name: Setup Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.8 python-version: 3.9
- name: Checkout AMBuild
uses: actions/checkout@v2
with:
repository: alliedmodders/ambuild
path: ambuild
- name: Install AMBuild - name: Install AMBuild
run: | uses: BSFishy/pip-action@v1
python -m pip install --upgrade pip setuptools wheel with:
pip install git+https://github.com/alliedmodders/ambuild packages: ./ambuild
- name: Install dependencies (Linux) - name: Install dependencies (Linux)
if: runner.os == 'Linux' if: runner.os == 'Linux'
@@ -49,6 +53,20 @@ jobs:
clang --version clang --version
clang++ --version clang++ --version
- name: Find Visual C++ compilers and make all environment variables global (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
:: See https://github.com/microsoft/vswhere/wiki/Find-VC
for /f "usebackq delims=*" %%i in (`vswhere -latest -property installationPath`) do (
call "%%i"\Common7\Tools\vsdevcmd.bat -arch=x86 -host_arch=x64
)
:: Loop over all environment variables and make them global.
for /f "delims== tokens=1,2" %%a in ('set') do (
echo>>"%GITHUB_ENV%" %%a=%%b
)
- name: Checkout MetaMod - name: Checkout MetaMod
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
+2 -2
View File
@@ -178,13 +178,13 @@ class ExtensionConfig(object):
'-fvisibility=hidden', '-fvisibility=hidden',
] ]
cxx.cxxflags += [ cxx.cxxflags += [
'-std=c++11', '-std=c++14',
'-fno-exceptions', '-fno-exceptions',
'-fno-threadsafe-statics', '-fno-threadsafe-statics',
'-Wno-non-virtual-dtor', '-Wno-non-virtual-dtor',
'-Wno-overloaded-virtual', '-Wno-overloaded-virtual',
'-Wno-null-dereference',
'-fvisibility-inlines-hidden', '-fvisibility-inlines-hidden',
'-fpermissive',
] ]
cxx.linkflags += ['-m32'] cxx.linkflags += ['-m32']
+1
View File
@@ -33,6 +33,7 @@ for sdk_name in Extension.sdks:
elif sys.platform == 'linux' or sys.platform == 'linux2': elif sys.platform == 'linux' or sys.platform == 'linux2':
binary.compiler.cxxflags += [ '-std=c++14' ] binary.compiler.cxxflags += [ '-std=c++14' ]
binary.compiler.cxxflags += [ '-Wno-class-memaccess' ] binary.compiler.cxxflags += [ '-Wno-class-memaccess' ]
binary.compiler.cxxflags += [ '-Wno-class-varargs' ]
binary.compiler.cxxflags += [ '-include', 'mathlib/mathlib.h' ] binary.compiler.cxxflags += [ '-include', 'mathlib/mathlib.h' ]
Extension.extensions = builder.Add(project) Extension.extensions = builder.Add(project)