mirror of
https://github.com/srcdslab/sm-ext-cssfixes.git
synced 2025-12-06 18:18:24 +00:00
feat: add github ci
This commit is contained in:
parent
cd2d93cde7
commit
108f39d208
112
.github/workflows/ci.yml
vendored
Normal file
112
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-20.04]
|
||||
sourcemod-version: [1.11-dev]
|
||||
include:
|
||||
- os: ubuntu-20.04
|
||||
target-archs: x86,x86_64
|
||||
sdks: css
|
||||
|
||||
steps:
|
||||
- name: Install Linux packages
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -yq --no-install-recommends g++-multilib
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: extension
|
||||
|
||||
- name: Checkout SourceMod
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: alliedmodders/sourcemod
|
||||
ref: ${{ matrix.sourcemod-version }}
|
||||
path: sourcemod
|
||||
submodules: recursive
|
||||
|
||||
- name: Checkout AMBuild
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: alliedmodders/ambuild
|
||||
path: ambuild
|
||||
|
||||
- name: Checkout sm-ext-common
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: srcdslab/sm-ext-common
|
||||
path: sourcemod/extensions/sm-ext-common
|
||||
|
||||
- name: Install sourcemod dependencies
|
||||
run: |
|
||||
bash sourcemod/tools/checkout-deps.sh -m -s ${{ matrix.sdks }}
|
||||
|
||||
- name: Install AMBuild
|
||||
uses: BSFishy/pip-action@v1
|
||||
with:
|
||||
packages: ./ambuild
|
||||
|
||||
- name: Build
|
||||
working-directory: extension
|
||||
shell: bash
|
||||
env:
|
||||
BREAKPAD_SYMBOL_SERVER: ${{ secrets.BREAKPAD_SYMBOL_SERVER }}
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
python ../configure.py --enable-optimize --targets=${{ matrix.target-archs }} --sdks=${{ matrix.sdks }}
|
||||
ambuild
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ runner.os }}
|
||||
path: extension/build/package
|
||||
|
||||
|
||||
release:
|
||||
name: Release
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
version=`echo $GITHUB_REF | sed "s/refs\/tags\///"`
|
||||
if [ -d "./Linux/" ]; then
|
||||
cd ./Linux/
|
||||
tar -czf ../${{ github.event.repository.name }}-${version}-linux.tar.gz -T <(\ls -1)
|
||||
fi
|
||||
if [ -d "./macOS/" ]; then
|
||||
cd ./macOS/
|
||||
tar -czf ../${{ github.event.repository.name }}-${version}-mac.tar.gz -T <(\ls -1)
|
||||
fi
|
||||
if [ -d "./Windows/" ]; then
|
||||
cd ./Windows/
|
||||
tar -czf ../${{ github.event.repository.name }}-${version}-windows.tar.gz -T <(\ls -1)
|
||||
fi
|
||||
|
||||
- name: Release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: '*.tar.gz'
|
||||
tag: ${{ github.ref }}
|
||||
file_glob: true
|
||||
@ -30,11 +30,6 @@ class SDK(object):
|
||||
WinOnly = ['windows']
|
||||
WinLinux = ['windows', 'linux']
|
||||
WinLinuxMac = ['windows', 'linux', 'mac']
|
||||
CSGO = {
|
||||
'windows': ['x86'],
|
||||
'linux': ['x86', 'x86_64'],
|
||||
'mac': ['x86_64']
|
||||
}
|
||||
|
||||
PossibleSDKs = {
|
||||
'css': SDK('HL2SDKCSS', '2.css', '6', 'CSS', WinLinuxMac, 'css'),
|
||||
|
||||
@ -39,6 +39,10 @@
|
||||
|
||||
#include "smsdk_ext.h"
|
||||
|
||||
#define DETOUR_DECL_STATIC9(name, ret, p1type, p1name, p2type, p2name, p3type, p3name, p4type, p4name, p5type, p5name, p6type, p6name, p7type, p7name, p8type, p8name, p9type, p9name) \
|
||||
ret (*name##_Actual)(p1type, p2type, p3type, p4type, p5type, p6type, p7type, p8type, p9type) = NULL; \
|
||||
ret name(p1type p1name, p2type p2name, p3type p3name, p4type p4name, p5type p5name, p6type p6name, p7type p7name, p8type p8name, p9type p9name)
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sample implementation of the SDK Extension.
|
||||
|
||||
103
version.rc
Normal file
103
version.rc
Normal file
@ -0,0 +1,103 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
//#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
#include <sourcemod_version.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION SM_VERSION_FILE
|
||||
PRODUCTVERSION SM_VERSION_FILE
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "000004b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "SourceMod Extension"
|
||||
VALUE "FileDescription", "SourceMod Extension"
|
||||
VALUE "FileVersion", SM_VERSION_STRING
|
||||
VALUE "InternalName", "SourceMod Extension"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2004-2022, AlliedModders LLC"
|
||||
VALUE "OriginalFilename", BINARY_NAME
|
||||
VALUE "ProductName", "SourceMod Extension"
|
||||
VALUE "ProductVersion", SM_VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
Loading…
Reference in New Issue
Block a user