forked from Source2ZE/CS2Fixes
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (96 loc) · 2.59 KB
/
Copy pathcompile.yml
File metadata and controls
107 lines (96 loc) · 2.59 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Build
on:
push:
paths-ignore:
- LICENSE
- README.md
pull_request:
paths-ignore:
- LICENSE
- README.md
workflow_dispatch:
jobs:
build:
name: Build on ${{ matrix.os_short }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
include:
- os: ubuntu-20.04
os_short: linux
steps:
# Setup Python for AMBuild.
- name: Setup Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
# Install dependencies
- name: Install AMBuild
run: |
python -m pip install --upgrade pip setuptools wheel
pip install git+https://github.com/alliedmodders/ambuild
- name: Install dependencies
if: runner.os == 'Linux'
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y clang g++-multilib
- name: Select clang compiler
if: runner.os == 'Linux'
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
clang --version
clang++ --version
# Checkout repos
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
path: project
# - name: Checkout hl2sdk-cs2
# uses: actions/checkout@v4
# with:
# repository: alliedmodders/hl2sdk
# ref: cs2
# path: hl2sdk-cs2
- name: Checkout Metamod:Source
uses: actions/checkout@v4
with:
repository: alliedmodders/metamod-source
ref: master
path: metamod-source
# Build
- name: Build
shell: bash
run: |
export HL2SDKCS2=/home/runner/work/CS2Fixes/CS2Fixes/project/sdk
cd project && mkdir build && cd build
python ../configure.py -s cs2
ambuild
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}
path: project/build/package
release:
name: Release
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Package
run: |
7z a -mx9 linux.zip ./Linux/*
# - name: Release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.D }}
# file: '*.zip'
# tag: ${{ github.ref }}
# file_glob: true