Skip to content

feat: serverlist validate #4207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/details-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
run: sudo apt-get install libxml2-utils jq

- name: Download linuxgsm.sh
run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/feature/info_game-refactor/linuxgsm.sh; chmod +x linuxgsm.sh
run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh; chmod +x linuxgsm.sh

- name: Grab server
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./linuxgsm.sh ${{ matrix.shortname }}server
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server

- name: Enable developer mode
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server developer
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer

- id: sets-servercfgname
name: Generate servercfgname
Expand All @@ -68,7 +68,7 @@ jobs:
run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg

- name: Detect details
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server detect-details
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server detect-details

- name: Query Raw
run: LGSM_GITHUBBRANCH="feature/info_game-refactor" ./${{ matrix.shortname }}server query-raw
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server query-raw
22 changes: 22 additions & 0 deletions .github/workflows/serverlist-validate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
echo "Checking that all the game servers are listed in all csv files"
echo "this check will ensure serverlist.csv has the same number of lines (-2 lines) as the other csv files"
# count the number of lines in the serverlist.csv
cd "lgsm/data" || exit
serverlistcount="$(wc -l < serverlist.csv)"
echo "serverlistcount: $serverlistcount"
# get list of all csv files starting with ubunutu debian centos
csvlist="$(ls -1 | grep -E '^(ubuntu|debian|centos|rhel|almalinux|rocky).*\.csv$')"
# loop though each csv file and make sure the number of lines is the same as the serverlistcount
for csv in $csvlist; do
csvcount="$(wc -l < "${csv}")"
csvcount=$((csvcount-2))
if [ "$csvcount" -ne "$serverlistcount" ]; then
echo "ERROR: $csv ($csvcount) does not match serverlist.csv ($serverlistcount)"
exitcode=1
else
echo "OK: $csv ($csvcount) and serverlist.csv ($serverlistcount) match"
fi
done

exit ${exitcode}
13 changes: 13 additions & 0 deletions .github/workflows/serverlist-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Server list Validation
on:
workflow_dispatch:
push:

jobs:
serverlist-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: compare versions
run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh
13 changes: 1 addition & 12 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
# This is a basic workflow to help you get started with Actions

name: Version Check

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: push

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read

jobs:
# This workflow contains a single job called "build"
Version-Check:
# The type of runner that the job will run on
version-Check:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a single command using the runners shell
- name: compare versions
run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh
1 change: 1 addition & 0 deletions lgsm/data/almalinux-8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-17-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/almalinux-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-17-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/centos-7.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-11-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/centos-8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-17-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/centos-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-17-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/debian-10.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-11-jre
pstbs,libgconf-2-4
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/debian-11.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-17-jre
pstbs,libgconf-2-4
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/debian-12.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb12
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-17-jre
pstbs,libgconf-2-4
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/debian-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-8-jre
pstbs,libgconf-2-4
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rhel-7.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-11-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rhel-8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-17-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rhel-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-17-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rocky-8.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-17-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/rocky-9.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex.i686,tbb.i686
onset,mariadb-connector-c
opfor
pc
pc2
pmc,java-17-openjdk
pstbs,GConf2
pvkii
Expand Down
1 change: 0 additions & 1 deletion lgsm/data/serverlist.csv
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,3 @@ wmc,wmcserver,WaterfallMC,ubuntu-22.04
wurm,wurmserver,Wurm Unlimited,ubuntu-22.04
zmr,zmrserver,Zombie Master: Reborn,ubuntu-22.04
zps,zpsserver,Zombie Panic! Source,ubuntu-22.04

1 change: 1 addition & 0 deletions lgsm/data/ubuntu-16.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-8-jre
pstbs,libgconf-2-4
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-18.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-11-jre
pstbs,libgconf-2-4
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-20.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-17-jre
pstbs,libgconf-2-4
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-21.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-17-jre
pstbs,libgconf-2-4
pvkii
Expand Down
5 changes: 4 additions & 1 deletion lgsm/data/ubuntu-21.10.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ bfv,libncurses5:i386,libstdc++5:i386
bmdm,libncurses5:i386
bo
bs
bt,libicu-dev
bt,libicu-dev,dos2unix
btl
cc
ck,xvfb
cd
cmw
cod,libstdc++5:i386
cod2,libstdc++5:i386
Expand All @@ -32,6 +33,7 @@ cscz
csgo
css,libtinfo5:i386
dab
dayz
dmc
dod
dodr
Expand Down Expand Up @@ -76,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-17-jre
pstbs,libgconf-2-4
pvkii
Expand Down
1 change: 1 addition & 0 deletions lgsm/data/ubuntu-22.04.csv
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ns2c,speex:i386,libtbb2
onset,libmariadb-dev
opfor
pc
pc2
pmc,openjdk-17-jre
pstbs,libgconf-2-4
pvkii
Expand Down