diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 000000000..d402f27de --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,16 @@ +{ + "permissions": { + "allow": [ + "Bash(git rev-parse:*)", + "Bash(git reset:*)", + "Bash(git cherry-pick:*)", + "Bash(git fetch:*)", + "Bash(git push:*)", + "Bash(git checkout:*)", + "Bash(git branch:*)", + "Bash(git remote add:*)" + ], + "deny": [], + "ask": [] + } +} diff --git a/.github/pr-body.md b/.github/pr-body.md new file mode 100644 index 000000000..c8622edc1 --- /dev/null +++ b/.github/pr-body.md @@ -0,0 +1,25 @@ +Automated PR to update hl2sdk submodule. + +## Changes +- **From:** `da981a8984c74641d2a31732a0bac742bfea6e2d` +- **To:** `3bb772f7c0652cd78089522ac58235b9b34f71d6` + +## Commits in this update +``` +3bb772f7 Fix other clang20 errors/warnings +9b5d7308 Fix few clang20 errors +c8133299 Update IEngineServiceMgr (#358) +3aa19369 Update IGameSystem (#359) +66a75464 Add StringUserData_t and SetStringUserDataRequest_t & Update INetworkStringTable (#356) +d27464d9 Add few QoL methods to CPlayerSlot +20ae6c37 Update protobufs (#355) +419097b8 Update protobufs (#354) +``` + +## Latest commit info +- **Message:** Fix other clang20 errors/warnings +- **Author:** GAMMACASE +- **Date:** 2025-12-06 15:58:45 +0300 + +--- +🤖 This PR was automatically created by the [bump-hl2sdk workflow](https://github.com/playpark/CounterStrikeSharp/actions/workflows/bump-hl2sdk.yml). diff --git a/.github/workflows/bump-hl2sdk.yml b/.github/workflows/bump-hl2sdk.yml index d2ecef151..6fc3ad0ec 100644 --- a/.github/workflows/bump-hl2sdk.yml +++ b/.github/workflows/bump-hl2sdk.yml @@ -2,9 +2,8 @@ name: Bump hl2sdk on: schedule: - # Run every 15 minutes - - cron: "*/15 * * * *" - workflow_dispatch: # Allow manual trigger + - cron: "0 * * * *" + workflow_dispatch: permissions: contents: write @@ -32,6 +31,10 @@ jobs: id: latest run: | LATEST_COMMIT=$(git ls-remote https://github.com/alliedmodders/hl2sdk refs/heads/cs2 | cut -f1) + if [ -z "$LATEST_COMMIT" ]; then + echo "::error::Failed to fetch latest commit from hl2sdk" + exit 1 + fi echo "commit=$LATEST_COMMIT" >> $GITHUB_OUTPUT echo "Latest hl2sdk cs2 commit: $LATEST_COMMIT" @@ -52,19 +55,27 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - # Check if there's already an open PR for hl2sdk bump - EXISTING_PR=$(gh pr list --state open --head "chore/bump-hl2sdk" --json number --jq '.[0].number // empty') + EXISTING_PR=$(gh pr list --state open --head "chore/bump-hl2sdk" --json number,body --jq '.[0] // empty') if [ -n "$EXISTING_PR" ]; then - echo "has_existing_pr=true" >> $GITHUB_OUTPUT - echo "pr_number=$EXISTING_PR" >> $GITHUB_OUTPUT - echo "Existing PR found: #$EXISTING_PR" + PR_NUMBER=$(echo "$EXISTING_PR" | jq -r '.number') + echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT + echo "Existing PR found: #$PR_NUMBER" + + EXISTING_TARGET=$(echo "$EXISTING_PR" | jq -r '.body' | grep -oP '(?<=\*\*To:\*\* `)[a-f0-9]+(?=`)' || true) + if [ "$EXISTING_TARGET" = "${{ steps.latest.outputs.commit }}" ]; then + echo "skip=true" >> $GITHUB_OUTPUT + echo "Existing PR already targets latest commit, skipping" + else + echo "skip=false" >> $GITHUB_OUTPUT + echo "Existing PR needs update" + fi else - echo "has_existing_pr=false" >> $GITHUB_OUTPUT + echo "skip=false" >> $GITHUB_OUTPUT echo "No existing PR found" fi - name: Update submodule - if: steps.check.outputs.needs_update == 'true' + if: steps.check.outputs.needs_update == 'true' && steps.existing_pr.outputs.skip != 'true' run: | cd libraries/hl2sdk-cs2 git fetch origin cs2 @@ -73,7 +84,7 @@ jobs: echo "Updated hl2sdk to ${{ steps.latest.outputs.commit }}" - name: Get commit details - if: steps.check.outputs.needs_update == 'true' + if: steps.check.outputs.needs_update == 'true' && steps.existing_pr.outputs.skip != 'true' id: commit_info run: | cd libraries/hl2sdk-cs2 @@ -82,20 +93,42 @@ jobs: COMMIT_DATE=$(git log -1 --pretty=format:"%ci") SHORT_SHA=$(git rev-parse --short HEAD) - echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT + echo "message<> $GITHUB_OUTPUT + echo "$COMMIT_MSG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT echo "author=$COMMIT_AUTHOR" >> $GITHUB_OUTPUT echo "date=$COMMIT_DATE" >> $GITHUB_OUTPUT echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT - # Get commits in this update for PR body (last 20) - cd ../.. - echo "COMMITS<> $GITHUB_OUTPUT - cd libraries/hl2sdk-cs2 - git log --oneline ${{ steps.current.outputs.commit }}..${{ steps.latest.outputs.commit }} | head -20 >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT + git log --oneline ${{ steps.current.outputs.commit }}..${{ steps.latest.outputs.commit }} | head -20 > /tmp/commits.txt + + - name: Generate PR body + if: steps.check.outputs.needs_update == 'true' && steps.existing_pr.outputs.skip != 'true' + run: | + mkdir -p .github + cat > .github/pr-body.md << 'ENDOFBODY' + Automated PR to update hl2sdk submodule. + + ## Changes + ENDOFBODY + echo "- **From:** \`${{ steps.current.outputs.commit }}\`" >> .github/pr-body.md + echo "- **To:** \`${{ steps.latest.outputs.commit }}\`" >> .github/pr-body.md + echo "" >> .github/pr-body.md + echo "## Commits in this update" >> .github/pr-body.md + echo '```' >> .github/pr-body.md + cat /tmp/commits.txt >> .github/pr-body.md + echo '```' >> .github/pr-body.md + echo "" >> .github/pr-body.md + echo "## Latest commit info" >> .github/pr-body.md + echo "- **Message:** ${{ steps.commit_info.outputs.message }}" >> .github/pr-body.md + echo "- **Author:** ${{ steps.commit_info.outputs.author }}" >> .github/pr-body.md + echo "- **Date:** ${{ steps.commit_info.outputs.date }}" >> .github/pr-body.md + echo "" >> .github/pr-body.md + echo "---" >> .github/pr-body.md + echo "🤖 This PR was automatically created by the [bump-hl2sdk workflow](https://github.com/${{ github.repository }}/actions/workflows/bump-hl2sdk.yml)." >> .github/pr-body.md - name: Create or update Pull Request - if: steps.check.outputs.needs_update == 'true' + if: steps.check.outputs.needs_update == 'true' && steps.existing_pr.outputs.skip != 'true' uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -103,25 +136,7 @@ jobs: branch: chore/bump-hl2sdk delete-branch: true title: "chore(deps): bump hl2sdk to ${{ steps.commit_info.outputs.short_sha }}" - body: | - Automated PR to update hl2sdk submodule. - - ## Changes - - **From:** `${{ steps.current.outputs.commit }}` - - **To:** `${{ steps.latest.outputs.commit }}` - - ## Commits in this update - ``` - ${{ steps.commit_info.outputs.COMMITS }} - ``` - - ## Latest commit info - - **Message:** ${{ steps.commit_info.outputs.message }} - - **Author:** ${{ steps.commit_info.outputs.author }} - - **Date:** ${{ steps.commit_info.outputs.date }} - - --- - 🤖 This PR was automatically created by the [bump-hl2sdk workflow](https://github.com/${{ github.repository }}/actions/workflows/bump-hl2sdk.yml). + body-path: .github/pr-body.md labels: | dependencies automated diff --git a/libraries/DynoHook b/libraries/DynoHook deleted file mode 160000 index d7f8ebb05..000000000 --- a/libraries/DynoHook +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d7f8ebb059dcfb20d5800051cf1c6e702f688470 diff --git a/libraries/Protobufs b/libraries/Protobufs deleted file mode 160000 index 7af53a5e1..000000000 --- a/libraries/Protobufs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7af53a5e1c95852b4394d4789e9e707cc1c8dd35 diff --git a/libraries/asmjit b/libraries/asmjit deleted file mode 160000 index 0dd16b0a9..000000000 --- a/libraries/asmjit +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0dd16b0a98ae1da48563c9cc62f757a9e6bbe9b6 diff --git a/libraries/dyncall b/libraries/dyncall deleted file mode 160000 index 3bcebd526..000000000 --- a/libraries/dyncall +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3bcebd526fe16f0aa520e32597ff3dbfbf30b1e4 diff --git a/libraries/funchook b/libraries/funchook deleted file mode 160000 index 7cb881959..000000000 --- a/libraries/funchook +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7cb8819594f0d586454011ab691fab4edb625068 diff --git a/libraries/hl2sdk-cs2 b/libraries/hl2sdk-cs2 index da981a898..3bb772f7c 160000 --- a/libraries/hl2sdk-cs2 +++ b/libraries/hl2sdk-cs2 @@ -1 +1 @@ -Subproject commit da981a8984c74641d2a31732a0bac742bfea6e2d +Subproject commit 3bb772f7c0652cd78089522ac58235b9b34f71d6 diff --git a/libraries/metamod-source b/libraries/metamod-source deleted file mode 160000 index 07c708a59..000000000 --- a/libraries/metamod-source +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 07c708a59e255243bd18f2b807efce6a9aa5ccaf diff --git a/libraries/spdlog b/libraries/spdlog deleted file mode 160000 index 91807c2e7..000000000 --- a/libraries/spdlog +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 91807c2e718890ca2c0c88620326c6919ce041f4 diff --git a/tooling/act/LICENSE b/tooling/act/LICENSE new file mode 100644 index 000000000..15bc72f8d --- /dev/null +++ b/tooling/act/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tooling/act/README.md b/tooling/act/README.md new file mode 100644 index 000000000..90147eb5e --- /dev/null +++ b/tooling/act/README.md @@ -0,0 +1,41 @@ +![act-logo](https://raw.githubusercontent.com/wiki/nektos/act/img/logo-150.png) + +# Overview [![push](https://github.com/nektos/act/workflows/push/badge.svg?branch=master&event=push)](https://github.com/nektos/act/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/nektos/act)](https://goreportcard.com/report/github.com/nektos/act) [![awesome-runners](https://img.shields.io/badge/listed%20on-awesome--runners-blue.svg)](https://github.com/jonico/awesome-runners) + +> "Think globally, `act` locally" + +Run your [GitHub Actions](https://developer.github.com/actions/) locally! Why would you want to do this? Two reasons: + +- **Fast Feedback** - Rather than having to commit/push every time you want to test out the changes you are making to your `.github/workflows/` files (or for any changes to embedded GitHub actions), you can use `act` to run the actions locally. The [environment variables](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables) and [filesystem](https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners#filesystems-on-github-hosted-runners) are all configured to match what GitHub provides. +- **Local Task Runner** - I love [make](). However, I also hate repeating myself. With `act`, you can use the GitHub Actions defined in your `.github/workflows/` to replace your `Makefile`! + +> [!TIP] +> **Now Manage and Run Act Directly From VS Code!**
+> Check out the [GitHub Local Actions](https://sanjulaganepola.github.io/github-local-actions-docs/) Visual Studio Code extension which allows you to leverage the power of `act` to run and test workflows locally without leaving your editor. + +# How Does It Work? + +When you run `act` it reads in your GitHub Actions from `.github/workflows/` and determines the set of actions that need to be run. It uses the Docker API to either pull or build the necessary images, as defined in your workflow files and finally determines the execution path based on the dependencies that were defined. Once it has the execution path, it then uses the Docker API to run containers for each action based on the images prepared earlier. The [environment variables](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables) and [filesystem](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems) are all configured to match what GitHub provides. + +Let's see it in action with a [sample repo](https://github.com/cplee/github-actions-demo)! + +![Demo](https://raw.githubusercontent.com/wiki/nektos/act/quickstart/act-quickstart-2.gif) + +# Act User Guide + +Please look at the [act user guide](https://nektosact.com) for more documentation. + +# Support + +Need help? Ask in [discussions](https://github.com/nektos/act/discussions)! + +# Contributing + +Want to contribute to act? Awesome! Check out the [contributing guidelines](CONTRIBUTING.md) to get involved. + +## Manually building from source + +- Install Go tools 1.20+ - () +- Clone this repo `git clone git@github.com:nektos/act.git` +- Run unit tests with `make test` +- Build and install: `make install` diff --git a/tooling/act/act b/tooling/act/act new file mode 100755 index 000000000..8b0521191 Binary files /dev/null and b/tooling/act/act differ diff --git a/tooling/act/act_Linux_x86_64.tar.gz b/tooling/act/act_Linux_x86_64.tar.gz new file mode 100644 index 000000000..71d2a4a2b Binary files /dev/null and b/tooling/act/act_Linux_x86_64.tar.gz differ