Update LogApi.cpp #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build C/C++ | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
linux: | |
name: Linux Build | |
runs-on: ubuntu-latest | |
container: centos:7 | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 | |
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | |
steps: | |
- name: Setup Checkout | |
uses: actions/checkout@v3 | |
- name: Fix CentOS 7 EOL repositories | |
run: | | |
sed -i.bak 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* | |
sed -i.bak 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* | |
- name: Update cache | |
run: yes | yum -y --assumeyes makecache | |
- name: Install build dependencies | |
run: yes | yum -y --assumeyes install @'Development Tools' wget glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 libgcc.i686 libstdc++-static.i686 libcurl-devel.i686 openssl-devel.i686 libzip-devel.i686 | |
- name: Run build | |
working-directory: ./LogApi | |
run: | | |
export CPATH=$CPATH:/usr/include/c++/4.8.5/i686-redhat-linux | |
make | |
- name: Move release file to publish | |
run: | | |
# Make Accuracy Fix path | |
mkdir -p publish/addons/logapi/dlls | |
# Copy released file to dlls | |
cp ./LogApi/Release/logapi_mm.so publish/addons/logapi/dlls | |
# Move settings file to folder | |
cp ./cstrike/addons/logapi/logapi.cfg publish/addons/logapi/logapi.cfg | |
cp ./cstrike/addons/logapi/events.json publish/addons/logapi/events.json | |
cp ./cstrike/addons/logapi/LogApi.php publish/addons/logapi/LogApi.php | |
- name: Deploy artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: linux32 | |
path: publish/* | |
windows: | |
name: Windows Build | |
runs-on: windows-latest | |
env: | |
SOLUTION_FILE_PATH: . | |
BUILD_CONFIGURATION: Release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Restore NuGet packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: nuget restore ${{env.SOLUTION_FILE_PATH}} | |
- name: Run Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} | |
- name: Move release file to publish | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
# Make publish directory | |
mkdir publish\addons\logapi\dlls | |
# Move released dll to publish | |
move ${{env.BUILD_CONFIGURATION}}\*.dll publish\addons\logapi\dlls | |
# Copy settings file to folder | |
cp ${{env.SOLUTION_FILE_PATH}}\cstrike\addons\logapi\logapi.cfg publish\addons\logapi\logapi.cfg | |
cp ${{env.SOLUTION_FILE_PATH}}\cstrike\addons\logapi\events.json publish\addons\logapi\events.json | |
cp ${{env.SOLUTION_FILE_PATH}}\cstrike\addons\logapi\LogApi.php publish\addons\logapi\LogApi.php | |
- name: Deploy artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win32 | |
path: publish/* |