From 056416f09beb2e658037f2a63db8673df3ac6bba Mon Sep 17 00:00:00 2001 From: Zach Toogood Date: Sat, 21 Dec 2024 15:42:02 +0000 Subject: [PATCH] CI: Build and run all modules in own job --- .github/workflows/build.yml | 83 +++++++++++++++++++++++++------------ tools/requirements.txt | 1 + 2 files changed, 58 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ed2f1a0123..1d34e82b4b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -371,6 +371,7 @@ jobs: with open("modules/init.txt", "w") as f: f.write("custom\n") f.write("era\n") + f.write("example\n") f.write("renamer\n") EOF - name: Configure CMake @@ -382,7 +383,16 @@ jobs: shell: cmd run: | cmake --build build -j4 - + - name: Archive Executables + uses: actions/upload-artifact@v4 + with: + name: windows_modules_executables + path: | + xi_connect.exe + xi_map.exe + xi_search.exe + xi_world.exe + MacOS_64bit: needs: Sanity_Checks # https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md @@ -426,29 +436,17 @@ jobs: 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 + pip install -r tools/requirements.txt - name: Verify MySQL connection from container run: | mysql -h 127.0.0.1 -uroot -proot -e "SHOW DATABASES" - name: Import SQL files + shell: bash run: | - for f in sql/*.sql; do - echo -e "Importing $f into the database..." - mysql xidb -h 127.0.0.1 -uroot -proot < $f - done - mysql xidb -h 127.0.0.1 -uroot -proot -e "SHOW tables" + python3 ./tools/dbtool.py setup xidb - name: Copy settings run: | cp settings/default/* settings/ - - name: Enable Modules - shell: bash - run: | - python3 << EOF - with open("modules/init.txt", "w") as f: - f.write("custom\n") - f.write("era\n") - f.write("renamer\n") - EOF - name: Startup and character login checks uses: nick-invision/retry@v3 with: @@ -605,16 +603,14 @@ jobs: 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 -r tools/requirements.txt - name: Verify MySQL connection from container run: | mysql -h 127.0.0.1 -uroot -proot -e "SHOW DATABASES" - name: Import SQL files + shell: bash run: | - for f in sql/*.sql; do - echo -e "Importing $f into the database..." - mysql xidb -h 127.0.0.1 -uroot -proot < $f - done - mysql xidb -h 127.0.0.1 -uroot -proot -e "SHOW tables" + python3 ./tools/dbtool.py setup xidb - name: Assign odd zones a different port run: | mysql xidb -h 127.0.0.1 -uroot -proot -e "UPDATE xidb.zone_settings SET zoneport = 54231 WHERE zoneid % 2 = 0;" @@ -691,11 +687,46 @@ jobs: - name: Import SQL files shell: bash run: | - for f in sql/*.sql; do - echo -e "Importing $f into the database..." - mysql xidb -h 127.0.0.1 -uroot -proot < $f - done - mysql xidb -h 127.0.0.1 -uroot -proot -e "SHOW tables" + python3 ./tools/dbtool.py setup xidb + - name: Startup checks + shell: bash + run: | + python3 ./tools/ci/startup_checks.py + + Full_Startup_Checks_Windows_Tracy_Modules: + runs-on: windows-2022 + needs: Windows_64bit_Release_Tracy_Modules + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + - uses: actions/download-artifact@v4 + with: + name: windows_modules_executables + path: . + - uses: zach2good/setup-mariadb@v1 + with: + database: xidb + - name: Copy settings + run: | + cp settings/default/* settings/ + - name: Enable Modules + shell: bash + run: | + python3 << EOF + with open("modules/init.txt", "w") as f: + f.write("custom\n") + f.write("era\n") + f.write("example\n") + f.write("renamer\n") + EOF + - name: Install Python Dependencies + run: | + pip install -r tools/requirements.txt + - name: Import SQL files + shell: bash + run: | + python3 ./tools/dbtool.py setup xidb - name: Startup checks shell: bash run: | diff --git a/tools/requirements.txt b/tools/requirements.txt index 9570fe64482..2f6d1307b68 100644 --- a/tools/requirements.txt +++ b/tools/requirements.txt @@ -8,3 +8,4 @@ black regex argparse requests +bcrypt