Skip to content

Commit fe80ba8

Browse files
committed
Updates in Github workflows
Added test plugin project to build after SDK is build Added error and warning annotations to build job
1 parent 23b4762 commit fe80ba8

8 files changed

Lines changed: 317 additions & 60 deletions

File tree

.github/workflows/Build_Plugin_GTA_2.yml

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,50 @@
1-
name: Build Plugin GTA2
1+
name: Plugin GTA2
22

33
on:
4+
workflow_dispatch:
5+
46
push:
57
paths:
6-
- "!**.dll"
7-
- "!**.md"
8-
- "!**.txt"
9-
- "hooking/**"
10-
- "injector/**"
11-
- "modutils/**"
12-
- "safetyhook/**"
13-
- "shared/**"
14-
- "plugin_II/**"
8+
- "!**.dll"
9+
- "!**.md"
10+
- "!**.txt"
11+
- "tools/premake/**"
12+
- "hooking/**"
13+
- "injector/**"
14+
- "modutils/**"
15+
- "safetyhook/**"
16+
- "shared/**"
17+
- "plugin_II/**"
18+
19+
pull_request:
20+
paths:
21+
- "!**.dll"
22+
- "!**.md"
23+
- "!**.txt"
24+
- "tools/premake/**"
25+
- "hooking/**"
26+
- "injector/**"
27+
- "modutils/**"
28+
- "safetyhook/**"
29+
- "shared/**"
30+
- "plugin_II/**"
31+
32+
pull_request_target:
33+
paths:
34+
- "!**.dll"
35+
- "!**.md"
36+
- "!**.txt"
37+
- "tools/premake/**"
38+
- "hooking/**"
39+
- "injector/**"
40+
- "modutils/**"
41+
- "safetyhook/**"
42+
- "shared/**"
43+
- "plugin_II/**"
1544

1645
jobs:
1746
build:
18-
name: Build Plugin GTA2
47+
name: Build
1948
runs-on: windows-2022
2049

2150
steps:
@@ -36,5 +65,22 @@ jobs:
3665
- name: Build
3766
shell: cmd
3867
run: |
68+
rem Compile SDK and test plugin projects
69+
echo off
3970
set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%
40-
msbuild -m plugin.sln /property:Configuration=zDebug /property:Platform="Mixed Platforms" /target:plugin_ii
71+
72+
echo ::group::Build SDK
73+
msbuild plugin.sln /property:Configuration=zDebug /property:Platform="Mixed Platforms" /target:plugin_ii /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
74+
powershell -Command "(gc output.log) | sort | get-unique > output.log"
75+
powershell -Command "(gc output.log) -replace ' 2>','' -replace 'D:\\a\\plugin-sdk\\plugin-sdk\\','' | Out-File -encoding ASCII output.log"
76+
powershell -Command "foreach($line in Get-Content 'output.log') { $m = $line -match '^(.*)\((\d+),(\d+)\): (\w+) (.*) \[.*\]$'; if ($m) {$m = $Matches; echo ('::'+$m[4]+' file='+$m[1]+',line='+$m[2]+',title=SDK compilation::'+$m[5])} else {echo ('::error title=SDK compilation::' + $line)} }"
77+
for %%R in (output.log) do if not %%~zR lss 1 (exit 1)
78+
echo ::groupEnd::
79+
80+
echo ::group::Build test plugin
81+
msbuild examples\Test\Test.sln /property:Configuration=Debug /property:Platform=GTA2 /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
82+
powershell -Command "(gc output.log) | sort | get-unique > output.log"
83+
powershell -Command "(gc output.log) -replace ' 2>','' -replace 'D:\\a\\plugin-sdk\\plugin-sdk\\','' | Out-File -encoding ASCII output.log"
84+
powershell -Command "foreach($line in Get-Content 'output.log') { $m = $line -match '^(.*)\((\d+),(\d+)\): (\w+) (.*) \[.*\]$'; if ($m) {$m = $Matches; echo ('::'+$m[4]+' file='+$m[1]+',line='+$m[2]+',title=Test plugin compilation::'+$m[5])} else {echo ('::error title=Test plugin compilation::' + $line)} }"
85+
for %%R in (output.log) do if not %%~zR lss 1 (exit 1)
86+
echo ::groupEnd::

