Skip to content

Implement ScriptEntity #2025

Implement ScriptEntity

Implement ScriptEntity #2025

Workflow file for this run

name: Build
env:
# Compile in parallel where possible.
CL: /MP
# Path to the CMake build directory.
build: '${{ github.workspace }}/build'
# Triggers the workflow on push or pull request events for all branches.
on: [ push, pull_request ]
permissions:
contents: read
jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-2025 ]
arch: [ x86 ]
conf: [ Debug, Release ]
preset: [ NoUnity, Unity ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Conan via Python
shell: cmd
run: |
python -m pip install --upgrade pip
python -m pip install conan
- name: Setup ${{ matrix.conf }}-${{ matrix.arch }}
shell: cmd
run: |
conan profile detect
python setup.py --buildconf ${{ matrix.conf }} ${{ matrix.preset == 'NoUnity' && '--no-unity-build' || '' }}
- name: Build ${{ matrix.conf }}-${{ matrix.arch }}
shell: cmd
run: cmake --build build --config ${{ matrix.conf }}
- name: Upload artifacts for ${{ matrix.conf }}-${{ matrix.arch }}
uses: actions/upload-artifact@v4
with:
name: gta_reversed-${{ matrix.conf }}-${{ matrix.preset }}
path: bin/${{ matrix.conf }}
- name: Initialize MSVC Code Analysis
uses: microsoft/[email protected]
# Provide a unique ID to access the sarif output path
id: run-analysis
with:
cmakeBuildDirectory: ${{ env.build }}
# Ruleset file that will determine what checks will be run
ruleset: NativeRecommendedRules.ruleset
buildConfiguration: ${{ matrix.conf }}
# Exclude external libraries from analysis
ignoredPaths: ${{ github.workspace }}/libs
# Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}