diff --git a/.github/workflows/check_pending_sql.yml b/.github/workflows/check_pending_sql.yml deleted file mode 100644 index 52ea18acb2a457..00000000000000 --- a/.github/workflows/check_pending_sql.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Check pending SQL -on: - pull_request: - -jobs: - check-pending-sql: - runs-on: ubuntu-latest - if: github.repository == 'azerothcore/azerothcore-wotlk' - steps: - - uses: actions/checkout@v4 - - name: Check pending SQL - run: source ./apps/ci/ci-pending.sh diff --git a/.github/workflows/core_matrix_build.yml b/.github/workflows/core-build-nopch.yml similarity index 72% rename from .github/workflows/core_matrix_build.yml rename to .github/workflows/core-build-nopch.yml index 76ae747e31dffe..1c6d7c2bd03b8e 100644 --- a/.github/workflows/core_matrix_build.yml +++ b/.github/workflows/core-build-nopch.yml @@ -1,10 +1,9 @@ -name: core +name: main-nopch on: push: branches: - 'master' pull_request: - types: ['labeled', 'opened', 'synchronize', 'reopened'] concurrency: group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) @@ -16,29 +15,15 @@ jobs: 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-20.04 compiler: clang12 - - os: ubuntu-20.04 - compiler: clang11 - - os: ubuntu-20.04 - compiler: gcc # default in 20.04 is gcc 9 - os: ubuntu-20.04 compiler: gcc10 runs-on: ${{ matrix.os }} name: ${{ matrix.os }}-${{ matrix.compiler }} env: COMPILER: ${{ matrix.compiler }} - if: | - github.repository == 'azerothcore/azerothcore-wotlk' - && !github.event.pull_request.draft - && ( - github.ref == 'refs/heads/master' - || contains(github.event.pull_request.labels.*.name, 'file-cpp' - || github.event.label.name == 'file-cpp' - || contains(github.event.pull_request.labels.*.name, 'run-build') - || github.event.label.name == 'run-build') - ) + if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft steps: - uses: actions/checkout@v4 - name: Cache diff --git a/.github/workflows/core_build.yml b/.github/workflows/core-build-pch.yml similarity index 92% rename from .github/workflows/core_build.yml rename to .github/workflows/core-build-pch.yml index c64f7178dcee28..0bc233ff6f4ddc 100644 --- a/.github/workflows/core_build.yml +++ b/.github/workflows/core-build-pch.yml @@ -1,4 +1,4 @@ -name: main +name: main-pch on: push: branches: @@ -15,8 +15,8 @@ jobs: fail-fast: false matrix: # the result of the matrix will be the combination of all attributes, so we get os*compiler builds - os: [ubuntu-20.04] - compiler: [clang] + - os: ubuntu-20.04 + compiler: clang12 runs-on: ${{ matrix.os }} name: ${{ matrix.os }}-${{ matrix.compiler }} env: @@ -37,7 +37,7 @@ jobs: env: CONTINUOUS_INTEGRATION: true - name: Create conf/config.sh - run: source ./apps/ci/ci-conf-core.sh + run: source ./apps/ci/ci-conf-core-pch.sh - name: Process pending sql run: bash bin/acore-db-pendings - name: Build diff --git a/.github/workflows/core_modules_build.yml b/.github/workflows/core_modules_build.yml index 586edcfa478cae..a465e589f516eb 100644 --- a/.github/workflows/core_modules_build.yml +++ b/.github/workflows/core_modules_build.yml @@ -28,8 +28,6 @@ jobs: && !github.event.pull_request.draft && ( github.ref == 'refs/heads/master' - || contains(github.event.pull_request.labels.*.name, 'file-cpp' - || github.event.label.name == 'file-cpp' || contains(github.event.pull_request.labels.*.name, 'run-build') || github.event.label.name == 'run-build') ) @@ -56,9 +54,3 @@ jobs: run: bash bin/acore-db-pendings - name: Build run: source ./apps/ci/ci-compile.sh - - name: Dry run - run: source ./apps/ci/ci-dry-run.sh worldserver - - name: Check startup errors - run: source ./apps/ci/ci-error-check.sh - - name: Run unit tests - run: source ./apps/ci/ci-run-unit-tests.sh diff --git a/.github/workflows/build_dbimport.yml b/.github/workflows/db-sql.yml similarity index 94% rename from .github/workflows/build_dbimport.yml rename to .github/workflows/db-sql.yml index ecc4068d158f9a..10ec100fed9df9 100644 --- a/.github/workflows/build_dbimport.yml +++ b/.github/workflows/db-sql.yml @@ -1,4 +1,4 @@ -name: build-db +name: db-sql on: push: branches: @@ -24,6 +24,8 @@ jobs: if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft steps: - uses: actions/checkout@v4 + - name: Check pending SQL + run: source ./apps/ci/ci-pending.sh - name: Cache uses: actions/cache@v3 env: diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 46e3a961812cc9..4cfa8eb9d8180e 100644 --- a/.github/workflows/macos_build.yml +++ b/.github/workflows/macos_build.yml @@ -16,7 +16,6 @@ jobs: fail-fast: false matrix: os: - - macos-11 - macos-12 runs-on: ${{ matrix.os }} name: ${{ matrix.os }} diff --git a/.github/workflows/tools_build.yml b/.github/workflows/tools_build.yml index 6044cc03626db8..51091736d55132 100644 --- a/.github/workflows/tools_build.yml +++ b/.github/workflows/tools_build.yml @@ -21,7 +21,12 @@ jobs: name: ${{ matrix.os }}-${{ matrix.compiler }} env: COMPILER: ${{ matrix.compiler }} - if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft + if: | + github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft + && ( + contains(github.event.pull_request.labels.*.name, 'run-build') + || github.event.label.name == 'run-build') + ) steps: - uses: actions/checkout@v4 - name: Cache diff --git a/apps/ci/ci-conf-core-pch.sh b/apps/ci/ci-conf-core-pch.sh new file mode 100644 index 00000000000000..106b3e0becdfb9 --- /dev/null +++ b/apps/ci/ci-conf-core-pch.sh @@ -0,0 +1,69 @@ +#!/bin/bash + +set -e + +cat >>conf/config.sh <> ./conf/config.sh + echo "CCOMPILERCXX=\"g++\"" >> ./conf/config.sh + ;; + + "gcc8" ) + time sudo apt-get install -y gcc-8 g++-8 + echo "CCOMPILERC=\"gcc-8\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"g++-8\"" >> ./conf/config.sh + ;; + + "gcc10" ) + time sudo apt-get install -y gcc-10 g++-10 + echo "CCOMPILERC=\"gcc-10\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"g++-10\"" >> ./conf/config.sh + ;; + + # this is in order to use the "default" clang version of the OS, without forcing a specific version + "clang" ) + time sudo apt-get install -y clang + echo "CCOMPILERC=\"clang\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"clang++\"" >> ./conf/config.sh + ;; + + "clang10" ) + time sudo apt-get install -y clang-10 + echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh + ;; + + "clang11" ) + time sudo apt-get install -y clang-11 + echo "CCOMPILERC=\"clang-11\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"clang++-11\"" >> ./conf/config.sh + ;; + + "clang12" ) + time sudo apt-get install -y clang-12 + echo "CCOMPILERC=\"clang-12\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"clang++-12\"" >> ./conf/config.sh + ;; + + * ) + echo "Unknown compiler $COMPILER" + exit 1 + ;; +esac