Skip to content

Commit d947087

Browse files
committed
Added linux and macos autobuilds
1 parent 6d658c9 commit d947087

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

.github/workflows/build.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,110 @@ jobs:
7777
path: |
7878
./*.dll
7979
if-no-files-found: error
80+
81+
linux:
82+
runs-on: ubuntu-20.04 # Using ubuntu 20.04 since we want to use old gcc version to ensure compatibility
83+
steps:
84+
- uses: actions/checkout@v3
85+
with:
86+
submodules: 'recursive'
87+
88+
- name: Install dependencies
89+
run: |
90+
sudo apt install gcc-multilib g++-multilib
91+
92+
- name: '[x32] Download garrysmod_common'
93+
uses: actions/checkout@v3
94+
with:
95+
repository: 'dankmolot/garrysmod_common'
96+
ref: 'master-cmake'
97+
submodules: 'recursive'
98+
path: 'third-party/garrysmod_common'
99+
100+
- name: '[x32] Configure project (Serverside)'
101+
run: |
102+
cmake -B build -S . \
103+
-DGARRYSMOD_COMMON_PATH="third-party/garrysmod_common" \
104+
-DAUTOINSTALL="." \
105+
-DBUILD_SHARED_LIBS=OFF \
106+
-DCMAKE_C_FLAGS="-m32" -DCMAKE_CXX_FLAGS="-m32"
107+
108+
- name: '[x32] Build project (Serverside)'
109+
run: cmake --build build --config Release -j -t asyncio
110+
111+
- name: '[x32] Configure project (Clientside)'
112+
run: cmake -B build -S . -DCLIENT_DLL=ON
113+
114+
- name: '[x32] Build project (Clientside)'
115+
run: cmake --build build --config Release -j -t asyncio
116+
117+
- name: '[x64] Download garrysmod_common'
118+
uses: actions/checkout@v3
119+
with:
120+
repository: 'dankmolot/garrysmod_common'
121+
ref: 'x86-64-cmake'
122+
submodules: 'recursive'
123+
path: 'third-party/garrysmod_common64'
124+
125+
- name: '[x64] Configure project (Serverside)'
126+
run: |
127+
cmake -B build64 -S . \
128+
-DGARRYSMOD_COMMON_PATH="third-party/garrysmod_common64" \
129+
-DAUTOINSTALL="." \
130+
-DBUILD_SHARED_LIBS=OFF
131+
132+
- name: '[x64] Build project (Serverside)'
133+
run: cmake --build build64 --config Release -j -t asyncio
134+
135+
- name: '[x64] Configure project (Clientside)'
136+
run: cmake -B build64 -S . -DCLIENT_DLL=ON
137+
138+
- name: '[x64] Build project (Clientside)'
139+
run: cmake --build build64 --config Release -j -t asyncio
140+
141+
- name: "Upload artifacts"
142+
uses: actions/upload-artifact@v3
143+
with:
144+
name: Linux
145+
path: |
146+
./*.dll
147+
if-no-files-found: error
148+
149+
macos:
150+
runs-on: macos-latest
151+
steps:
152+
- uses: actions/checkout@v3
153+
with:
154+
submodules: 'recursive'
155+
156+
- name: '[x64] Download garrysmod_common'
157+
uses: actions/checkout@v3
158+
with:
159+
repository: 'dankmolot/garrysmod_common'
160+
ref: 'x86-64-cmake'
161+
submodules: 'recursive'
162+
path: 'third-party/garrysmod_common64'
163+
164+
- name: '[x64] Configure project (Serverside)'
165+
run: |
166+
cmake -B build64 -S . \
167+
-DGARRYSMOD_COMMON_PATH="third-party/garrysmod_common64" \
168+
-DAUTOINSTALL="." \
169+
-DBUILD_SHARED_LIBS=OFF
170+
171+
- name: '[x64] Build project (Serverside)'
172+
run: cmake --build build64 --config Release -j -t asyncio
173+
174+
- name: '[x64] Configure project (Clientside)'
175+
run: cmake -B build64 -S . -DCLIENT_DLL=ON
176+
177+
- name: '[x64] Build project (Clientside)'
178+
run: cmake --build build64 --config Release -j -t asyncio
179+
180+
- name: "Upload artifacts"
181+
uses: actions/upload-artifact@v3
182+
with:
183+
name: MacOS
184+
path: |
185+
./*.dll
186+
if-no-files-found: error

0 commit comments

Comments
 (0)