From 4a25ac665de88f6944cc5f2df6d0a5a043866113 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sun, 26 Nov 2023 17:27:40 +0100 Subject: chore(CI): Make some changes (#17861) * chore(CI): Make some changes. Less CI's maybe better... * pendingsql * FORK TEST - TO BE REVERTED * changes * test * fix * Revert "FORK TEST - TO BE REVERTED" This reverts commit 875bc281c5a355cce2ddd8015484e256dbc185cf. * rename workflow * rename workflow * rename workflow * rename workflow * I argue windows don't need dry runs * maybe mac wants to be alive. who knows. When do we drop mac support really...? --- .github/workflows/build_dbimport.yml | 49 ----------------------- .github/workflows/check_pending_sql.yml | 12 ------ .github/workflows/codestyle.yml | 5 +-- .github/workflows/core-build-nopch.yml | 56 ++++++++++++++++++++++++++ .github/workflows/core-build-pch.yml | 54 +++++++++++++++++++++++++ .github/workflows/core_build.yml | 52 ------------------------ .github/workflows/core_matrix_build.yml | 69 -------------------------------- .github/workflows/core_modules_build.yml | 8 ---- .github/workflows/cpp-check.yml | 7 ---- .github/workflows/macos_build.yml | 3 -- .github/workflows/sql-codestyle.yml | 11 +++++ .github/workflows/tools_build.yml | 7 +++- .github/workflows/windows_build.yml | 21 ---------- 13 files changed, 129 insertions(+), 225 deletions(-) delete mode 100644 .github/workflows/build_dbimport.yml delete mode 100644 .github/workflows/check_pending_sql.yml create mode 100644 .github/workflows/core-build-nopch.yml create mode 100644 .github/workflows/core-build-pch.yml delete mode 100644 .github/workflows/core_build.yml delete mode 100644 .github/workflows/core_matrix_build.yml create mode 100644 .github/workflows/sql-codestyle.yml (limited to '.github') diff --git a/.github/workflows/build_dbimport.yml b/.github/workflows/build_dbimport.yml deleted file mode 100644 index ecc4068d15..0000000000 --- a/.github/workflows/build_dbimport.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: build-db -on: - push: - branches: - - 'master' # only default branch - pull_request: - -concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) - cancel-in-progress: true - -jobs: - build: - strategy: - fail-fast: false - matrix: - # the result of the matrix will be the combination of all attributes, so we get os*compiler*modules builds - os: [ubuntu-20.04] - compiler: [clang] - runs-on: ${{ matrix.os }} - name: ${{ matrix.compiler }} - env: - COMPILER: ${{ matrix.compiler }} - if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft - steps: - - uses: actions/checkout@v4 - - name: Cache - uses: actions/cache@v3 - env: - cache-name: cache-db - with: - path: var/ccache - key: ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.ref }}-${{ github.sha }} - restore-keys: | - ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}-${{ github.ref }}- - ${{ env.cache-name }}-${{ matrix.os }}-${{ matrix.compiler }}- - ${{ env.cache-name }}-${{ matrix.os }}- - - name: Configure OS - run: source ./acore.sh install-deps - env: - CONTINUOUS_INTEGRATION: true - - name: Create conf/config.sh - run: source ./apps/ci/ci-conf-db.sh - - name: Build - run: source ./apps/ci/ci-compile.sh - - name: Process pending sql - run: bash bin/acore-db-pendings - - name: Dry run - run: source ./apps/ci/ci-dry-run.sh dbimport diff --git a/.github/workflows/check_pending_sql.yml b/.github/workflows/check_pending_sql.yml deleted file mode 100644 index 52ea18acb2..0000000000 --- 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/codestyle.yml b/.github/workflows/codestyle.yml index acce90c0dd..e56b1de2bb 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -1,16 +1,15 @@ -name: check-codestyle +name: Codestyle on: pull_request: jobs: - check-codestyle: + triage: strategy: fail-fast: false matrix: os: [ubuntu-20.04] runs-on: ${{ matrix.os }} if: github.repository == 'azerothcore/azerothcore-wotlk' - name: check codestyle steps: - uses: actions/checkout@v4 - name: Check core codestyle diff --git a/.github/workflows/core-build-nopch.yml b/.github/workflows/core-build-nopch.yml new file mode 100644 index 0000000000..cff8820def --- /dev/null +++ b/.github/workflows/core-build-nopch.yml @@ -0,0 +1,56 @@ +name: nopch-build +on: + push: + branches: + - 'master' + pull_request: + types: ['labeled', 'opened', 'synchronize', 'reopened'] + +concurrency: + group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) + cancel-in-progress: true + +jobs: + build: + strategy: + 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: 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 + steps: + - uses: actions/checkout@v4 + - name: Cache + uses: actions/cache@v3 + with: + path: var/ccache + key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}:${{ github.sha }} + restore-keys: | + ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }} + ccache:${{ matrix.os }}:${{ matrix.compiler }} + - 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 + - name: Dry run authserver + run: source ./apps/ci/ci-dry-run.sh authserver + - name: Dry run worldserver + 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/core-build-pch.yml b/.github/workflows/core-build-pch.yml new file mode 100644 index 0000000000..75862f0ffd --- /dev/null +++ b/.github/workflows/core-build-pch.yml @@ -0,0 +1,54 @@ +name: pch-build +on: + push: + branches: + - 'master' + pull_request: + types: ['labeled', 'opened', 'synchronize', 'reopened'] + +concurrency: + group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) + cancel-in-progress: true + +jobs: + build: + strategy: + 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 + runs-on: ${{ matrix.os }} + name: ${{ matrix.os }}-${{ matrix.compiler }} + env: + COMPILER: ${{ matrix.compiler }} + if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft + steps: + - uses: actions/checkout@v4 + - name: Cache + uses: actions/cache@v3 + with: + path: var/ccache + key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}:${{ github.sha }} + restore-keys: | + ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }} + ccache:${{ matrix.os }}:${{ matrix.compiler }} + - 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-pch.sh + - name: Process pending sql + run: bash bin/acore-db-pendings + - name: Build + run: source ./apps/ci/ci-compile.sh + - name: Dry run authserver + run: source ./apps/ci/ci-dry-run.sh authserver + - name: Dry run worldserver + 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/core_build.yml b/.github/workflows/core_build.yml deleted file mode 100644 index c64f7178dc..0000000000 --- a/.github/workflows/core_build.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: main -on: - push: - branches: - - 'master' - pull_request: - -concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) - cancel-in-progress: true - -jobs: - build: - strategy: - 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] - runs-on: ${{ matrix.os }} - name: ${{ matrix.os }}-${{ matrix.compiler }} - env: - COMPILER: ${{ matrix.compiler }} - if: github.repository == 'azerothcore/azerothcore-wotlk' && !github.event.pull_request.draft - steps: - - uses: actions/checkout@v4 - - name: Cache - uses: actions/cache@v3 - with: - path: var/ccache - key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}:${{ github.sha }} - restore-keys: | - ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }} - ccache:${{ matrix.os }}:${{ matrix.compiler }} - - 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 - - name: Dry run authserver - run: source ./apps/ci/ci-dry-run.sh authserver - - name: Dry run worldserver - 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/core_matrix_build.yml b/.github/workflows/core_matrix_build.yml deleted file mode 100644 index 76ae747e31..0000000000 --- a/.github/workflows/core_matrix_build.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: core -on: - push: - branches: - - 'master' - pull_request: - types: ['labeled', 'opened', 'synchronize', 'reopened'] - -concurrency: - group: ${{ github.head_ref }} || concat(${{ github.ref }}, ${{ github.workflow }}) - cancel-in-progress: true - -jobs: - build: - strategy: - 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') - ) - steps: - - uses: actions/checkout@v4 - - name: Cache - uses: actions/cache@v3 - with: - path: var/ccache - key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }}:${{ github.sha }} - restore-keys: | - ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ github.ref }} - ccache:${{ matrix.os }}:${{ matrix.compiler }} - - 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 - - name: Dry run authserver - run: source ./apps/ci/ci-dry-run.sh authserver - - name: Dry run worldserver - 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/core_modules_build.yml b/.github/workflows/core_modules_build.yml index 586edcfa47..a465e589f5 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/cpp-check.yml b/.github/workflows/cpp-check.yml index ea1f7adbb3..1b1a0ff28d 100644 --- a/.github/workflows/cpp-check.yml +++ b/.github/workflows/cpp-check.yml @@ -1,12 +1,5 @@ name: cpp-check on: - push: - branches: - - "master" - paths: - - src/** - - "!README.md" - - "!docs/**" pull_request: paths: - src/** diff --git a/.github/workflows/macos_build.yml b/.github/workflows/macos_build.yml index 46e3a96181..2e756dc1b8 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 }} @@ -40,5 +39,3 @@ jobs: run: source ./acore.sh install-deps - name: Build run: source ./apps/ci/mac/ci-compile.sh - - name: Run unit tests - run: source ./apps/ci/ci-run-unit-tests.sh diff --git a/.github/workflows/sql-codestyle.yml b/.github/workflows/sql-codestyle.yml new file mode 100644 index 0000000000..9149fbb698 --- /dev/null +++ b/.github/workflows/sql-codestyle.yml @@ -0,0 +1,11 @@ +name: SQL Codestyle +on: + pull_request: +jobs: + triage: + 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/tools_build.yml b/.github/workflows/tools_build.yml index 6044cc0362..51091736d5 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/.github/workflows/windows_build.yml b/.github/workflows/windows_build.yml index 76d78e7e0a..61a3862ca9 100644 --- a/.github/workflows/windows_build.yml +++ b/.github/workflows/windows_build.yml @@ -34,29 +34,8 @@ jobs: CONTINUOUS_INTEGRATION: true run: | ./acore.sh install-deps - - name: Process pending sql - shell: bash - run: bash bin/acore-db-pendings - name: Build shell: bash run: | export CTOOLS_BUILD=all ./acore.sh compiler build - - name: Copy dll files - shell: bash - run: | - cp "/c/Program Files/OpenSSL/bin/legacy.dll" "env/dist" - - name: Dry run authserver - shell: bash - run: | - source ./apps/ci/ci-gen-server-conf-files.sh "authserver" "configs" "." - cd env/dist - ./authserver -dry-run - - name: Dry run worldserver - shell: bash - run: | - source ./apps/ci/ci-gen-server-conf-files.sh "worldserver" "configs" "." - cd env/dist - ./worldserver -dry-run - - name: Stop MySQL - run: net stop mysql -- cgit v1.2.3