-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (56 loc) · 1.66 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
64
65
66
name: SourcePawn CI
on:
workflow_call:
pull_request:
branches: [ master ]
paths:
- 'AMBuildScript'
- 'PackageScript'
- 'scripting/**'
- 'scripting/**'
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: [
{ sm-version: '1.11.x', release: true },
{ sm-version: '1.12.x', release: false }
]
exclude: ${{ fromJson(needs.build-options.outputs.exclude) }}
name: SM version ${{ matrix.platform.sm-version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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