merge #1259
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: merge | |
on: | |
push: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
_master: | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: [master, dressnpcs_master, gomove_master, multivendor_master, objscale_master, playeritemgossip_master] | |
pch: [ON, OFF] | |
include: | |
- branch: objscale_master | |
world: | |
- src/server/scripts/Custom/objscale/sql/2016_11_10_00_world_objscale.sql | |
- branch: multivendor_master | |
world: | |
- src/server/scripts/Custom/Multivendor/MultivendorExample.sql | |
- branch: dressnpcs_master | |
world: | |
- src/server/scripts/Custom/DressNPCs/sql/world.sql | |
- src/server/scripts/Custom/DressNPCs/Example.sql | |
# - src/server/scripts/Custom/DressNPCs/CopyPlayer.sql | |
hotfix: | |
- src/server/scripts/Custom/DressNPCs/sql/hotfixes.sql | |
env: | |
BRANCH: ${{ matrix.branch }} | |
PCH: ${{ matrix.pch }} | |
SQL_WORLD: ${{ join( matrix.world, ' ' ) }} | |
SQL_CHAR: ${{ join( matrix.char, ' ' ) }} | |
SQL_AUTH: ${{ join( matrix.auth, ' ' ) }} | |
SQL_HOTFIX: ${{ join( matrix.hotfix, ' ' ) }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
fetch-depth: 0 | |
token: ${{ secrets.WORKFLOW_TOKEN }} | |
- name: Configure user | |
run: | | |
git config user.email "[email protected]" && git config user.name "Rochet2" | |
- name: Merge TC | |
run: | | |
git status | |
git remote add Trinity https://github.com/TrinityCore/TrinityCore.git | |
git fetch Trinity master | |
git merge -m "Merge TrinityCore master to ${BRANCH} [skip ci]" Trinity/master | |
git submodule update --init --recursive | |
git status | |
- name: Dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev clang-15 | |
- name: Setup | |
run: | | |
mkdir bin | |
cd bin | |
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=$PCH -DUSE_SCRIPTPCH=$PCH -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DCMAKE_C_COMPILER=clang-15 -DCMAKE_CXX_COMPILER=clang++-15 | |
cd .. | |
- name: Build | |
run: | | |
cd bin | |
make -j 4 -k && make install | |
- name: Check executables | |
run: | | |
cd bin/check_install/bin | |
./bnetserver --version | |
./worldserver --version | |
- name: Find latest DB release tag | |
id: find_matching_tags | |
uses: Rochet2/[email protected] | |
with: | |
regex: ^TDB\d{4,}\.\d+$ | |
sort: desc | |
owner: TrinityCore | |
repo: TrinityCore | |
per_page: 100 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download latest DB | |
uses: i3h/download-release-asset@a987f9dc3559bd1024d7ed353b59c9d0bbb8ab61 | |
with: | |
owner: TrinityCore | |
repo: TrinityCore | |
tag: ${{ fromJson(steps.find_matching_tags.outputs.tags)[0] }} | |
file: /TDB_full.*\.7z/ | |
path: bin/check_install/bin | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set configs | |
run: | | |
cd bin/check_install/etc | |
sed "s/127.0.0.1;3306;trinity;trinity;/localhost;3306;root;;/g" worldserver.conf.dist > worldserver.conf | |
- name: Build DB | |
run: | | |
echo "start mysql" | |
sudo systemctl start mysql.service | |
echo "remove user password" | |
mysql -uroot -proot -e 'SET PASSWORD FOR root@localhost="";' | |
echo "create databases" | |
mysql -uroot -e 'create database test_mysql;' | |
cd bin/check_install/bin | |
7z x ./*.7z | |
yes | ./worldserver --update-databases-only | |
- name: Run SQLs | |
if: matrix.pch == 'ON' | |
run: | | |
for f in $SQL_WORLD; do echo "$f"; cat "$f" | mysql -uroot world; done | |
for f in $SQL_CHAR; do echo "$f"; cat "$f" | mysql -uroot characters; done | |
for f in $SQL_AUTH; do echo "$f"; cat "$f" | mysql -uroot auth; done | |
for f in $SQL_HOTFIX; do echo "$f"; cat "$f" | mysql -uroot hotfixes; done | |
- name: Push changes | |
if: matrix.pch == 'ON' | |
run: | | |
git push | |
_3-3-5: | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: [3.3.5, transmog_3.3.5, transmog_legion_3.3.5, transmogvendor_3.3.5, reforging_3.3.5, multivendor_3.3.5, multitrainer_3.3.5, playeritemgossip_3.3.5, dressnpcs_3.3.5, objscale_3.3.5, gomove_3.3.5] | |
pch: [ON, OFF] | |
include: | |
- branch: transmog_3.3.5 | |
world: | |
- src/server/scripts/Custom/Transmog/sql/world_NPC.sql | |
- branch: transmogvendor_3.3.5 | |
world: | |
- src/server/scripts/Custom/TransmogDisplayVendor/sql/world_NPC.sql | |
- branch: transmog_legion_3.3.5 | |
world: | |
- src/server/scripts/Custom/Transmog/sql/world_NPC.sql | |
# - src/server/scripts/Custom/Transmog/sql/completed_quest_items_to_transmog_collection.sql | |
- branch: reforging_3.3.5 | |
world: | |
- src/server/scripts/Custom/Reforging/sql/world_npc.sql | |
- branch: multivendor_3.3.5 | |
world: | |
- src/server/scripts/Custom/Multivendor/MultivendorExample.sql | |
- branch: multitrainer_3.3.5 | |
world: | |
- src/server/scripts/Custom/multitrainer/MultitrainerExample.sql | |
- branch: dressnpcs_3.3.5 | |
world: | |
- src/server/scripts/Custom/DressNPCs/Example.sql | |
env: | |
BRANCH: ${{ matrix.branch }} | |
PCH: ${{ matrix.pch }} | |
SQL_WORLD: ${{ join( matrix.world, ' ' ) }} | |
SQL_CHAR: ${{ join( matrix.char, ' ' ) }} | |
SQL_AUTH: ${{ join( matrix.auth, ' ' ) }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.branch }} | |
fetch-depth: 0 | |
token: ${{ secrets.WORKFLOW_TOKEN }} | |
- name: Configure user | |
run: | | |
git config user.email "[email protected]" && git config user.name "Rochet2" | |
- name: Merge TC | |
run: | | |
git status | |
git remote add Trinity https://github.com/TrinityCore/TrinityCore.git | |
git fetch Trinity 3.3.5 | |
git merge -m "Merge TrinityCore 3.3.5 to ${BRANCH} [skip ci]" Trinity/3.3.5 | |
git submodule update --init --recursive | |
git status | |
- name: Dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-11 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11 | |
- name: Setup | |
run: | | |
mkdir bin | |
cd bin | |
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=$PCH -DUSE_SCRIPTPCH=$PCH -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1 | |
cd .. | |
- name: Build | |
run: | | |
cd bin | |
make -j 4 -k && make install | |
- name: Unit tests | |
run: | | |
cd bin | |
make test | |
- name: Check executables | |
run: | | |
cd bin/check_install/bin | |
./authserver --version | |
./worldserver --version | |
- name: Find latest DB release tag | |
id: find_matching_tags | |
uses: Rochet2/[email protected] | |
with: | |
regex: ^TDB335\.\d+$ | |
sort: desc | |
owner: TrinityCore | |
repo: TrinityCore | |
per_page: 70 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Print matched tags | |
run: | | |
echo ${{ steps.find_matching_tags.outputs.tags }} | |
- name: Download latest DB | |
uses: i3h/download-release-asset@a987f9dc3559bd1024d7ed353b59c9d0bbb8ab61 | |
with: | |
owner: TrinityCore | |
repo: TrinityCore | |
tag: ${{ fromJson(steps.find_matching_tags.outputs.tags)[0] }} | |
file: /TDB_full.*\.7z/ | |
path: bin/check_install/bin | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Print downloaded files | |
run: | | |
ls -lah bin/check_install/bin | |
- name: Set configs | |
run: | | |
cd bin/check_install/etc | |
sed "s/127.0.0.1;3306;trinity;trinity;/localhost;3306;root;;/g" worldserver.conf.dist > worldserver.conf | |
- name: Build DB | |
run: | | |
echo "start mysql" | |
sudo systemctl start mysql.service | |
echo "remove user password" | |
mysql -uroot -proot -e 'SET PASSWORD FOR root@localhost="";' | |
echo "create databases" | |
mysql -uroot -e 'create database test_mysql;' | |
cd bin/check_install/bin | |
7z x ./*.7z | |
yes | ./worldserver --update-databases-only | |
- name: Run SQLs | |
if: matrix.pch == 'ON' | |
run: | | |
for f in $SQL_WORLD; do echo "$f"; cat "$f" | mysql -uroot world; done | |
for f in $SQL_CHAR; do echo "$f"; cat "$f" | mysql -uroot characters; done | |
for f in $SQL_AUTH; do echo "$f"; cat "$f" | mysql -uroot auth; done | |
- name: Run External SQLs | |
if: matrix.pch == 'ON' && matrix.branch == '3.3.5' | |
run: | | |
echo 'Trinity_Jukebox' ; curl -sSf http://rochet2.github.io/downloads/Trinity_Jukebox.sql | mysql -uroot world | |
echo 'Trinity_Portal_Master' ; curl -sSf http://rochet2.github.io/downloads/Trinity_Portal_Master.sql | mysql -uroot world | |
echo 'Trinity_Portal_Master_Option' ; curl -sSf http://rochet2.github.io/downloads/Trinity_Portal_Master_Option.sql | mysql -uroot world | |
- name: Push changes | |
if: matrix.pch == 'ON' | |
run: | | |
git push |