Skip to content

S2 transition thread #3

S2 transition thread

S2 transition thread #3

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
- '[0-9]+.[0-9]+-dev'
pull_request:
branches:
- main
- '[0-9]+.[0-9]+-dev'
jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest, windows-2022]
include:
- os: windows-2022
os_short: win
compiler_cc: msvc
- os: ubuntu-latest
os_short: linux
compiler_cc: clang
compiler_cxx: clang++
- os: ubuntu-20.04
os_short: linux
compiler_cc: clang-8
compiler_cxx: clang++-8
fail-fast: false
runs-on: ${{ matrix.os }}
name: ${{ matrix.os_short }}-${{ matrix.compiler_cc }}
env:
SDKS: '["cs2"]'
ARCH: x86_64
DEPENDENCIES_FOLDER: dependencies
DEPENDENCIES_ROOT: ${{ github.workspace }}/dependencies
MYSQL_VERSION: '5.5'
MMSOURCE_VERSION: '2.0'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
path: source2mod
- name: Cache dependencies
uses: actions/cache@v3
env:
cache-name: hl2sdk-mysql-mmsource
with:
path: ${{ env.DEPENDENCIES_ROOT }}
key: ${{ runner.os }}-build-${{ env.cache-name }}-mysql${{ env.MYSQL_VERSION }}-mmsource${{ env.MMSOURCE_VERSION }}-${{ join(fromJSON(env.SDKS), '') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-mysql${{ env.MYSQL_VERSION }}-mmsource${{ env.MMSOURCE_VERSION }}-
${{ runner.os }}-build-${{ env.cache-name }}-mysql${{ env.MYSQL_VERSION }}-
# Setup Python for AMBuild
- uses: actions/setup-python@v5
name: Setup Python 3.11
with:
python-version: 3.11
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
- name: Install dependencies
shell: bash
run: |
mkdir -p ${{ env.DEPENDENCIES_FOLDER }}
cd ${{ env.DEPENDENCIES_FOLDER }}
# Satisfy checkout-deps requirement for a "source2mod" folder.
mkdir -p source2mod
../source2mod/tools/checkout-deps.sh -s ${{ join(fromJSON(env.SDKS)) }}
- name: Install Linux dependencies
if: startsWith(runner.os, 'Linux')
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libstdc++6 lib32stdc++6 libc6-dev linux-libc-dev \
${{ matrix.compiler_cc }}
- name: Select clang compiler
if: startsWith(runner.os, 'Linux')
run: |
echo "CC=${{ matrix.compiler_cc }}" >> $GITHUB_ENV
echo "CXX=${{ matrix.compiler_cxx }}" >> $GITHUB_ENV
${{ matrix.compiler_cc }} --version
${{ matrix.compiler_cxx }} --version
- name: Build
working-directory: source2mod
run: |
mkdir build
cd build
python ../configure.py --enable-optimize --sdks=${{ join(fromJSON(env.SDKS)) }} --targets=${{ env.ARCH }} --mms-path=${{ env.DEPENDENCIES_ROOT }}/mmsource-${{ env.MMSOURCE_VERSION }} --hl2sdk-root=${{ env.DEPENDENCIES_ROOT }} --mysql-path=${{ env.DEPENDENCIES_ROOT }}/mysql-${{ env.MYSQL_VERSION }} --mysql64-path=${{ env.DEPENDENCIES_ROOT }}/mysql-${{ env.MYSQL_VERSION }}-x86_64
ambuild