Skip to content

Auto

Auto #71

Workflow file for this run

name: Auto
on:
pull_request:
paths-ignore:
- LICENSE
- README.md
push:
paths-ignore:
- LICENSE
- README.md
schedule:
- cron: '30 03 01 */3 *'
jobs:
Master:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-latest, windows-latest]
sm_version: ["1.8", "1.9", "1.10", "1.11", "1.12"]
include:
- sptd_arch: x86
sm_branch: "1.8-dev"
meta_version: "1.10"
meta_branch: "1.10-dev"
sm_version: "1.8"
- sptd_arch: x86
sm_branch: "1.9-dev"
meta_version: "1.10"
meta_branch: "1.10-dev"
sm_version: "1.9"
- sptd_arch: x86,x86_64
sm_branch: "1.10-dev"
meta_version: "1.11"
meta_branch: "1.11-dev"
sm_version: "1.10"
- sptd_arch: x86,x86_64
sm_branch: "1.11-dev"
meta_version: "1.11"
meta_branch: "1.11-dev"
sm_version: "1.11"
- sptd_arch: x86,x86_64
sm_branch: master
meta_version: "1.12"
meta_branch: master
sm_version: "1.12"
- os_name: Linux (Old)
os_short: nix
compiler_cc: clang-8
compiler_cxx: clang++-8
os: ubuntu-20.04
- os_name: Linux (New)
os_short: linux
compiler_cc: clang
compiler_cxx: clang++
os: ubuntu-latest
- os_name: Windows
os_short: win
compiler_cc: msvc
os: windows-latest
name: SM-${{ matrix.sm_version }} ${{ matrix.os_name }} build
runs-on: ${{ matrix.os }}
steps:
- name: Certify environment variable(s)
shell: bash
run: |
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Digitize own repository
uses: actions/checkout@v4
with:
path: Source-Scramble
- name: Sort out Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Put Python plug-in(s) in place
run: |
python -m pip install --upgrade pip wheel
- name: Key in SourceMod ${{ matrix.sm_version }}
uses: actions/checkout@v4
with:
repository: alliedmodders/sourcemod
ref: ${{ matrix.sm_branch }}
path: sourcemod-${{ matrix.sm_version }}
submodules: recursive
- name: Key in MetaMod:Source ${{ matrix.meta_version }}
uses: actions/checkout@v4
with:
repository: alliedmodders/metamod-source
ref: ${{ matrix.meta_branch }}
path: metamod-${{ matrix.meta_version }}
- name: Put AMBuild in place
run: |
pip install git+https://github.com/alliedmodders/ambuild
- name: Assemble necessary libraries (Linux)
if: startsWith(runner.os, 'Linux')
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
gcc-multilib g++-multilib libstdc++6 lib32stdc++6 \
libc6-dev libc6-dev-i386 linux-libc-dev \
linux-libc-dev:i386 lib32z1-dev
- name: Assemble clang (Linux)
if: startsWith(runner.os, 'Linux')
run: |
sudo apt-get install -y --no-install-recommends \
${{ matrix.compiler_cc }}
echo "CC=${{ matrix.compiler_cc }}" >> $GITHUB_ENV
echo "CXX=${{ matrix.compiler_cxx }}" >> $GITHUB_ENV
- name: Shape up binaries
working-directory: Source-Scramble
run: |
mkdir build
cd build
python ../configure.py --enable-optimize --targets=${{ matrix.sptd_arch }} --sdks=none --mms-path="${{ github.workspace }}/metamod-${{ matrix.meta_version }}" --sm-path="${{ github.workspace }}/sourcemod-${{ matrix.sm_version }}"
ambuild
- name: Catalog all compiled files
uses: actions/upload-artifact@v4
with:
name: srcscramble-sm${{ matrix.sm_version }}-${{ matrix.os_short }}-${{ env.GITHUB_SHA_SHORT }}
path: Source-Scramble/build/package