11name : Build
22
33on : [push, pull_request, workflow_dispatch]
4-
5- env :
6- PROJECT_NAME : " httpserver"
7- BUILD_64x : " true"
8- REALM : " sv"
9- FINAL_REALM : " sv"
104
115jobs :
12- build-linux :
13- runs-on : ubuntu-latest
14- container : debian:bullseye
15- steps :
16- - name : Install Dependencies
17- run : |
18- dpkg --add-architecture i386
19- apt update
20- apt install -y build-essential git libstdc++6:i386 gcc-multilib g++-multilib wget
21-
22- - uses : actions/checkout@v3
23- - uses : actions/checkout@v3
24- with :
25- submodules : recursive
26- repository : danielga/garrysmod_common
27- ref : master
28- path : ' garrysmod_common'
29-
30- - name : Install Premake
31- run : |
32- wget https://github.com/danielga/garrysmod_common/releases/download/premake-build%2F5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -O premake.tar.gz
33- tar -xvf premake.tar.gz --directory=/usr/bin
34- gcc --version
35-
36- - name : Generate Project
37- run : |
38- premake5 --gmcommon=garrysmod_common gmake
39-
40- - name : Make
41- run : |
42- cd projects/linux/gmake
43- make
44-
45- - uses : actions/upload-artifact@v2
46- with :
47- name : gm${{env.FINAL_REALM}}_${{env.PROJECT_NAME}}_linux.dll
48- path : projects/linux/gmake/x86/ReleaseWithSymbols/gm${{env.REALM}}_${{env.PROJECT_NAME}}_linux.dll
49-
50- build-linux-64x :
51- runs-on : ubuntu-latest
52- container : debian:bullseye
53- steps :
54- - name : Install Dependencies
55- if : env.BUILD_64x == 'true'
56- run : |
57- dpkg --add-architecture i386
58- apt update
59- apt install -y build-essential git libstdc++6:i386 gcc-multilib g++-multilib wget
60-
61- - uses : actions/checkout@v3
62- if : env.BUILD_64x == 'true'
63-
64- - uses : actions/checkout@v3
65- if : env.BUILD_64x == 'true'
66- with :
67- submodules : recursive
68- repository : danielga/garrysmod_common
69- ref : x86-64-support-sourcesdk
70- path : ' garrysmod_common'
71-
72- - name : Install Premake
73- if : env.BUILD_64x == 'true'
74- run : |
75- wget https://github.com/danielga/garrysmod_common/releases/download/premake-build%2F5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -O premake.tar.gz
76- tar -xvf premake.tar.gz --directory=/usr/bin
77- gcc --version
78-
79- - name : Generate Project
80- if : env.BUILD_64x == 'true'
81- run : |
82- premake5 --gmcommon=garrysmod_common gmake
83-
84- - name : Make 64x
85- if : env.BUILD_64x == 'true'
86- run : |
87- cd projects/linux/gmake
88- make config=releasewithsymbols_x86_64
89-
90- - uses : actions/upload-artifact@v2
91- if : env.BUILD_64x == 'true'
92- with :
93- name : gm${{env.FINAL_REALM}}_${{env.PROJECT_NAME}}_linux64.dll
94- path : projects/linux/gmake/x86_64/ReleaseWithSymbols/gm${{env.REALM}}_${{env.PROJECT_NAME}}_linux64.dll
95-
96- build-windows :
97- runs-on : windows-2019
98- steps :
99- - uses : actions/checkout@v2
100- - uses : actions/checkout@v2
101- with :
102- submodules : recursive
103- repository : danielga/garrysmod_common
104- path : ' garrysmod_common'
105- ref : master
106-
107- - name : Install Premake
108- run : |
109- curl -L https://github.com/danielga/garrysmod_common/releases/download/premake-build%2F5.0.0-beta2/premake-5.0.0-beta2-windows.zip -o premake.zip
110- tar -xf premake.zip
111-
112- - name : Generate Project
113- run : |
114- ./premake5.exe --gmcommon=garrysmod_common vs2019
115-
116- - name : Build
117- run : |
118- cd projects/windows/vs2019
119- & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=ReleaseWithSymbols /p:Platform=Win32 ${{env.PROJECT_NAME}}.sln
120-
121- - uses : actions/upload-artifact@v2
122- with :
123- name : gm${{env.FINAL_REALM}}_${{env.PROJECT_NAME}}_win32.dll
124- path : projects/windows/vs2019/x86/ReleaseWithSymbols/gm${{env.REALM}}_${{env.PROJECT_NAME}}_win32.dll
125-
126- build-windows-64x :
127- runs-on : windows-2019
128- steps :
129- - uses : actions/checkout@v2
130- if : env.BUILD_64x == 'true'
131-
132- - uses : actions/checkout@v2
133- if : env.BUILD_64x == 'true'
134- with :
135- submodules : recursive
136- repository : danielga/garrysmod_common
137- path : ' garrysmod_common'
138- ref : x86-64-support-sourcesdk
139-
140- - name : Install Premake
141- if : env.BUILD_64x == 'true'
142- run : |
143- curl -L https://github.com/danielga/garrysmod_common/releases/download/premake-build%2F5.0.0-beta2/premake-5.0.0-beta2-windows.zip -o premake.zip
144- tar -xf premake.zip
145-
146- - name : Generate Project
147- if : env.BUILD_64x == 'true'
148- run : |
149- ./premake5.exe --gmcommon=garrysmod_common vs2019
150-
151- - name : Build
152- if : env.BUILD_64x == 'true'
153- run : |
154- cd projects/windows/vs2019
155- & "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" /p:Configuration=ReleaseWithSymbols /p:Platform=x64 ${{env.PROJECT_NAME}}.sln
156-
157- - uses : actions/upload-artifact@v2
158- if : env.BUILD_64x == 'true'
159- with :
160- name : gm${{env.FINAL_REALM}}_${{env.PROJECT_NAME}}_win64.dll
161- path : projects/windows/vs2019/x86_64/ReleaseWithSymbols/gm${{env.REALM}}_${{env.PROJECT_NAME}}_win64.dll
6+ build :
7+ uses : RaphaelIT7/gmodcommon-module-base/.github/workflows/compile.yml@workflow
8+ with :
9+ PROJECT_NAME : " httpserver"
10+ BUILD_64x : " true"
11+ REALM : " sv"
12+ FINAL_REALM : " sv"
0 commit comments