.github/workflows/Build_Plugin_GTA_3.yml

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,50 @@
1-
name: Build Plugin GTA3
1+
name: Plugin GTA3
22

33
on:
4+
workflow_dispatch:
5+
46
push:
57
paths:
6-
- "!**.dll"
7-
- "!**.md"
8-
- "!**.txt"
9-
- "hooking/**"
10-
- "injector/**"
11-
- "modutils/**"
12-
- "safetyhook/**"
13-
- "shared/**"
14-
- "plugin_III/**"
8+
- "!**.dll"
9+
- "!**.md"
10+
- "!**.txt"
11+
- "tools/premake/**"
12+
- "hooking/**"
13+
- "injector/**"
14+
- "modutils/**"
15+
- "safetyhook/**"
16+
- "shared/**"
17+
- "plugin_III/**"
18+
19+
pull_request:
20+
paths:
21+
- "!**.dll"
22+
- "!**.md"
23+
- "!**.txt"
24+
- "tools/premake/**"
25+
- "hooking/**"
26+
- "injector/**"
27+
- "modutils/**"
28+
- "safetyhook/**"
29+
- "shared/**"
30+
- "plugin_III/**"
31+
32+
pull_request_target:
33+
paths:
34+
- "!**.dll"
35+
- "!**.md"
36+
- "!**.txt"
37+
- "tools/premake/**"
38+
- "hooking/**"
39+
- "injector/**"
40+
- "modutils/**"
41+
- "safetyhook/**"
42+
- "shared/**"
43+
- "plugin_III/**"
1544

1645
jobs:
1746
build:
18-
name: Build Plugin GTA3
47+
name: Build
1948
runs-on: windows-2022
2049

2150
steps:
@@ -36,5 +65,22 @@ jobs:
3665
- name: Build
3766
shell: cmd
3867
run: |
68+
rem Compile SDK and test plugin projects
69+
echo off
3970
set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%
40-
msbuild -m plugin.sln /property:Configuration=zDebug /property:Platform="Mixed Platforms" /target:plugin_iii
71+
72+
echo ::group::Build SDK
73+
msbuild plugin.sln /property:Configuration=zDebug /property:Platform="Mixed Platforms" /target:plugin_iii /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
74+
powershell -Command "(gc output.log) | sort | get-unique > output.log"
75+
powershell -Command "(gc output.log) -replace ' 2>','' -replace 'D:\\a\\plugin-sdk\\plugin-sdk\\','' | Out-File -encoding ASCII output.log"
76+
powershell -Command "foreach($line in Get-Content 'output.log') { $m = $line -match '^(.*)\((\d+),(\d+)\): (\w+) (.*) \[.*\]$'; if ($m) {$m = $Matches; echo ('::'+$m[4]+' file='+$m[1]+',line='+$m[2]+',title=SDK compilation::'+$m[5])} else {echo ('::error title=SDK compilation::' + $line)} }"
77+
for %%R in (output.log) do if not %%~zR lss 1 (exit 1)
78+
echo ::groupEnd::
79+
80+
echo ::group::Build test plugin
81+
msbuild examples\Test\Test.sln /property:Configuration=Debug /property:Platform=GTA3 /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
82+
powershell -Command "(gc output.log) | sort | get-unique > output.log"
83+
powershell -Command "(gc output.log) -replace ' 2>','' -replace 'D:\\a\\plugin-sdk\\plugin-sdk\\','' | Out-File -encoding ASCII output.log"
84+
powershell -Command "foreach($line in Get-Content 'output.log') { $m = $line -match '^(.*)\((\d+),(\d+)\): (\w+) (.*) \[.*\]$'; if ($m) {$m = $Matches; echo ('::'+$m[4]+' file='+$m[1]+',line='+$m[2]+',title=Test plugin compilation::'+$m[5])} else {echo ('::error title=Test plugin compilation::' + $line)} }"
85+
for %%R in (output.log) do if not %%~zR lss 1 (exit 1)
86+
echo ::groupEnd::

