Skip to content

Commit

Permalink
CI: Build and run all modules in own job
Browse files Browse the repository at this point in the history
  • Loading branch information
zach2good committed Dec 21, 2024
1 parent 2247f1d commit 056416f
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 26 deletions.
83 changes: 57 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;"
Expand Down Expand Up @@ -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: |
Expand Down
1 change: 1 addition & 0 deletions tools/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ black
regex
argparse
requests
bcrypt

0 comments on commit 056416f

Please sign in to comment.