Skip to content

Commit a66b2cc

Browse files
committed
Create ci.yml
1 parent 6558f13 commit a66b2cc

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed

.github/workflows/ci.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Continuous Integration
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- ci-test
7+
paths-ignore:
8+
- generator_scripts/**
9+
- README.md
10+
- LICENSE
11+
- .gitignore
12+
pull_request:
13+
branches:
14+
- master
15+
- ci-test
16+
paths-ignore:
17+
- generator_scripts/**
18+
- README.md
19+
- LICENSE
20+
- .gitignore
21+
jobs:
22+
build:
23+
strategy:
24+
matrix:
25+
include:
26+
- os: windows-latest
27+
os_short: windows
28+
compiler_cc: msvc-vs2022
29+
sdks: '["cs2", "dota", "deadlock"]'
30+
- os: ubuntu-latest
31+
os_short: linux
32+
compiler_cc: clang
33+
compiler_cxx: clang++
34+
sdks: '["cs2", "dota"]'
35+
container: registry.gitlab.steamos.cloud/steamrt/sniper/sdk
36+
fail-fast: false
37+
runs-on: ${{ matrix.os }}
38+
container: ${{ matrix.container }}
39+
name: ${{ matrix.os_short }}-${{ matrix.compiler_cc }}
40+
env:
41+
HL2SDKROOT: ${{ github.workspace }}/
42+
HL2SDKMANIFESTS: ${{ github.workspace }}/hl2sdk-manifests/
43+
MMSOURCE20: ${{ github.workspace }}/metamod-source/
44+
steps:
45+
- name: Checkout SchemaDump
46+
uses: actions/checkout@v4
47+
with:
48+
path: schemadump
49+
50+
- name: Checkout Metamod-Source
51+
uses: actions/checkout@v4
52+
with:
53+
repository: alliedmodders/metamod-source
54+
submodules: recursive
55+
path: metamod-source
56+
57+
- name: Checkout hl2sdk-manifests
58+
uses: actions/checkout@v4
59+
with:
60+
repository: alliedmodders/hl2sdk-manifests
61+
path: hl2sdk-manifests
62+
63+
- name: Checkout hl2sdk-cs2
64+
uses: actions/checkout@v4
65+
with:
66+
repository: alliedmodders/hl2sdk
67+
path: hl2sdk-cs2
68+
ref: cs2
69+
70+
- name: Checkout hl2sdk-dota
71+
uses: actions/checkout@v4
72+
with:
73+
repository: alliedmodders/hl2sdk
74+
path: hl2sdk-dota
75+
ref: dota
76+
77+
- name: Checkout hl2sdk-deadlock
78+
uses: actions/checkout@v4
79+
with:
80+
repository: alliedmodders/hl2sdk
81+
path: hl2sdk-deadlock
82+
ref: deadlock
83+
84+
- name: Checkout AMBuild
85+
uses: actions/checkout@v4
86+
with:
87+
repository: alliedmodders/ambuild
88+
path: ambuild
89+
90+
- name: Setup Python 3.12
91+
uses: actions/setup-python@v5
92+
with:
93+
python-version: 3.12
94+
95+
- name: Install AMBuild
96+
run: |
97+
cd ambuild && python setup.py install && cd ..
98+
99+
- name: Install Clang 16
100+
if: matrix.os == 'ubuntu-latest'
101+
run: |
102+
apt update && apt install -y clang-16
103+
echo "CC=${{ matrix.compiler_cc }}" >> $GITHUB_ENV
104+
echo "CXX=${{ matrix.compiler_cxx }}" >> $GITHUB_ENV
105+
${{ matrix.compiler_cc }} --version
106+
${{ matrix.compiler_cxx }} --version
107+
108+
- name: Build
109+
working-directory: schemadump
110+
run: |
111+
mkdir build
112+
cd build
113+
python ../configure.py --enable-optimize --sdks=${{ join(fromJSON(matrix.sdks)) }}
114+
ambuild
115+
116+
- name: Upload artifact
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: schemadump-${{ runner.os }}
120+
path: schemadump/build/package

0 commit comments

Comments
 (0)