Skip to content

Commit

Permalink
Change compiler to Clang, instead of ICC 2019
Browse files Browse the repository at this point in the history
  • Loading branch information
s1lentq committed Jul 14, 2024
1 parent 8005dd9 commit 30572ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 25 deletions.
36 changes: 12 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ jobs:
with:
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
uses: microsoft/[email protected]
with:
Expand Down Expand Up @@ -140,8 +132,7 @@ jobs:
linux:
name: 'Linux'
runs-on: ubuntu-20.04
container: s1lentq/linux86buildtools:latest
runs-on: ubuntu-latest

steps:
- name: Checkout
Expand All @@ -150,9 +141,16 @@ jobs:
fetch-depth: 0
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
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
./build/regamedll/cs 2> /dev/null > result.log || retVal=$?
while read line; do
Expand All @@ -173,17 +171,9 @@ jobs:
fi
shell: bash

- name: Build using Intel C++ Compiler 19.0 (only for release)
if: |
github.event_name == 'release' &&
github.event.action == 'published' &&
startsWith(github.ref, 'refs/tags/')
run: |
rm -rf build-icc && CC=icc CXX=icpc cmake -B build-icc && cmake --build build-icc -j8
- name: Build using GCC Compiler 9.3
- name: Build using Clang C++ Compiler
run: |
rm -rf build-gcc && CC=gcc CXX=g++ cmake -B build-gcc && cmake --build build-gcc -j8
rm -rf build && CC=clang CXX=clang++ cmake -B build && cmake --build build -j8
- name: Prepare CSSDK
run: |
Expand All @@ -193,16 +183,14 @@ jobs:
- name: Move files
run: |
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-gcc/regamedll/cs.so publish/cs-gcc.so
mv build/regamedll/cs.so publish/bin/linux32/cstrike/dlls/cs.so 2>/dev/null || true
mv regamedll/version/appversion.h publish/appversion.h
mv dist/ publish/
- name: Run GLIBC/ABI version compat test
run: |
binaries=(
"publish/bin/linux32/cstrike/dlls/cs.so"
"publish/cs-gcc.so"
)
bash ./regamedll/version/glibc_test.sh ${binaries[@]}
if [[ $? -ne 0 ]]; then
Expand Down
2 changes: 1 addition & 1 deletion regamedll/public/tier0/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#endif

// Used to step into the debugger
#if defined(__GNUC__) && !defined(__clang__)
#if defined(__GNUC__) || defined(__clang__)
#define DebuggerBreak() __asm__ __volatile__("int3;")
#else
#define DebuggerBreak() __asm { int 3 }
Expand Down

0 comments on commit 30572ef

Please sign in to comment.