Skip to content

Commit 7ea3df6

Browse files
committed
ci(build.yml): update comments for clarity and consistency
ci(build.yml): add detailed comments explaining each step in the build process ci(build.yml): correct comment about MSBuild property precedence and toolset version ci(build.yml): update artifact collection comments to reflect current directory structure ci(build.yml): add comments explaining the purpose of the release job
1 parent 7c80380 commit 7ea3df6

1 file changed

Lines changed: 23 additions & 26 deletions

File tree

.github/workflows/build.yml

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
submodules: recursive
2424

2525
# -------------------------------------------------------------------
26-
# Instala o toolset v141 (VS 2017) + suporte a XP no VS 2022 presente
27-
# no runner. O componente WinXP habilita o v141_xp usado pelo premake.
26+
# Install v141 (VS 2017) toolset and WinXP support on the runner.
27+
# The WinXP component provides the v141_xp toolset required by premake.
2828
# -------------------------------------------------------------------
2929
- name: Install v141_xp toolset
3030
shell: cmd
@@ -38,17 +38,18 @@ jobs:
3838
# retornar código != 0, o que torna o problema visível nos logs.
3939

4040
# -------------------------------------------------------------------
41-
# Gera os projetos VS2015 via Premake (o .exe já está no repo).
42-
# O premake define PlatformToolset=v140_xp nos .vcxproj; vamos
43-
# sobrescrever isso no MSBuild mais abaixo — sem tocar no premake5.lua.
41+
# Generate VS2015 project files using Premake (premake5.exe included
42+
# in the repository).
43+
# Premake sets PlatformToolset=v140_xp in the .vcxproj files; this is
44+
# overridden when invoking MSBuild below without modifying premake5.lua.
4445
# -------------------------------------------------------------------
4546
- name: Generate project files (vs2015)
4647
shell: cmd
4748
run: premake5.exe vs2015 --outdir=build_temp
4849

4950
# -------------------------------------------------------------------
50-
# Configura o ambiente MSVC para o toolset 14.16 (VS 2017 / v141).
51-
# Necessário para que o msbuild encontre o compilador correto.
51+
# Configure MSVC environment for toolset 14.16 (VS 2017 / v141).
52+
# Required so msbuild can locate the correct compiler and toolset.
5253
# -------------------------------------------------------------------
5354
- name: Setup MSVC environment (v141)
5455
uses: ilammy/msvc-dev-cmd@v1
@@ -57,16 +58,12 @@ jobs:
5758
toolset: 14.16 # toolset do VS 2017
5859

5960
# -------------------------------------------------------------------
60-
# Compila sobrescrevendo o PlatformToolset para v141_xp.
61-
#
62-
# Por que funciona sem mexer nos .vcxproj:
63-
# O MSBuild permite que qualquer propriedade definida em /p: na linha
64-
# de comando tenha precedência sobre o valor do arquivo de projeto.
65-
# "v141_xp" é exatamente o mesmo toolset que você confirmou funcionar
66-
# ao alterar manualmente pelo Visual Studio 2017.
67-
#
68-
# /m → paralelismo (usa todos os núcleos do runner).
69-
# /v:m → verbosidade minimal para logs legíveis.
61+
# Build and override PlatformToolset to v141_xp via MSBuild.
62+
# MSBuild command-line properties passed with /p: take precedence over
63+
# project file values. v141_xp is the v141 toolset variant that provides
64+
# WinXP support.
65+
# /m -> enable parallel build using all available cores.
66+
# /v:m -> minimal verbosity for concise logs.
7067
# -------------------------------------------------------------------
7168
- name: Build (${{ matrix.configuration }})
7269
shell: cmd
@@ -78,32 +75,32 @@ jobs:
7875
/m /v:m
7976
8077
# -------------------------------------------------------------------
81-
# Coleta os binários gerados.
82-
# Estrutura de saída do premake: bin/ (modloader.asi) e
83-
# bin/plugins/gta3/*.dll para os plugins.
78+
# Collect generated binaries.
79+
# Premake output layout: bin/ (modloader.asi) and
80+
# bin/plugins/gta3/*.dll for plugins.
8481
# -------------------------------------------------------------------
8582
- name: Collect artifacts
8683
shell: pwsh
8784
run: |
8885
$cfg = "${{ matrix.configuration }}"
8986
$dest = "artifacts\modloader-$cfg"
9087
91-
# ASI principal
88+
# Main ASI binary
9289
New-Item -ItemType Directory -Force -Path "$dest" | Out-Null
9390
Copy-Item "bin\modloader.asi" "$dest\" -ErrorAction SilentlyContinue
9491
95-
# Plugins gta3
92+
# GTA3 plugins
9693
$pluginSrc = "bin\plugins\gta3"
9794
if (Test-Path $pluginSrc) {
9895
New-Item -ItemType Directory -Force -Path "$dest\plugins\gta3" | Out-Null
9996
Copy-Item "$pluginSrc\*.dll" "$dest\plugins\gta3\" -ErrorAction SilentlyContinue
10097
}
10198
102-
# PDBs (ficam junto aos binários no mesmo diretório)
99+
# PDB files (placed with binaries in the same directory)
103100
Copy-Item "bin\*.pdb" "$dest\" -ErrorAction SilentlyContinue
104101
Copy-Item "bin\plugins\gta3\*.pdb" "$dest\plugins\gta3\" -ErrorAction SilentlyContinue
105102
106-
# Docs / configs de exemplo
103+
# Example docs and configuration files
107104
Copy-Item "doc\config\*.ini.0" "$dest\" -ErrorAction SilentlyContinue
108105
Copy-Item "doc\CHANGELOG.md" "$dest\" -ErrorAction SilentlyContinue
109106
Copy-Item "LICENSE" "$dest\" -ErrorAction SilentlyContinue
@@ -120,8 +117,8 @@ jobs:
120117
retention-days: 30
121118

122119
# -----------------------------------------------------------------------
123-
# Job extra: cria uma Release no GitHub quando uma tag "v*.*.*" é enviada.
124-
# Só roda se o job build (Release) passou.
120+
# Extra job: create a GitHub Release when a tag matching v*.*.* is pushed.
121+
# Runs only if the build (Release) job completed successfully.
125122
# -----------------------------------------------------------------------
126123
release:
127124
if: startsWith(github.ref, 'refs/tags/v')

0 commit comments

Comments
 (0)