const #462
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Build | |
| on: | |
| workflow_dispatch: # manually | |
| push: | |
| branches-ignore: | |
| - master | |
| paths: | |
| - '**.c*' ## .c and .cpp | |
| - '**.h*' ## .h and .hpp | |
| - '**.def' | |
| - '**.lib' | |
| - '**.rc' | |
| - '**.vcproj' | |
| - '**.vcxproj.filters' | |
| - '**.sln' | |
| - '**.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| Validate_Code_Formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| submodules: "recursive" | |
| - name: clang-format | |
| uses: DoozyX/clang-format-lint-action@bcb4eb2cb0d707ee4f3e5cc3b456eb075f12cf73 # v0.20 | |
| with: | |
| clangFormatVersion: 20 | |
| Test_Build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| submodules: "recursive" | |
| - name: Set up MsBuild | |
| uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0 | |
| - name: Tag with current commit SHA | |
| id: custom_build | |
| run: node.exe .github/workflows/tag-custom-build.js | |
| - name: Core - Build | |
| shell: cmd | |
| run: | | |
| @echo off | |
| set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%\third-party\plugin-sdk | |
| msbuild CLEO5.sln /property:Configuration=Release /property:Platform=GTASA /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log | |
| node .github/workflows/analyze-build-log.js "Core compilation" | |
| - name: Core - VirusTotal scan | |
| id: scan_core | |
| env: | |
| vt_key: ${{secrets.VT_KEY}} | |
| if: ${{env.vt_key != ''}} | |
| uses: crazy-max/ghaction-virustotal@d34968c958ae283fe976efed637081b9f9dcf74f # v4.2.0 | |
| with: | |
| vt_api_key: ${{ secrets.VT_KEY }} | |
| files: './.output/Release/CLEO.asi' | |
| - name: Core - VirusTotal log | |
| if: steps.scan_core.outcome == 'success' | |
| run: echo "::notice title=CLEO Core virus scan::${{steps.scan_core.outputs.analysis}}" | |
| - name: Plugins - Build | |
| shell: cmd | |
| run: | | |
| @echo off | |
| set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%\third-party\plugin-sdk | |
| msbuild cleo_plugins/CLEO_Plugins.sln /property:Configuration=Release /property:Platform=x86 /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log | |
| node .github/workflows/analyze-build-log.js "Plugins compilation" | |
| - name: Plugins - VirusTotal scan | |
| id: scan_plugins | |
| env: | |
| vt_key: ${{secrets.VT_KEY}} | |
| if: ${{env.vt_key != ''}} | |
| uses: crazy-max/ghaction-virustotal@d34968c958ae283fe976efed637081b9f9dcf74f # v4.2.0 | |
| with: | |
| vt_api_key: ${{ secrets.VT_KEY }} | |
| files: './cleo_plugins/.output/*.cleo' | |
| - name: Plugins - VirusTotal log | |
| if: steps.scan_plugins.outcome == 'success' | |
| run: echo "::notice title=CLEO Core virus scan::${{steps.scan_plugins.outputs.analysis}}" | |
| - name: Gather output files | |
| shell: cmd | |
| run: | | |
| @echo Create directories | |
| mkdir .output\Release\cleo | |
| mkdir .output\Release\cleo\.config | |
| mkdir .output\Release\cleo\cleo_plugins | |
| @echo Copy files | |
| copy cleo_plugins\.output\*.cleo .output\Release\cleo\cleo_plugins | |
| @echo Download Sanny Builder Library json | |
| curl -fL https://raw.githubusercontent.com/sannybuilder/library/master/sa/sa.json -o .output\Release\cleo\.config\sa.json | |
| curl -fL https://raw.githubusercontent.com/sannybuilder/library/master/sa/enums.json -o .output\Release\cleo\.config\enums.json | |
| - name: Upload Result | |
| id: upload | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| compression-level: 9 | |
| include-hidden-files: true | |
| name: SA.CLEO-v${{steps.custom_build.outputs.version}}-${{steps.custom_build.outputs.sha}} | |
| path: | | |
| .output\Release\* | |
| !.output\Release\*.pdb | |
| !.output\Release\*.lib | |
| !.output\Release\*.exp | |
| - name: Log download link | |
| run: echo "::notice title=Download this build::${{steps.upload.outputs.artifact-url}}" |