mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-02-05 18:20:33 +03:00
Change compiler to Clang, instead of ICC 2019
This commit is contained in:
parent
8005dd9ca3
commit
30572ef0b6
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@ -29,14 +29,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Nuget
|
|
||||||
uses: nuget/setup-nuget@v1
|
|
||||||
with:
|
|
||||||
nuget-api-key: ${{ secrets.NuGetAPIKey }}
|
|
||||||
nuget-version: '5.x'
|
|
||||||
|
|
||||||
- run: nuget restore '${{ env.solution }}'
|
|
||||||
|
|
||||||
- name: Setup MSBuild
|
- name: Setup MSBuild
|
||||||
uses: microsoft/setup-msbuild@v1.1.3
|
uses: microsoft/setup-msbuild@v1.1.3
|
||||||
with:
|
with:
|
||||||
@ -140,8 +132,7 @@ jobs:
|
|||||||
|
|
||||||
linux:
|
linux:
|
||||||
name: 'Linux'
|
name: 'Linux'
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
container: s1lentq/linux86buildtools:latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -150,9 +141,16 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Check dependencies
|
||||||
|
run: |
|
||||||
|
sudo dpkg --add-architecture i386
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y clang
|
||||||
|
sudo apt-get install -y gcc-multilib g++-multilib
|
||||||
|
|
||||||
- name: Build and Run unittests
|
- name: Build and Run unittests
|
||||||
run: |
|
run: |
|
||||||
rm -rf build && CC=icc CXX=icpc cmake -DCMAKE_BUILD_TYPE=Unittests -B build && cmake --build build -j8
|
rm -rf build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Unittests -B build && cmake --build build -j8
|
||||||
retVal=0
|
retVal=0
|
||||||
./build/regamedll/cs 2> /dev/null > result.log || retVal=$?
|
./build/regamedll/cs 2> /dev/null > result.log || retVal=$?
|
||||||
while read line; do
|
while read line; do
|
||||||
@ -173,17 +171,9 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Build using Intel C++ Compiler 19.0 (only for release)
|
- name: Build using Clang C++ Compiler
|
||||||
if: |
|
|
||||||
github.event_name == 'release' &&
|
|
||||||
github.event.action == 'published' &&
|
|
||||||
startsWith(github.ref, 'refs/tags/')
|
|
||||||
run: |
|
run: |
|
||||||
rm -rf build-icc && CC=icc CXX=icpc cmake -B build-icc && cmake --build build-icc -j8
|
rm -rf build && CC=clang CXX=clang++ cmake -B build && cmake --build build -j8
|
||||||
|
|
||||||
- name: Build using GCC Compiler 9.3
|
|
||||||
run: |
|
|
||||||
rm -rf build-gcc && CC=gcc CXX=g++ cmake -B build-gcc && cmake --build build-gcc -j8
|
|
||||||
|
|
||||||
- name: Prepare CSSDK
|
- name: Prepare CSSDK
|
||||||
run: |
|
run: |
|
||||||
@ -193,8 +183,7 @@ jobs:
|
|||||||
- name: Move files
|
- name: Move files
|
||||||
run: |
|
run: |
|
||||||
mkdir -p publish/bin/linux32/cstrike/dlls
|
mkdir -p publish/bin/linux32/cstrike/dlls
|
||||||
mv build-icc/regamedll/cs.so publish/bin/linux32/cstrike/dlls/cs.so 2>/dev/null || true
|
mv build/regamedll/cs.so publish/bin/linux32/cstrike/dlls/cs.so 2>/dev/null || true
|
||||||
mv build-gcc/regamedll/cs.so publish/cs-gcc.so
|
|
||||||
mv regamedll/version/appversion.h publish/appversion.h
|
mv regamedll/version/appversion.h publish/appversion.h
|
||||||
mv dist/ publish/
|
mv dist/ publish/
|
||||||
|
|
||||||
@ -202,7 +191,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
binaries=(
|
binaries=(
|
||||||
"publish/bin/linux32/cstrike/dlls/cs.so"
|
"publish/bin/linux32/cstrike/dlls/cs.so"
|
||||||
"publish/cs-gcc.so"
|
|
||||||
)
|
)
|
||||||
bash ./regamedll/version/glibc_test.sh ${binaries[@]}
|
bash ./regamedll/version/glibc_test.sh ${binaries[@]}
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Used to step into the debugger
|
// Used to step into the debugger
|
||||||
#if defined(__GNUC__) && !defined(__clang__)
|
#if defined(__GNUC__) || defined(__clang__)
|
||||||
#define DebuggerBreak() __asm__ __volatile__("int3;")
|
#define DebuggerBreak() __asm__ __volatile__("int3;")
|
||||||
#else
|
#else
|
||||||
#define DebuggerBreak() __asm { int 3 }
|
#define DebuggerBreak() __asm { int 3 }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user