mirror of
https://github.com/srcdslab/sm-ext-voice.git
synced 2025-12-06 18:18:21 +00:00
fix(csgo): protobuf valve build
This commit is contained in:
parent
3a1c1471b0
commit
a09ad8c70c
56
.github/workflows/ci.yml
vendored
56
.github/workflows/ci.yml
vendored
@ -1,18 +1,30 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on: [push, pull_request, workflow_dispatch]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
permissions: write-all
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04]
|
os: [ubuntu-20.04]
|
||||||
sourcemod-version: [1.11-dev]
|
sourcemod-version: [1.11-dev]
|
||||||
protobuf-version: [v2.5.0]
|
protobuf-version: [v2.5.0]
|
||||||
protobuf-valve-version: [master]
|
# Before Counter strike 2 changes
|
||||||
|
protobuf-valve-version: [02c5c94089d46fb14d8d94a4791e8cad7eef2d63]
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
target-archs: x86,x86_64
|
target-archs: x86,x86_64
|
||||||
@ -26,15 +38,15 @@ jobs:
|
|||||||
sudo apt install -yq --no-install-recommends g++-multilib
|
sudo apt install -yq --no-install-recommends g++-multilib
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: extension
|
path: extension
|
||||||
|
|
||||||
- name: Checkout SourceMod
|
- name: Checkout SourceMod
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: alliedmodders/sourcemod
|
repository: alliedmodders/sourcemod
|
||||||
ref: ${{ matrix.sourcemod-version }}
|
ref: ${{ matrix.sourcemod-version }}
|
||||||
@ -42,19 +54,19 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Checkout AMBuild
|
- name: Checkout AMBuild
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: alliedmodders/ambuild
|
repository: alliedmodders/ambuild
|
||||||
path: ambuild
|
path: ambuild
|
||||||
|
|
||||||
- name: Checkout sm-ext-common
|
- name: Checkout sm-ext-common
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: srcdslab/sm-ext-common
|
repository: srcdslab/sm-ext-common
|
||||||
path: sourcemod/extensions/sm-ext-common
|
path: sourcemod/extensions/sm-ext-common
|
||||||
|
|
||||||
- name: Checkout valve protobuf
|
- name: Checkout valve protobuf
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: SteamDatabase/Protobufs
|
repository: SteamDatabase/Protobufs
|
||||||
ref: ${{ matrix.protobuf-valve-version }}
|
ref: ${{ matrix.protobuf-valve-version }}
|
||||||
@ -62,29 +74,28 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Checkout protobuf
|
- name: Checkout protobuf
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
repository: protocolbuffers/protobuf
|
repository: protocolbuffers/protobuf
|
||||||
ref: ${{ matrix.protobuf-version }}
|
ref: ${{ matrix.protobuf-version }}
|
||||||
path: protobuf
|
path: protobuf
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install AMBuild
|
||||||
|
run: |
|
||||||
|
pip install --user ./ambuild
|
||||||
|
|
||||||
- name: Install sourcemod dependencies
|
- name: Install sourcemod dependencies
|
||||||
run: |
|
run: |
|
||||||
bash sourcemod/tools/checkout-deps.sh -m -s ${{ matrix.sdks }}
|
bash sourcemod/tools/checkout-deps.sh -m -s ${{ matrix.sdks }}
|
||||||
|
|
||||||
- name: Install AMBuild
|
|
||||||
uses: BSFishy/pip-action@v1
|
|
||||||
with:
|
|
||||||
packages: ./ambuild
|
|
||||||
|
|
||||||
- name: Install protobuf
|
- name: Install protobuf
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
export EXTENSION_ROOT_DIR=$(pwd)
|
export EXTENSION_ROOT_DIR=$(pwd)
|
||||||
cd protobuf
|
cd protobuf
|
||||||
|
|
||||||
#sh autogen.sh
|
# sh autogen.sh
|
||||||
|
|
||||||
# Fix because autogen in protobuf 2.5.0 doesnt work anymore
|
# Fix because autogen in protobuf 2.5.0 doesnt work anymore
|
||||||
autoreconf -f -i -Wall,no-obsolete
|
autoreconf -f -i -Wall,no-obsolete
|
||||||
@ -98,8 +109,15 @@ jobs:
|
|||||||
# Compile .proto files to c++
|
# Compile .proto files to c++
|
||||||
|
|
||||||
cd ../protobuf-valve
|
cd ../protobuf-valve
|
||||||
../protobuf/bin/protoc google/protobuf/descriptor.proto --cpp_out=./
|
|
||||||
../protobuf/bin/protoc csgo/netmessages.proto --cpp_out=./
|
# Counter strike 2 ?
|
||||||
|
# ../protobuf/bin/protoc -I=$PWD -I=$PWD/csgo $PWD/csgo/networksystem_protomessages.proto --cpp_out=$PWD
|
||||||
|
# ../protobuf/bin/protoc -I=$PWD -I=$PWD/csgo $PWD/csgo/network_connection.proto --cpp_out=$PWD
|
||||||
|
# ../protobuf/bin/protoc -I=$PWD -I=$PWD/csgo $PWD/csgo/networkbasetypes.proto --cpp_out=$PWD
|
||||||
|
|
||||||
|
# CSGO
|
||||||
|
../protobuf/bin/protoc -I=$PWD $PWD/google/protobuf/descriptor.proto --cpp_out=$PWD
|
||||||
|
../protobuf/bin/protoc -I=$PWD -I=$PWD/csgo $PWD/csgo/netmessages.proto --cpp_out=$PWD
|
||||||
ls -all
|
ls -all
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
@ -113,7 +131,7 @@ jobs:
|
|||||||
ambuild
|
ambuild
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ runner.os }}
|
name: ${{ runner.os }}
|
||||||
path: extension/build/package
|
path: extension/build/package
|
||||||
@ -127,7 +145,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v3
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user