1- # Based on CanerKaraca20 build script
1+ # Based on CanerKaraca20 build script
22name : Build ModelExtras
33
44on :
@@ -25,16 +25,19 @@ jobs:
2525 - name : Install dependencies
2626 run : |
2727 sudo apt-get update
28- sudo apt-get install -y wget gnupg software-properties-common lsb-release
28+ sudo apt-get install -y wget gnupg software-properties-common lsb-release g++-mingw-w64-i686
2929
30- # Add LLVM APT repository
31- wget https://apt.llvm.org/llvm-snapshot.gpg.key
32- sudo apt-key add llvm-snapshot.gpg.key
33- sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-20 main"
34- sudo apt-get update
30+ # Download LLVM installer script
31+ wget https://apt.llvm.org/llvm.sh
32+ chmod +x llvm.sh
33+
34+ # Install Clang 23
35+ sudo ./llvm.sh 23
3536
36- # Install Clang 20
37- sudo apt-get install -y clang-20 clang++-20 g++-mingw-w64-i686
37+ - name : Verify Clang
38+ run : |
39+ clang --version
40+ clang++ --version
3841
3942 - name : Get latest plugin-sdk commit
4043 id : plugin-sdk-ref
@@ -51,26 +54,22 @@ jobs:
5154 - name : Build plugin-sdk
5255 if : steps.plugin-sdk-cache.outputs.cache-hit != 'true'
5356 run : |
54- # Clone repo and check out the exact commit used in the cache key
5557 git clone https://github.com/user-grinch/plugin-sdk-mingw.git plugin-sdk
5658 cd plugin-sdk
5759 git checkout "${{ steps.plugin-sdk-ref.outputs.sha }}"
5860 mkdir -p output/lib
59- # Prepare object directories
6061 for dir in shared plugin_sa safetyhook; do
6162 find "$dir" -type d -exec mkdir -p "obj/{}" \;
6263 done
6364
64- # Common flags
6565 FLAGS="-I. -Ishared -Ishared/game -Iplugin_sa -Iplugin_sa/game_sa -Iplugin_sa/game_sa/rw -Isafetyhook -DGTASA -DPLUGIN_SGV_10US -DRW"
66- CLANG_FLAGS="--target=i686-w64-mingw32 -fpermissive -fcommon -fms-extensions -Wno-microsoft-include -Wno-invalid-offsetof -Wno-builtin-macro-redefined -O2 -D__cpp_concepts=202002L "
66+ CLANG_FLAGS="--target=i686-w64-mingw32 -fpermissive -fcommon -fms-extensions -Wno-microsoft-include -Wno-invalid-offsetof -Wno-builtin-macro-redefined -O2 -D__cpp_concepts=202202L "
6767
68- # Parallel build
6968 find shared plugin_sa safetyhook -name '*.cpp' -print0 | \
70- xargs -0 -P$(nproc) -I{} clang++-20 $CLANG_FLAGS -std=c++2b $FLAGS -c {} -o obj/{}.o
69+ xargs -0 -P$(nproc) -I{} clang++-23 $CLANG_FLAGS -std=c++2b $FLAGS -c {} -o obj/{}.o
7170
7271 find safetyhook -name '*.c' -print0 | \
73- xargs -0 -P$(nproc) -I{} clang-20 $CLANG_FLAGS $FLAGS -c {} -o obj/{}.o
72+ xargs -0 -P$(nproc) -I{} clang-23 $CLANG_FLAGS $FLAGS -c {} -o obj/{}.o
7473
7574 find obj -name '*.o' | xargs i686-w64-mingw32-ar rcs output/lib/libplugin.a
7675
8483 run : |
8584 xmake f -m release \
8685 --mingw=/usr \
87- --cc=clang-20 \
88- --cxx=clang++-20 \
86+ --cc=clang-23 \
87+ --cxx=clang++-23 \
88+ --cxxflags="-stdlib=libc++ -std=c++2b" \
8989 -c -y
9090 xmake -j$(nproc)
9191
0 commit comments