Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6079222
Remove the v1 tree from the v2 branch
rasikhq Oct 5, 2026
3e59723
P1: v2 skeleton, dependencies and proofs
rasikhq Oct 5, 2026
814e7d7
docs: record player events from the real-server probe
rasikhq Oct 6, 2026
a007c38
ci: keep vcpkg packages across failed runs; MSVC fixes
rasikhq Oct 6, 2026
5384d3f
ci: clone vcpkg in full
rasikhq Oct 6, 2026
a7b0ae2
ci: say why the vcpkg clone is a full one
rasikhq Oct 6, 2026
03b02be
P2: core runtime
rasikhq Oct 9, 2026
1019564
P3: VC:MP SDK header for plugin API 2.1
rasikhq Oct 9, 2026
3a4f588
P3: checked binding arguments and a recording fake server
rasikhq Oct 9, 2026
3d49a08
P3: enums
rasikhq Oct 9, 2026
94826b1
P3: Player
rasikhq Oct 9, 2026
a207220
P3: Vehicle
rasikhq Oct 9, 2026
2a2b0eb
P3: Object
rasikhq Oct 9, 2026
2cf33af
P3: Pickup
rasikhq Oct 9, 2026
0b7432e
P3: Checkpoint
rasikhq Oct 9, 2026
123df50
P3: Bind (key binds)
rasikhq Oct 9, 2026
9261409
P3: Stream
rasikhq Oct 9, 2026
6dc9cb0
P3: Server, Map, Radio, Weapon, Blip and Sound
rasikhq Oct 9, 2026
c242333
P3: Logger and the removed v1 globals
rasikhq Oct 9, 2026
3cdefe6
P3: check the bindings against the real server, and fix what it found
rasikhq Oct 9, 2026
7eed131
P3: raw table reads, MSVC-friendly fake server, formatting
rasikhq Oct 9, 2026
4c72257
P3: real-client test script
rasikhq Oct 9, 2026
26af4a7
ci: MSVC: do not treat C4702 (unreachable code) as an error
rasikhq Oct 9, 2026
73b8156
P3: real-client results; fix the client script's two false failures
rasikhq Oct 9, 2026
9948fe8
P4: batteries, prelude and the integration smoke test
rasikhq Oct 9, 2026
87f17f9
Fix binding edge cases found while writing the API reference
rasikhq Oct 9, 2026
f6521d0
Docs, examples and the release workflow
rasikhq Oct 9, 2026
2876247
Trim comments and drop internal planning references
rasikhq Oct 9, 2026
056feb0
Ship as 3.0.0; add the third-party license texts
rasikhq Oct 9, 2026
4c4773c
Fix the CI failures on real x86 and Windows
rasikhq Oct 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* text=auto eol=lf
*.h linguist-language=C++
*.c linguist-language=C++
262 changes: 262 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
name: CI

on:
push:
branches: [master, v3]
pull_request:
workflow_call:
workflow_dispatch:
inputs:
jobs:
description: Jobs to run
type: choice
options: [all, linux, windows]
default: all

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

# The vcpkg packages are cached under a new key per run, and saved right after
# they are built, even when a later step fails: a fix cycle never rebuilds
# OpenSSL, curl or libpq. A run saves only when it built new packages.

jobs:
linux:
name: Linux x64 (manylinux_2_28)
if: github.event_name != 'workflow_dispatch' || inputs.jobs != 'windows'
runs-on: ubuntu-24.04
timeout-minutes: 90
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

- name: Build image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: ci
file: ci/manylinux.Dockerfile
tags: vcmp-lua-build
load: true
cache-from: type=gha,scope=manylinux
cache-to: type=gha,mode=max,scope=manylinux

- name: vcpkg cache key
id: key
run: echo "key=vcpkg-linux-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'cmake/triplets/x64-linux-plugin.cmake', 'ci/manylinux.Dockerfile') }}" >> "$GITHUB_OUTPUT"

- name: Restore vcpkg packages
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .cache/vcpkg-archives
key: ${{ steps.key.outputs.key }}-${{ github.run_id }}
restore-keys: |
${{ steps.key.outputs.key }}-
vcpkg-linux-

- name: Count vcpkg packages
id: before
run: echo "count=$(find .cache/vcpkg-archives -type f 2>/dev/null | wc -l)" >> "$GITHUB_OUTPUT"

- name: Build, test and check the binary
id: build
run: docker run --rm -v "$PWD:/src" -w /src vcmp-lua-build ci/build-linux.sh

