Skip to content
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

Ci test #9

Closed
wants to merge 10 commits into from
Closed
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
78 changes: 46 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,22 @@ concurrency:

jobs:
Sanity_Checks:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common cppcheck luajit-5.1-dev luarocks mariadb-server-10.6 mariadb-client-10.6 libmariadb-dev-compat binutils-dev
pip install -r tools/requirements.txt
sudo apt-get install -y software-properties-common cppcheck luajit-5.1-dev luarocks mariadb-server-core mariadb-server mariadb-client libmariadb-dev-compat binutils-dev clang-format

mkdir .venv
python3 -m venv .venv
source .venv/bin/activate
which python

.venv/bin/pip install -r tools/requirements.txt
luarocks install luacheck --local
npm install -g diff-so-fancy
- id: changed-files
Expand Down Expand Up @@ -88,15 +94,15 @@ jobs:
exit 1
fi
exit 0
- name: CPP Formatting Checks (clang-format-15)
- name: CPP Formatting Checks (clang-format-18)
if: always()
run: |
clang-format-15 -version
clang-format-18 -version
touch cpp_formatting_checks.txt
for changed_file in ${{ steps.changed-files.outputs.all }}; do
if [[ -f $changed_file ]]; then
if [[ $changed_file == *.cpp || $changed_file == *.h ]]; then
clang-format-15 -style=file -i ${changed_file}
clang-format-18 -style=file -i ${changed_file}
fi
fi
done
Expand Down Expand Up @@ -125,7 +131,8 @@ jobs:
if: always()
run: |
touch lua_checks.txt
python3 tools/ci/lua_stylecheck.py test >> lua_checks.txt
pwd
.venv/bin/python3 tools/ci/lua_stylecheck.py test >> lua_checks.txt

for changed_file in ${{ steps.changed-files.outputs.all }}; do
if [[ -f $changed_file ]]; then
Expand All @@ -135,7 +142,7 @@ jobs:
fi
done

python3 tools/ci/check_lua_binding_usage.py >> lua_checks.txt
.venv/bin/python3 tools/ci/check_lua_binding_usage.py >> lua_checks.txt

cat lua_checks.txt
if [ -s lua_checks.txt ]
Expand All @@ -155,7 +162,7 @@ jobs:
fi
done

python3 tools/price_checker.py >> sql_checks.txt
.venv/bin/python3 tools/price_checker.py >> sql_checks.txt

cat sql_checks.txt
if [ -s sql_checks.txt ]
Expand All @@ -181,9 +188,9 @@ jobs:
fi
exit 0

Linux_Clang15_64bit:
Linux_Clang18_64bit:
needs: Sanity_Checks
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -199,8 +206,8 @@ jobs:
# key: ${{ runner.os }}-clang
- name: Configure CMake
run: |
export CC=/usr/bin/clang-15
export CXX=/usr/bin/clang++-15
export CC=/usr/bin/clang-18
export CXX=/usr/bin/clang++-18
mkdir -p build
cmake -S . -B build
- name: Build
Expand All @@ -216,14 +223,14 @@ jobs:
xi_search
xi_world

Linux_ClangTidy15_64bit:
Linux_ClangTidy18_64bit:
needs: Sanity_Checks
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
# workaround for broken clang on ubuntu runner until fixed: https://github.com/actions/runner-images/issues/8659
- uses: claywar/workaround8649@4892524a133793c85e25513fae79fc968e63877c
with:
os: ubuntu-22.04
os: ubuntu-24.04
- uses: actions/checkout@v3
with:
fetch-depth: 1
Expand All @@ -238,8 +245,8 @@ jobs:
# key: ${{ runner.os }}-clang
- name: Configure CMake
run: |
export CC=/usr/bin/clang-15
export CXX=/usr/bin/clang++-15
export CC=/usr/bin/clang-18
export CXX=/usr/bin/clang++-18
mkdir -p build
cmake -S . -B build -DENABLE_CLANG_TIDY=ON
- name: Build
Expand All @@ -251,9 +258,9 @@ jobs:
exit 1
fi

