diff --git a/.github/workflows/core-build-nopch.yml b/.github/workflows/core-build-nopch.yml index 98eb1f207..e72e9c16b 100644 --- a/.github/workflows/core-build-nopch.yml +++ b/.github/workflows/core-build-nopch.yml @@ -1,8 +1,10 @@ name: nopch-build + on: push: branches: - 'master' + - 'test-staging' pull_request: types: - opened @@ -51,4 +53,4 @@ jobs: with: CC: ${{ matrix.compiler.CC }} CXX: ${{ matrix.compiler.CXX }} - pch: false + pch: false \ No newline at end of file diff --git a/.github/workflows/core-build-pch.yml b/.github/workflows/core-build-pch.yml index ad07eaf28..08bfee8a1 100644 --- a/.github/workflows/core-build-pch.yml +++ b/.github/workflows/core-build-pch.yml @@ -1,8 +1,10 @@ name: pch-build + on: push: branches: - 'master' + - 'test-staging' pull_request: types: - opened @@ -49,4 +51,4 @@ jobs: with: CC: ${{ matrix.compiler.CC }} CXX: ${{ matrix.compiler.CXX }} - pch: true + pch: true \ No newline at end of file diff --git a/.github/workflows/core-build-playerbots.yml b/.github/workflows/core-build-playerbots.yml index 0d7bf98f7..efb81f9a4 100644 --- a/.github/workflows/core-build-playerbots.yml +++ b/.github/workflows/core-build-playerbots.yml @@ -4,17 +4,15 @@ name: ubuntu-build on: push: - branches: [ "Playerbot" ] + branches: [ "Playerbot", "test-staging" ] pull_request: - branches: [ "Playerbot" ] + branches: [ "Playerbot", "test-staging" ] jobs: build: strategy: - # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. fail-fast: false matrix: - # the result of the matrix will be the combination of all attributes, so we get os*compiler builds include: - os: ubuntu-22.04 c_compiler: clang @@ -37,51 +35,22 @@ jobs: uses: actions/checkout@v3 - name: Set reusable strings - # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. id: strings shell: bash run: | echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - # - name: Clone Playerbot Module - # run: git clone --depth=1 --branch=master https://github.com/mod-playerbots/mod-playerbots.git modules/mod-playerbots - name: Checkout Playerbot Module uses: actions/checkout@v3 with: - repository: 'mod-playerbots/mod-playerbots' - #ref: 'feature/core_update_10_2025' #used on core merge conflicts builds - path: 'modules/mod-playerbots' + repository: mod-playerbots/mod-playerbots + ref: ${{ (github.head_ref || github.ref_name) == 'test-staging' && 'staging' || 'master' }} + path: modules/mod-playerbots - name: Install Requirements - run: sudo apt-get update && sudo apt-get install git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev - - # - name: Cache - # uses: actions/cache@v3 - # with: - # path: var/ccache - # key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}:${{ github.sha }} - # restore-keys: | - # ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }} - # ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules - - # - name: Configure OS - # run: source ./acore.sh install-deps - # env: - # CONTINUOUS_INTEGRATION: true - - # - name: Create conf/config.sh - # run: source ./apps/ci/ci-conf-core.sh - - # - name: Process pending sql - # run: bash bin/acore-db-pendings - - # - name: Build - # run: source ./apps/ci/ci-compile.sh + run: sudo apt-get update && sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev mysql-server libboost-all-dev - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > cmake -B ${{ steps.strings.outputs.build-output-dir }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} @@ -90,11 +59,4 @@ jobs: -S ${{ github.workspace }} - name: Build - # Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} - - # - name: Test - # working-directory: ${{ steps.strings.outputs.build-output-dir }} - # # Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator). - # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - # run: ctest --build-config ${{ matrix.build_type }} + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} \ No newline at end of file diff --git a/.github/workflows/core-build.yml b/.github/workflows/core-build.yml index 7f1c06572..944db6b45 100644 --- a/.github/workflows/core-build.yml +++ b/.github/workflows/core-build.yml @@ -4,9 +4,9 @@ name: ubuntu-build on: push: - branches: [ "Playerbot" ] + branches: [ "Playerbot", "test-staging" ] pull_request: - branches: [ "Playerbot" ] + branches: [ "Playerbot", "test-staging" ] jobs: build: diff --git a/.github/workflows/core_modules_build.yml b/.github/workflows/core_modules_build.yml index 3d1943344..5d4d0c1dc 100644 --- a/.github/workflows/core_modules_build.yml +++ b/.github/workflows/core_modules_build.yml @@ -3,6 +3,7 @@ on: push: branches: - 'master' + - 'test-staging' pull_request: types: - opened diff --git a/.github/workflows/dashboard-ci.yml b/.github/workflows/dashboard-ci.yml index 9bd89eced..3bfda278c 100644 --- a/.github/workflows/dashboard-ci.yml +++ b/.github/workflows/dashboard-ci.yml @@ -8,6 +8,7 @@ on: push: branches: - 'master' + - 'test-staging' pull_request: types: - opened diff --git a/.github/workflows/import_pending.yml b/.github/workflows/import_pending.yml index 7b21193b8..3cdb8c230 100644 --- a/.github/workflows/import_pending.yml +++ b/.github/workflows/import_pending.yml @@ -3,47 +3,41 @@ on: push: branches: - master + - test-staging # add this if you want pending SQL imported on this branch too jobs: import-pending: strategy: fail-fast: false runs-on: ubuntu-24.04 - permissions: write-all + permissions: + contents: write # 'write-all' is not a valid permission, should specify what is needed if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft steps: - uses: actions/checkout@v4 with: persist-credentials: false - # If we're fetching all the history in a later step it makes sense to - # pre-load it now fetch-depth: 0 ref: ${{ github.ref_name }} - uses: denoland/setup-deno@v1 with: - # Specifies latest 1.x deno-version: "~1.0" - name: Import and commit pending sql run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" - # Get the latest changes from git git pull --rebase origin "${{ github.ref_name }}" bash bin/acore-db-pendings deno run --allow-all --unstable apps/ci/ci-pending-changelogs.ts git add -A . git commit -am "chore(DB): import pending files" -m "Referenced commit(s): ${GITHUB_SHA}" || true env: - # Noting that the branch name can only be master, as per the event - # triggering this action BRANCH: ${{ github.ref_name }} - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.AC_GITHUB_TOKEN }} - # Noting that the branch name can only be master, as per the event - # triggering this action - branch: ${{ github.ref_name }} + branch: ${{ github.ref_name }} \ No newline at end of file diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 03974bca6..2bcdbe89f 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -1,12 +1,16 @@ name: macos-build on: push: - branches: [ "Playerbot" ] + branches: + - "Playerbot" + - "test-staging" # added pull_request: - branches: [ "Playerbot" ] + branches: + - "Playerbot" + - "test-staging" # added concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref_name }}, ${{ github.workflow }}) + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: @@ -43,4 +47,4 @@ jobs: run: source ./apps/ci/mac/ci-compile.sh - name: ccache stats shell: bash - run: ccache -s || true + run: ccache -s || true \ No newline at end of file diff --git a/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index d5d095511..857e3c4ee 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -1,9 +1,10 @@ name: windows-build + on: push: - branches: [ "Playerbot" ] + branches: [ "Playerbot", "test-staging" ] pull_request: - branches: [ "Playerbot" ] + branches: [ "Playerbot", "test-staging" ] concurrency: # One concurrency group per workflow + ref. @@ -28,14 +29,17 @@ jobs: BOOST_ROOT: C:\local\boost_1_82_0 steps: - uses: actions/checkout@v4 + - name: ccache uses: hendrikmuhs/ccache-action@v1.2.13 + - name: Configure OS shell: bash env: CONTINUOUS_INTEGRATION: true run: | ./acore.sh install-deps + - name: Build shell: bash run: |