.github/workflows/Build_Plugin_GTA_4.yml

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,50 @@
1-
name: Build Plugin GTA4
1+
name: Plugin GTA4
22

33
on:
4+
workflow_dispatch:
5+
46
push:
57
paths:
6-
- "!**.dll"
7-
- "!**.md"
8-
- "!**.txt"
9-
- "hooking/**"
10-
- "injector/**"
11-
- "modutils/**"
12-
- "safetyhook/**"
13-
- "shared/**"
14-
- "plugin_IV/**"
8+
- "!**.dll"
9+
- "!**.md"
10+
- "!**.txt"
11+
- "tools/premake/**"
12+
- "hooking/**"
13+
- "injector/**"
14+
- "modutils/**"
15+
- "safetyhook/**"
16+
- "shared/**"
17+
- "plugin_IV/**"
18+
19+
pull_request:
20+
paths:
21+
- "!**.dll"
22+
- "!**.md"
23+
- "!**.txt"
24+
- "tools/premake/**"
25+
- "hooking/**"
26+
- "injector/**"
27+
- "modutils/**"
28+
- "safetyhook/**"
29+
- "shared/**"
30+
- "plugin_IV/**"
31+
32+
pull_request_target:
33+
paths:
34+
- "!**.dll"
35+
- "!**.md"
36+
- "!**.txt"
37+
- "tools/premake/**"
38+
- "hooking/**"
39+
- "injector/**"
40+
- "modutils/**"
41+
- "safetyhook/**"
42+
- "shared/**"
43+
- "plugin_IV/**"
1544

1645
jobs:
1746
build:
18-
name: Build Plugin GTA4
47+
name: Build
1948
runs-on: windows-2022
2049

2150
steps:
@@ -36,5 +65,22 @@ jobs:
3665
- name: Build
3766
shell: cmd
3867
run: |
68+
rem Compile SDK and test plugin projects
69+
echo off
3970
set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%
40-
msbuild -m plugin.sln /property:Configuration=zDebug /property:Platform="Mixed Platforms" /target:plugin_iv
71+
72+
echo ::group::Build SDK
73+
msbuild plugin.sln /property:Configuration=zDebug /property:Platform="Mixed Platforms" /target:plugin_iv /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
74+
powershell -Command "(gc output.log) | sort | get-unique > output.log"
75+
powershell -Command "(gc output.log) -replace ' 2>','' -replace 'D:\\a\\plugin-sdk\\plugin-sdk\\','' | Out-File -encoding ASCII output.log"
76+
powershell -Command "foreach($line in Get-Content 'output.log') { $m = $line -match '^(.*)\((\d+),(\d+)\): (\w+) (.*) \[.*\]$'; if ($m) {$m = $Matches; echo ('::'+$m[4]+' file='+$m[1]+',line='+$m[2]+',title=SDK compilation::'+$m[5])} else {echo ('::error title=SDK compilation::' + $line)} }"
77+
for %%R in (output.log) do if not %%~zR lss 1 (exit 1)
78+
echo ::groupEnd::
79+
80+
echo ::group::Build test plugin
81+
msbuild examples\Test\Test.sln /property:Configuration=Debug /property:Platform=GTA4 /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
82+
powershell -Command "(gc output.log) | sort | get-unique > output.log"
83+
powershell -Command "(gc output.log) -replace ' 2>','' -replace 'D:\\a\\plugin-sdk\\plugin-sdk\\','' | Out-File -encoding ASCII output.log"
84+
powershell -Command "foreach($line in Get-Content 'output.log') { $m = $line -match '^(.*)\((\d+),(\d+)\): (\w+) (.*) \[.*\]$'; if ($m) {$m = $Matches; echo ('::'+$m[4]+' file='+$m[1]+',line='+$m[2]+',title=Test plugin compilation::'+$m[5])} else {echo ('::error title=Test plugin compilation::' + $line)} }"
85+
for %%R in (output.log) do if not %%~zR lss 1 (exit 1)
86+
echo ::groupEnd::