- name: Look for new vcpkg packages
id: after
if: always() && steps.before.outcome == 'success'
run: |
count="$(find .cache/vcpkg-archives -type f 2>/dev/null | wc -l)"
if [ "$count" != "${{ steps.before.outputs.count }}" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Save vcpkg packages
if: always() && steps.after.outputs.changed == 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .cache/vcpkg-archives
key: ${{ steps.key.outputs.key }}-${{ github.run_id }}

- name: MySQL gate
if: steps.build.outcome == 'success'
run: docker compose -f tests/integration/compose.yml --profile gate run --rm mysql-gate

- name: Stop the MySQL gate services
if: always()
run: docker compose -f tests/integration/compose.yml --profile gate down --volumes

# The real VC:MP server is not redistributable from this repository: the
# owner sets the repository variables VCMP_SERVER_URL (the Linux x64
# server zip) and VCMP_SERVER_SHA256. The test itself uses no network
# beyond the compose services.
- name: Integration smoke test (real VC:MP server)
if: steps.build.outcome == 'success' && vars.VCMP_SERVER_URL != ''
env:
VCMP_SERVER_URL: ${{ vars.VCMP_SERVER_URL }}
VCMP_SERVER_SHA256: ${{ vars.VCMP_SERVER_SHA256 }}
run: |
curl -fsSL -o "$RUNNER_TEMP/vcmp-server.zip" "$VCMP_SERVER_URL"
echo "$VCMP_SERVER_SHA256 $RUNNER_TEMP/vcmp-server.zip" | sha256sum -c -
tests/integration/run.sh "$RUNNER_TEMP/vcmp-server.zip"

- name: Upload logs
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: linux-logs
path: |
.cache/vcpkg/buildtrees/**/*.log
build/linux-release/vcpkg-manifest-install.log
build/linux-release/CMakeFiles/CMakeConfigureLog.yaml
build/linux-release/Testing/Temporary/LastTest.log
if-no-files-found: ignore

- name: Upload plugin
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: LuaPlugin_x64-linux
path: build/linux-release/bin/LuaPlugin_x64.so
if-no-files-found: error

linux-asan:
name: Linux x64 unit tests (ASan + UBSan)
# After the release job, so a cold cache is built once and shared.
needs: linux
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1

- name: Build image
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with:
context: ci
file: ci/manylinux.Dockerfile
tags: vcmp-lua-build
load: true
cache-from: type=gha,scope=manylinux

- name: vcpkg cache key
id: key
run: echo "key=vcpkg-linux-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'cmake/triplets/x64-linux-plugin.cmake', 'ci/manylinux.Dockerfile') }}" >> "$GITHUB_OUTPUT"

- name: Restore vcpkg packages
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .cache/vcpkg-archives
key: ${{ steps.key.outputs.key }}-${{ github.run_id }}
restore-keys: |
${{ steps.key.outputs.key }}-
vcpkg-linux-

- name: Build and run the unit tests under ASan + UBSan
run: docker run --rm -v "$PWD:/src" -w /src vcmp-lua-build ci/test-asan.sh

- name: Upload logs
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: linux-asan-logs
path: |
build/linux-asan/CMakeFiles/CMakeConfigureLog.yaml
build/linux-asan/Testing/Temporary/LastTest.log
if-no-files-found: ignore

windows:
name: Windows x64 (MSVC)
if: github.event_name != 'workflow_dispatch' || inputs.jobs != 'linux'
runs-on: windows-2022
timeout-minutes: 120
defaults:
run:
shell: pwsh
env:
VCPKG_ROOT: ${{ github.workspace }}\.cache\vcpkg
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}\.cache\vcpkg-archives
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: vcpkg cache key
id: key
run: |
"key=vcpkg-windows-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'cmake/triplets/x64-windows-static-plugin.cmake') }}" >> $env:GITHUB_OUTPUT

- name: Restore vcpkg packages
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .cache/vcpkg-archives
key: ${{ steps.key.outputs.key }}-${{ github.run_id }}
restore-keys: |
${{ steps.key.outputs.key }}-
vcpkg-windows-

- name: Bootstrap vcpkg
id: bootstrap
run: |
New-Item -ItemType Directory -Force $env:VCPKG_DEFAULT_BINARY_CACHE | Out-Null
"count=$((Get-ChildItem -Recurse -File $env:VCPKG_DEFAULT_BINARY_CACHE).Count)" >> $env:GITHUB_OUTPUT
ci/bootstrap-vcpkg.ps1 $env:VCPKG_ROOT

- name: Configure (builds the vcpkg packages)
id: configure
run: cmake --preset windows-release

- name: Look for new vcpkg packages
id: after
if: always() && steps.bootstrap.outcome == 'success'
run: |
$count = (Get-ChildItem -Recurse -File $env:VCPKG_DEFAULT_BINARY_CACHE).Count
if ($count -ne ${{ steps.bootstrap.outputs.count }}) { "changed=true" >> $env:GITHUB_OUTPUT }

- name: Save vcpkg packages
if: always() && steps.after.outputs.changed == 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: .cache/vcpkg-archives
key: ${{ steps.key.outputs.key }}-${{ github.run_id }}

- name: Show vcpkg build logs
if: failure() && steps.configure.outcome == 'failure'
run: |
Get-ChildItem .cache/vcpkg/buildtrees -Recurse -Include *-err.log, *-out.log -ErrorAction SilentlyContinue |
ForEach-Object { "==== $($_.FullName)"; Get-Content $_.FullName -Tail 80 }

- name: Build
id: build
run: cmake --build --preset windows-release

- name: Test
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: ctest --preset windows-release

- name: Check the binary
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: ci/check-binary.ps1 build/windows-release/bin/LuaPlugin_x64.dll

- name: Upload logs
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: windows-logs
path: |
.cache/vcpkg/buildtrees/**/*.log
build/windows-release/vcpkg-manifest-install.log
build/windows-release/CMakeFiles/CMakeConfigureLog.yaml
build/windows-release/Testing/Temporary/LastTest.log
if-no-files-found: ignore

- name: Upload plugin
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: LuaPlugin_x64-windows
path: build/windows-release/bin/LuaPlugin_x64.dll
if-no-files-found: error
106 changes: 0 additions & 106 deletions .github/workflows/main.yml

This file was deleted.

Loading