-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (53 loc) · 1.57 KB
/
ci-scripting.yml
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
name: SourcePawn CI
on:
workflow_call:
pull_request:
branches: [ master ]
jobs:
build-options:
runs-on: ubuntu-latest
outputs:
exclude: ${{ steps.set.outputs.exclude }}
steps:
- id: set
run: |
echo "exclude=[${{ github.event_name == 'push' && '{"platform": { "release": false } }' || '' }}]" >> $GITHUB_OUTPUT
build:
needs: build-options
strategy:
matrix:
platform: [
{ name: Stable, sm-version: '1.11.x', release: true }
]
exclude: ${{ fromJson(needs.build-options.outputs.exclude) }}
name: SM (${{ matrix.platform.name }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-python@v3
name: Setup Python 3.8
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: Setup SP
uses: rumblefrog/setup-sp@master
with:
version: ${{ matrix.platform.sm-version }}
no-spcomp-proxy: true
- name: Build
run: |
mkdir -p build && cd build
python ../configure.py --scripting-only
ambuild
- name: Upload artifact
if: github.event_name == 'push' && matrix.platform.release
uses: actions/upload-artifact@v3
with:
name: cbasenpc_plugins
path: build/package