This repository was archived by the owner on Jul 6, 2026. It is now read-only.
forked from linventif/gm_8bit
-
Notifications
You must be signed in to change notification settings - Fork 0
175 lines (151 loc) · 6.14 KB
/
Copy pathc-cpp.yml
File metadata and controls
175 lines (151 loc) · 6.14 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
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
166
167
168
169
170
171
172
173
174
175
name: Build
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
build-linux:
runs-on: ubuntu-22.04
steps:
- name: Checkout main repo
uses: actions/checkout@v4
- name: Checkout garrysmod_common (pinned)
uses: actions/checkout@v4
with:
repository: danielga/garrysmod_common
ref: 63bd98014b342d4250ce365ad856f9132ee7c11e
path: garrysmod_common
fetch-depth: 1
submodules: recursive
- name: Install Premake & dépendances
run: |
wget https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz -O premake.tar.gz
tar -xzf premake.tar.gz
chmod +x premake5
sudo mv premake5 /usr/local/bin/
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y g++-multilib pkg-config
# Install 32-bit libcurl dev package
sudo apt-get install -y libcurl4-openssl-dev:i386
# Install 64-bit dev package (this might have curl already installed, causing conflict)
# We'll force overwrite the conflicting curl-config file
sudo apt-get -o Dpkg::Options::="--force-overwrite" install -y libcurl4-openssl-dev || true
gcc --version
# Verify libraries and pkg-config
pkg-config --modversion libcurl || echo "pkg-config for libcurl not found"
ls -la /usr/lib/i386-linux-gnu/libcurl.so* 2>/dev/null || echo "32-bit libcurl not found"
ls -la /usr/lib/x86_64-linux-gnu/libcurl.so* 2>/dev/null || echo "64-bit libcurl not found"
- name: Génération du projet avec Premake
run: |
premake5 --gmcommon=garrysmod_common gmake
- name: Compilation Linux
run: |
cd projects/linux/gmake
make
make config=releasewithsymbols_x86_64
- name: Upload artifact Linux x86
uses: actions/upload-artifact@v4
with:
name: gmsv_voice_transcript_linux.dll
path: projects/linux/gmake/x86/ReleaseWithSymbols/gmsv_voice_transcript_linux.dll
- name: Upload artifact Linux x86_64
uses: actions/upload-artifact@v4
with:
name: gmsv_voice_transcript_linux64.dll
path: projects/linux/gmake/x86_64/ReleaseWithSymbols/gmsv_voice_transcript_linux64.dll
build-windows:
runs-on: windows-2022
steps:
- name: Checkout main repo
uses: actions/checkout@v4
- name: Checkout garrysmod_common (pinned)
uses: actions/checkout@v4
with:
repository: danielga/garrysmod_common
ref: 63bd98014b342d4250ce365ad856f9132ee7c11e
path: garrysmod_common
fetch-depth: 1
submodules: recursive
- name: Install Premake
run: |
curl -L https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-windows.zip -o premake.zip
Expand-Archive premake.zip -DestinationPath premake
- name: Add Premake to PATH
shell: pwsh
run: |
"$Env:GITHUB_WORKSPACE\premake" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Generate Project with Premake
shell: pwsh
run: premake5.exe --gmcommon=garrysmod_common vs2022
- name: Build Win32
shell: pwsh
run: |
cd projects/windows/vs2022
$msbuild = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
& $msbuild voice_transcript.sln /p:Configuration=ReleaseWithSymbols /p:Platform=Win32
- name: Upload artifact Windows x86
uses: actions/upload-artifact@v4
with:
name: gmsv_voice_transcript_win32.dll
path: projects/windows/vs2022/x86/ReleaseWithSymbols/gmsv_voice_transcript_win32.dll
- name: Build x64
shell: pwsh
run: |
cd projects/windows/vs2022
$msbuild = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
& $msbuild voice_transcript.sln /p:Configuration=ReleaseWithSymbols /p:Platform=x64
- name: Upload artifact Windows x64
uses: actions/upload-artifact@v4
with:
name: gmsv_voice_transcript_win64.dll
path: projects/windows/vs2022/x86_64/ReleaseWithSymbols/gmsv_voice_transcript_win64.dll
release:
name: Publish Release
needs:
- build-linux
- build-windows
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
permissions:
contents: write
steps:
- name: Download Linux 32‑bit DLL
uses: actions/download-artifact@v4
with:
name: gmsv_voice_transcript_linux.dll
path: release/linux32
- name: Download Linux 64‑bit DLL
uses: actions/download-artifact@v4
with:
name: gmsv_voice_transcript_linux64.dll
path: release/linux64
- name: Download Windows 32‑bit DLL
uses: actions/download-artifact@v4
with:
name: gmsv_voice_transcript_win32.dll
path: release/win32
- name: Download Windows 64‑bit DLL
uses: actions/download-artifact@v4
with:
name: gmsv_voice_transcript_win64.dll
path: release/win64
- name: Create Release with Assets
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.run_number }}
name: v${{ github.run_number }}
body: |
Voice Recorder Module - Build ${{ github.run_number }}
Download the appropriate DLL for your platform and place it in garrysmod/lua/bin/
files: |
release/linux32/gmsv_voice_transcript_linux.dll
release/linux64/gmsv_voice_transcript_linux64.dll
release/win32/gmsv_voice_transcript_win32.dll
release/win64/gmsv_voice_transcript_win64.dll
draft: false
prerelease: false