CI #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
# push: | |
# branches: | |
# - main | |
# paths: | |
# - "metamod/**" | |
# pull_request: | |
# branches: | |
# - main | |
# paths: | |
# - "metamod/**" | |
jobs: | |
build: | |
name: Build WST Metamod Plugin | |
# if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }} | |
runs-on: ${{ matrix.os }} | |
container: ${{ matrix.container }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2022, ubuntu-latest] | |
include: | |
- os: windows-2022 | |
- os: ubuntu-latest | |
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk | |
env: | |
HL2SDKCS2: ${{ github.workspace }}/metamod/hl2sdk | |
steps: | |
- name: Set HL2SDKCS2 path | |
run: echo "HL2SDKCS2=${HL2SDKCS2}" >> $GITHUB_ENV | |
- name: Checkout repository recursively | |
uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- name: Checkout AMBuild | |
uses: actions/checkout@v4 | |
with: | |
repository: alliedmodders/ambuild | |
path: "ambuild" | |
- name: Install AMBuild | |
run: | | |
cd ambuild | |
python setup.py install | |
cd .. | |
- name: Build Metamod | |
working-directory: metamod | |
run: | | |
mkdir -p build && cd build | |
python ../configure.py --enable-optimize --symbol-files --sdks cs2 | |
ambuild | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ format('wst-mm-{0}', contains(runner.os, 'windows') && 'win' || 'linux') }} | |
path: metamod/build/package |