99 lines
2.4 KiB
YAML
99 lines
2.4 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
name: Build on ${{ matrix.os_short }}
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-18.04
|
|
- windows-latest
|
|
include:
|
|
- os: ubuntu-18.04
|
|
os_short: linux
|
|
- os: windows-latest
|
|
os_short: windows
|
|
|
|
steps:
|
|
|
|
- name: Setup Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Install AMBuild
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools wheel
|
|
pip install git+https://github.com/alliedmodders/ambuild
|
|
|
|
- name: Install dependencies (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo dpkg --add-architecture i386
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-multilib g++-multilib llvm-10 clang-10
|
|
|
|
- name: Select clang compiler (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
echo "CC=clang" >> $GITHUB_ENV
|
|
echo "CXX=clang++" >> $GITHUB_ENV
|
|
clang --version
|
|
clang++ --version
|
|
|
|
- name: Checkout MetaMod
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: alliedmodders/metamod-source
|
|
path: metamod-source
|
|
submodules: recursive
|
|
|
|
- name: Checkout SourceMod
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: alliedmodders/sourcemod
|
|
ref: 1.11-dev
|
|
path: sourcemod
|
|
submodules: recursive
|
|
|
|
- name: Checkout hl2sdk-csgo
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: alliedmodders/hl2sdk
|
|
ref: csgo
|
|
path: hl2sdk-csgo
|
|
|
|
- name: Checkout hl2sdk-insurgency
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: alliedmodders/hl2sdk
|
|
ref: insurgency
|
|
path: hl2sdk-insurgency
|
|
|
|
- name: Checkout Project
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 99999
|
|
path: extension
|
|
|
|
- name: Build
|
|
working-directory: extension
|
|
shell: bash
|
|
run: |
|
|
mkdir build && cd build
|
|
python ../configure.py --enable-optimize --sdks=csgo
|
|
ambuild
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ runner.os }}
|
|
path: extension/build/package |