-
Notifications
You must be signed in to change notification settings - Fork 0
165 lines (132 loc) · 3.94 KB
/
build-pr.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Build gFwens (pull request)
on:
pull_request:
paths-ignore:
- "README.md"
- 'examples/**'
- ".gitignore"
- ".github/workflows/build-master.yml"
env:
STEAMWORKS_LIB_BASEDIR: "./deps"
jobs:
fetch-dependencies:
runs-on: ubuntu-latest
env:
STEAMWORKS_URL: ${{ secrets.STEAMWORKS_SDK_URL }}
STEAMWORKS_SDK_URL_150: ${{ secrets.STEAMWORKS_SDK_URL_150 }}
steps:
- run: |
wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-windows.zip -qO- | busybox unzip -
wget $STEAMWORKS_URL -qO- | busybox unzip -
wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-linux.tar.gz -qO- | tar zxf -
- uses: actions/upload-artifact@v4
with:
name: premake-persistence
path: ./premake*
- uses: actions/upload-artifact@v4
with:
name: sdk-persistence-32
path: ./sdk*
# Dealing with the difference in the x64 steamworks requirements
- run: |
rm -R ./sdk
wget $STEAMWORKS_SDK_URL_150 -qO- | busybox unzip -
- uses: actions/upload-artifact@v4
with:
name: sdk-persistence-64
path: ./sdk*
###
build-win:
runs-on: windows-2019
needs: fetch-dependencies
strategy:
matrix:
arch: [32, 64]
steps:
- uses: actions/checkout@v4
with:
repository: facepunch/gmod-module-base
ref: refs/heads/development
path: gmodheaders
- uses: actions/checkout@v4
with:
path: gfwens
- uses: actions/download-artifact@v4
with:
name: premake-persistence
path: gfwens
- uses: actions/download-artifact@v4
with:
name: sdk-persistence-64
path: gfwens/deps
- uses: microsoft/setup-msbuild@v2
# Dumb way of doing this but oh well. Saves fight premake on this.
- name: "Compile Binary"
if: ${{ matrix.arch == 64 }}
run: |
cd gfwens
./premake5.exe vs2019
MSBuild.exe /p:Configuration=Release /property:Platform=x${{matrix.arch}}
- name: "Compile Binary"
if: ${{ matrix.arch != 64 }}
run: |
cd gfwens
./premake5.exe vs2019
MSBuild.exe /p:Configuration=Release
- uses: actions/upload-artifact@v4
with:
name: gmsv_fwens_win${{matrix.arch}}.dll
path: gfwens\bin\release\gmsv_fwens_win${{matrix.arch}}.dll
###
build-linux:
runs-on: ubuntu-latest
needs: fetch-dependencies
strategy:
matrix:
arch: [32, 64]
steps:
- uses: actions/checkout@v4
with:
repository: facepunch/gmod-module-base
ref: refs/heads/development
path: gmodheaders
- uses: actions/checkout@v4
with:
path: gfwens
- uses: actions/download-artifact@v4
with:
name: premake-persistence
path: gfwens
- uses: actions/download-artifact@v4
with:
name: sdk-persistence-64
path: gfwens/deps
- name: "Compile Binary"
run: |
sudo apt update && sudo apt install gcc-multilib g++-multilib -y
cd gfwens
chmod +x ./premake5
./premake5 gmake2
make config=release_x${{matrix.arch}}
- uses: actions/upload-artifact@v4
if: ${{ matrix.arch != 64 }}
with:
name: gmsv_fwens_linux.dll
path: gfwens/bin/release/gmsv_fwens_linux.dll
- uses: actions/upload-artifact@v4
if: ${{ matrix.arch == 64 }}
with:
name: gmsv_fwens_linux${{matrix.arch}}.dll
path: gfwens/bin/release/gmsv_fwens_linux${{matrix.arch}}.dll
# release:
# name: Build Cleanup
# runs-on: ubuntu-latest
# if: always()
# needs: [build-linux, build-win]
# steps:
# - uses: geekyeggo/delete-artifact@v5
# with:
# name: |
# premake-persistence
# sdk-persistence-32
# sdk-persistence-64