34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: Build project
|
|
on: [push, workflow_dispatch]
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
arch: ['x86', 'x64']
|
|
buildtype: ['debug', 'release']
|
|
runs-on: ${{matrix.os}}
|
|
steps:
|
|
- name: Checkout this repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
path: 'hl2sdk-starter'
|
|
submodules: 'recursive'
|
|
- name: Install dependencies
|
|
run: >
|
|
sudo apt-get update &&
|
|
sudo apt-get install gcc gcc-multilib g++ g++-multilib
|
|
python3 python3-pip python3-setuptools python3-wheel ninja-build &&
|
|
pip3 install --user meson
|
|
- name: Build ${{matrix.arch}} ${{matrix.buildtype}}
|
|
run: >
|
|
cd ${{ github.workspace }}/hl2sdk-starter &&
|
|
meson setup -D arch=${{matrix.arch}} -D buildtype=${{matrix.buildtype}} build &&
|
|
cd build &&
|
|
meson compile
|
|
- name: Upload plugin artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{matrix.os}}_${{matrix.arch}}_${{matrix.buildtype}}_${{env.GITHUB_SHA}}
|
|
path: ${{ github.workspace }}/hl2sdk-starter/build/src/server_plugin.so
|
|
|