Linux_GCC13_64bit:
Linux_GCC14_64bit:
needs: Sanity_Checks
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -269,8 +276,8 @@ jobs:
# key: ${{ runner.os }}-gcc
- name: Configure CMake
run: |
export CC=/usr/bin/gcc-13
export CXX=/usr/bin/g++-13
export CC=/usr/bin/gcc-14
export CXX=/usr/bin/g++-14
mkdir -p build
CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64 cmake -S . -B build
- name: Build
Expand Down Expand Up @@ -346,14 +353,15 @@ jobs:
MacOS_64bit:
needs: Sanity_Checks
# https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install Dependencies (Brew)
run: |
brew install mariadb zeromq zmq luajit
brew update
brew install mariadb zeromq zmq luajit llvm
- name: Configure CMake
run: |
mkdir -p build
Expand All @@ -363,8 +371,8 @@ jobs:
cmake --build build -j4

Full_Startup_Checks_Linux:
runs-on: ubuntu-22.04
needs: Linux_Clang15_64bit
runs-on: ubuntu-24.04
needs: Linux_Clang18_64bit
services:
mysql:
image: mariadb:10.6
Expand All @@ -385,8 +393,14 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common cmake mariadb-client-10.6 libmariadb-dev-compat libluajit-5.1-dev libzmq3-dev zlib1g-dev libssl-dev luarocks binutils-dev
pip install bcrypt
sudo apt-get install -y software-properties-common cmake mariadb-server-core mariadb-server mariadb-client libmariadb-dev-compat libluajit-5.1-dev libzmq3-dev zlib1g-dev libssl-dev luarocks binutils-dev

mkdir .venv
python3 -m venv .venv
source .venv/bin/activate
which python

.venv/bin/pip install bcrypt
- name: Verify MySQL connection from container
run: |
mysql -h 127.0.0.1 -uroot -proot -e "SHOW DATABASES"
Expand Down Expand Up @@ -492,7 +506,7 @@ jobs:
VALUES(1, 'GodMode', 1);"

printf "\nRunning HeadlessXI for 60 seconds\n"
python3 << EOF
.venv/bin/python3 << EOF
import time
try:
from tools.headlessxi.hxiclient import HXIClient
Expand Down Expand Up @@ -542,8 +556,8 @@ jobs:
fi

MultiInstance_Startup_Checks_Linux:
runs-on: ubuntu-22.04
needs: Linux_Clang15_64bit
runs-on: ubuntu-24.04
needs: Linux_Clang18_64bit
services:
mysql:
image: mariadb:10.6
Expand All @@ -564,7 +578,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common cmake mariadb-client-10.6 libmariadb-dev-compat libluajit-5.1-dev libzmq3-dev zlib1g-dev libssl-dev luarocks binutils-dev
sudo apt-get install -y software-properties-common cmake mariadb-server-core mariadb-server mariadb-client libmariadb-dev-compat libluajit-5.1-dev libzmq3-dev zlib1g-dev libssl-dev luarocks binutils-dev
- name: Verify MySQL connection from container
run: |
mysql -h 127.0.0.1 -uroot -proot -e "SHOW DATABASES"
Expand Down
1 change: 1 addition & 0 deletions cmake/CompilerWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function(set_project_warnings project_name)
-Wno-unused-parameter # warn on unused function parameters
-Wno-missing-field-initializers
-Wno-sign-compare
-Wno-nan-infinity-disabled

# TODO: This is good, but it's Clang only
# -Wunused-private-field # warn on unused private fields
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/check_lua_binding_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def main():

line = line.replace("\n", "")

for match in re.finditer('(?<=:)[^\(\/\\\: "]*', line):
for match in re.finditer(r'(?<=:)[^\(\/\\\: "]*', line):
if (
len(match.group()) > 1
and match.group() not in function_names
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ for hash, lines in get_commit_messages().items():
# [^ ]*\. : Any number characters that are NOT a space, ending in a period character.
# [a-z]{1,3} : 1-3 entries of characters a-z. This is looking for file extensions.
# $ : End of string.
for match in re.finditer("^update [^ ]*\.[a-z]{1,3}$", line.lower()):
for match in re.finditer(r"^update [^ ]*\.[a-z]{1,3}$", line.lower()):
print_error(hash, lines, line, "Detected automatic commit message (Example: \"Update filename.ext\").\nPlease "
"provide a more detailed summary of your changes.")

Expand Down
Loading
Loading