Fix CI after safetyhook changes #59
Workflow file for this run
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: build | |
on: | |
push: | |
paths-ignore: | |
- LICENSE | |
- README.md | |
pull_request: | |
paths-ignore: | |
- LICENSE | |
- README.md | |
workflow_dispatch: | |
schedule: | |
- cron: "30 03 01 */3 *" # Artifacts expire every 3 months | |
jobs: | |
build: | |
name: build with sm${{ matrix.sm_version }} on ${{ matrix.os_short }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- windows-latest | |
sm_version: | |
- "1.9" | |
- "1.10" | |
- "1.11" | |
- "1.12" | |
- "latest" | |
include: | |
# Use MM:Source 1.10 as base version | |
- meta_version: "1.10" | |
meta_branch: "1.10-dev" | |
- sm_version: latest | |
sm_branch: master | |
meta_version: latest | |
meta_branch: master | |
- sm_version: "1.9" | |
sm_branch: "1.9-dev" | |
- sm_version: "1.10" | |
sm_branch: "1.10-dev" | |
- sm_version: "1.11" | |
sm_branch: "1.11-dev" | |
meta_version: "1.11" | |
meta_branch: "1.11-dev" | |
- sm_version: "1.12" | |
sm_branch: "1.12-dev" | |
meta_version: "1.11" | |
meta_branch: "1.11-dev" | |
- os: ubuntu-20.04 | |
os_short: linux | |
- os: windows-latest | |
os_short: win | |
steps: | |
- name: Preparing to dump debug symbols | |
uses: actions/checkout@v4 | |
with: | |
repository: mozilla/dump_syms | |
path: dump_syms | |
- name: Install dump_syms | |
run: cargo install --all-features --path ./dump_syms | |
- name: Prepare env | |
shell: bash | |
run: | | |
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
- name: Install (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
sudo dpkg --add-architecture i386 | |
sudo apt-get update | |
sudo apt-get install -y clang g++-multilib | |
echo "CC=clang" >> $GITHUB_ENV | |
echo "CXX=clang++" >> $GITHUB_ENV | |
- name: Add msbuild to PATH (Windows) | |
if: runner.os == 'Windows' | |
uses: microsoft/setup-msbuild@v2 | |
- name: Install (Windows) | |
if: runner.os == 'Windows' | |
shell: cmd | |
run: | | |
:: See https://github.com/microsoft/vswhere/wiki/Find-VC | |
for /f "usebackq delims=*" %%i in (`vswhere -latest -property installationPath`) do ( | |
call "%%i"\Common7\Tools\vsdevcmd.bat -arch=x86 -host_arch=x64 | |
) | |
:: Loop over all environment variables and make them global. | |
for /f "delims== tokens=1,2" %%a in ('set') do ( | |
echo>>"%GITHUB_ENV%" %%a=%%b | |
) | |
- name: Getting SourceMod ${{ matrix.sm_version }} | |
uses: actions/checkout@v4 | |
with: | |
repository: alliedmodders/sourcemod | |
ref: ${{ matrix.sm_branch }} | |
path: sourcemod-${{ matrix.sm_version }} | |
submodules: recursive | |
- name: Getting MM:Source ${{ matrix.meta_version }} | |
uses: actions/checkout@v4 | |
with: | |
repository: alliedmodders/metamod-source | |
ref: ${{ matrix.meta_branch }} | |
path: metamod-${{ matrix.meta_version }} | |
- name: Getting ambuild | |
run: | | |
python -m pip install wheel | |
pip install git+https://github.com/alliedmodders/ambuild | |
- name: Getting SDKs | |
shell: bash | |
run: | | |
git clone --mirror https://github.com/alliedmodders/hl2sdk hl2sdk-proxy-repo | |
sdks=(csgo tf2 css hl2dm dods l4d2 l4d) | |
for sdk in "${sdks[@]}" | |
do | |
git clone hl2sdk-proxy-repo -b $sdk hl2sdk-$sdk | |
done | |
- name: Getting own repository | |
uses: actions/checkout@v4 | |
with: | |
path: sourcetvmanager | |
submodules: recursive | |
- name: Compiling SourceTV Manager files | |
working-directory: sourcetvmanager | |
run: | | |
mkdir build | |
cd build | |
python ../configure.py --enable-optimize --sdks=present --sm-path="${{ github.workspace }}/sourcemod-${{ matrix.sm_version }}" --mms-path="${{ github.workspace }}/metamod-${{ matrix.meta_version }}" | |
ambuild | |
- name: Uploading debug symbols | |
working-directory: sourcetvmanager/build | |
shell: bash | |
run: | | |
for f in $(find sourcetvmanager.ext.2.* -type f -print | grep \/sourcetvmanager\.ext\.2\.*\.); do | |
if ! [[ $f == *.so || $f == *.pdb ]]; then | |
continue | |
fi | |
dump_syms $f > $(basename $f).syms | |
curl --data-binary @$(basename $f).syms https://crash.limetech.org/symbols/submit | |
done | |
- name: Uploading package | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sourcetvmanager-sm${{ matrix.sm_version }}-${{ matrix.os_short }}-${{ env.GITHUB_SHA_SHORT }} | |
path: sourcetvmanager/build/package |