forked from nillerusr/source-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (99 loc) · 3.38 KB
/
build.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
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
108
109
110
111
name: Build
on: [push, pull_request]
env:
WAF_FLAGS: -T release --no-warns --prefix=build_hl2
jobs:
build-linux:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
bits: ['', '--64bits']
android: ['']
flags: ['', '-dl', '-u']
include:
- os: ubuntu-20.04
bits: ''
android: '--android=armeabi-v7a-hard,4.9,21 --use-togles'
flags: ''
runs-on: ${{ matrix.os }}
env:
DEPS: libopenal-dev libpng-dev libjpeg-dev libfreetype6-dev libfontconfig1-dev libcurl4-gnutls-dev libsdl2-dev zlib1g-dev libbz2-dev libedit-dev
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install common dependencies
run: sudo apt-get update && sudo apt-get install -y g++-multilib gcc-multilib
- name: Install 32bit dependencies
if: ${{ matrix.bits == '' && !matrix.android }}
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y aptitude
sudo aptitude install -y $(echo $DEPS | sed -r 's/[a-z0-9_\-]+/&:i386/g')
- name: Install Android dependencies
if: ${{ matrix.android != '' }}
run: |
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip -o /dev/null
unzip android-ndk-r10e-linux-x86_64.zip
export NDK_HOME=$PWD/android-ndk-r10e/
echo "NDK_HOME=$NDK_HOME" >> $GITHUB_ENV
echo "ANDROID_NDK_HOME=$NDK_HOME" >> $GITHUB_ENV
- name: Install 64bit dependencies
if: ${{ matrix.bits != '' }}
run: |
sudo apt-get install -y $DEPS
- if: ${{ matrix.bits == '' && !matrix.android }}
name: Set PKG_CONFIG_PATH
run: echo "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig" >> $GITHUB_ENV
- name: Configure
run: ./waf configure ${{ matrix.bits }} ${{ matrix.android }} ${{ matrix.flags }} $WAF_FLAGS
- name: Build ${{ matrix.os }}
run: ./waf install
- name: Tar binaries
run: tar cvf build.tar build_hl2
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Linux${{matrix.bits}}${{matrix.flags}}${{matrix.android}}.tar
path: build.tar
build-macos:
strategy:
fail-fast: false
matrix:
flags: ['', '-dl', '-u']
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: brew install sdl2
- name: Configure
run: ./waf configure --64bits ${{ matrix.flags }} $WAF_FLAGS
- name: Build macos-amd64
run: ./waf install
- name: Tar binaries
run: tar cvf build.tar build_hl2
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: macOS--64bits${{matrix.flags}}.tar
path: build.tar
build-windows:
strategy:
fail-fast: false
matrix:
os: [windows-2019]
bits: ['', '--64bits']
flags: ['', '-dl', '-u']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
run: ./waf configure ${{ matrix.bits }} ${{ matrix.flags }} ${{ env.WAF_FLAGS }}
- name: Build ${{ matrix.os }}
run: ./waf install