-
Notifications
You must be signed in to change notification settings - Fork 9
76 lines (76 loc) · 2.33 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: build
on:
push:
paths-ignore: [LICENSE, README.md]
pull_request:
paths-ignore: [LICENSE, README.md]
jobs:
build:
name: ${{matrix.os}}-${{matrix.game}}-sm${{matrix.sm}}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest]
game: [tf2]
sm: ['1.11']
steps:
- name: setup env
shell: bash
run: |
echo "GITHUB_SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: setup 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: clone hl2sdk
uses: actions/checkout@main
with:
repository: alliedmodders/hl2sdk
ref: ${{matrix.game}}
path: hl2sdk-${{matrix.game}}
- name: clone sourcemod
uses: actions/checkout@main
with:
repository: alliedmodders/sourcemod
ref: ${{matrix.branch}}
path: sourcemod-${{matrix.sm}}
submodules: recursive
- name: clone metamod
uses: actions/checkout@main
with:
repository: alliedmodders/metamod-source
ref: ${{matrix.branch}}
path: metamod-${{matrix.sm}}
- name: clone ambuild
uses: actions/checkout@main
with:
repository: alliedmodders/ambuild
path: ambuild
- name: setup python
uses: actions/setup-python@main
with:
check-latest: true
python-version: '>=3'
- name: setup ambuild
working-directory: ambuild
run: python setup.py install
- name: clone ext
uses: actions/checkout@main
with:
path: extenson
- name: build ext
working-directory: extenson
run: |
mkdir build
cd build
python ../configure.py --enable-optimize --sm-path="${{github.workspace}}/sourcemod-${{matrix.sm}}" --mms-path="${{github.workspace}}/metamod-${{matrix.sm}}" --sdks=${{matrix.game}}
ambuild
- name: upload ext
uses: actions/upload-artifact@main
with:
name: ${{matrix.os}}-${{matrix.game}}-sm${{matrix.sm}}-${{env.GITHUB_SHA_SHORT}}
path: extenson/build/package