From 3017d7e42ff72ce0ae2b286057d03b80d66ad60e Mon Sep 17 00:00:00 2001 From: Niam5 Date: Sun, 14 Jul 2024 23:30:13 -0700 Subject: [PATCH] Include Eluna submodule in CI and add auto-rebase script --- .github/workflows/auto-rebase.yml | 56 +++++++++++++++++++++++++++ .github/workflows/gcc-build.yml | 4 +- .github/workflows/macos-arm-build.yml | 4 +- .github/workflows/win-x64-build.yml | 8 ++-- 4 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/auto-rebase.yml diff --git a/.github/workflows/auto-rebase.yml b/.github/workflows/auto-rebase.yml new file mode 100644 index 0000000000000..ce07ce08d25d9 --- /dev/null +++ b/.github/workflows/auto-rebase.yml @@ -0,0 +1,56 @@ +name: automerge + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + submodules: 'recursive' + fetch-depth: 0 + - name: Merge TC + run: | + git status + git config user.email "niam5+ci@post.com" && git config user.name "Niam5" + git remote add Trinity https://github.com/TrinityCore/TrinityCore.git + git fetch --all + git rebase Trinity/master + git status + - name: Set reusable strings + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT" + - 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 + env: + CMAKE_BUILD_TYPE: Debug + run: > + cmake -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }} + -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 + -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" + -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1 + - name: Build + run: | + cd bin + make -j 4 -k && make install + - name: Unit tests + run: | + cd bin + make test + - name: Check executables + run: | + cd ${{ github.workspace }}/check_install/bin + ./bnetserver --version + ./worldserver --version + - name: Push changes + run: | + git push -f diff --git a/.github/workflows/gcc-build.yml b/.github/workflows/gcc-build.yml index 6f1765801cf12..43e53875883f8 100644 --- a/.github/workflows/gcc-build.yml +++ b/.github/workflows/gcc-build.yml @@ -9,6 +9,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + with: + submodules: true - name: Set reusable strings id: strings shell: bash @@ -23,7 +25,7 @@ jobs: CMAKE_BUILD_TYPE: Debug run: > cmake -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }} - -DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 + -DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=0 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1 - name: Build diff --git a/.github/workflows/macos-arm-build.yml b/.github/workflows/macos-arm-build.yml index b6497abc81a3e..d5ef50e1a3178 100644 --- a/.github/workflows/macos-arm-build.yml +++ b/.github/workflows/macos-arm-build.yml @@ -10,6 +10,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: true - name: Set reusable strings id: strings @@ -40,7 +42,7 @@ jobs: CMAKE_BUILD_TYPE: Debug run: > cmake -GNinja -B ${{ steps.strings.outputs.build-output-dir }} - -DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DBUILD_TESTING=1 + -DWITH_WARNINGS=1 -DWITH_WARNINGS_AS_ERRORS=0 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DBUILD_TESTING=1 -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -S ${{ github.workspace }} diff --git a/.github/workflows/win-x64-build.yml b/.github/workflows/win-x64-build.yml index eae7d68983633..da07835ae9322 100644 --- a/.github/workflows/win-x64-build.yml +++ b/.github/workflows/win-x64-build.yml @@ -13,6 +13,8 @@ jobs: OPENSSL_ROOT_DIR: C:/libs/openssl steps: - uses: actions/checkout@v4 + with: + submodules: true - name: Set reusable strings id: strings @@ -73,12 +75,12 @@ jobs: env: BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} run: > - cmake -GNinja -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }} - -DWITH_WARNINGS_AS_ERRORS=ON -DTOOLS=ON + cmake -S ${{ github.workspace }} -B ${{ steps.strings.outputs.build-output-dir }} + -DWITH_WARNINGS_AS_ERRORS=OFF -DTOOLS=ON - name: Build run: | - cmake --build ${{ steps.strings.outputs.build-output-dir }} + cmake --build ${{ steps.strings.outputs.build-output-dir }} --config RelWithDebInfo - name: Copy Dependencies run: |