.github/workflows/Build_Plugin_GTA_SA.yml

Lines changed: 58 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,50 @@
1-
name: Build Plugin GTA SA
1+
name: Plugin GTA SA
22

33
on:
4+
workflow_dispatch:
5+
46
push:
57
paths:
6-
- "!**.dll"
7-
- "!**.md"
8-
- "!**.txt"
9-
- "hooking/**"
10-
- "injector/**"
11-
- "modutils/**"
12-
- "safetyhook/**"
13-
- "shared/**"
14-
- "plugin_sa/**"
8+
- "!**.dll"
9+
- "!**.md"
10+
- "!**.txt"
11+
- "tools/premake/**"
12+
- "hooking/**"
13+
- "injector/**"
14+
- "modutils/**"
15+
- "safetyhook/**"
16+
- "shared/**"
17+
- "plugin_sa/**"
18+
19+
pull_request:
20+
paths:
21+
- "!**.dll"
22+
- "!**.md"
23+
- "!**.txt"
24+
- "tools/premake/**"
25+
- "hooking/**"
26+
- "injector/**"
27+
- "modutils/**"
28+
- "safetyhook/**"
29+
- "shared/**"
30+
- "plugin_sa/**"
31+
32+
pull_request_target:
33+
paths:
34+
- "!**.dll"
35+
- "!**.md"
36+
- "!**.txt"
37+
- "tools/premake/**"
38+
- "hooking/**"
39+
- "injector/**"
40+
- "modutils/**"
41+
- "safetyhook/**"
42+
- "shared/**"
43+
- "plugin_sa/**"
1544

1645
jobs:
1746
build:
18-
name: Build Plugin GTA SA
47+
name: Build
1948
runs-on: windows-2022
2049

2150
steps:
@@ -36,5 +65,22 @@ jobs:
3665
- name: Build
3766
shell: cmd
3867
run: |
68+
rem Compile SDK and test plugin projects
69+
echo off
3970
set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%
40-
msbuild -m plugin.sln /property:Configuration=zDebug /property:Platform="Mixed Platforms" /target:plugin_sa
71+
72+
echo ::group::Build SDK
73+
msbuild plugin.sln /property:Configuration=zDebug /property:Platform="Mixed Platforms" /target:plugin_sa /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
74+
powershell -Command "(gc output.log) | sort | get-unique > output.log"
75+
powershell -Command "(gc output.log) -replace ' 2>','' -replace 'D:\\a\\plugin-sdk\\plugin-sdk\\','' | Out-File -encoding ASCII output.log"
76+
powershell -Command "foreach($line in Get-Content 'output.log') { $m = $line -match '^(.*)\((\d+),(\d+)\): (\w+) (.*) \[.*\]$'; if ($m) {$m = $Matches; echo ('::'+$m[4]+' file='+$m[1]+',line='+$m[2]+',title=SDK compilation::'+$m[5])} else {echo ('::error title=SDK compilation::' + $line)} }"
77+
for %%R in (output.log) do if not %%~zR lss 1 (exit 1)
78+
echo ::groupEnd::
79+
80+
echo ::group::Build test plugin
81+
msbuild examples\Test\Test.sln /property:Configuration=Debug /property:Platform=GTASA /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
82+
powershell -Command "(gc output.log) | sort | get-unique > output.log"
83+
powershell -Command "(gc output.log) -replace ' 2>','' -replace 'D:\\a\\plugin-sdk\\plugin-sdk\\','' | Out-File -encoding ASCII output.log"
84+
powershell -Command "foreach($line in Get-Content 'output.log') { $m = $line -match '^(.*)\((\d+),(\d+)\): (\w+) (.*) \[.*\]$'; if ($m) {$m = $Matches; echo ('::'+$m[4]+' file='+$m[1]+',line='+$m[2]+',title=Test plugin compilation::'+$m[5])} else {echo ('::error title=Test plugin compilation::' + $line)} }"
85+
for %%R in (output.log) do if not %%~zR lss 1 (exit 1)
86+
echo ::groupEnd::

0 commit comments

Comments
 (0)