Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Change CI to GitHub Actions
Browse files Browse the repository at this point in the history
-Remove CircleCI and Jenkins files
-Add Windows and Ubuntu build on push actions
-Update build status badge in Readme
-Move PR and Issue templates to new folder
-Add auto merge and after build script
  • Loading branch information
Niam5 committed Dec 22, 2023
1 parent 1b039ed commit 2752faf
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 295 deletions.
162 changes: 0 additions & 162 deletions .circleci/config.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: automerge

on:
schedule:
- cron: '0 0 * * *'

jobs:
merge:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
fetch-depth: 0
- name: Merge TCPP
run: |
git status
git config user.email "[email protected]" && git config user.name "Niam5"
git remote add Cata https://github.com/The-Cataclysm-Preservation-Project/TrinityCore.git
git fetch Cata master
git merge -m "Merge TheCataclysmPreservationProject to ElunaCataPreservation [skip ci]" Cata/master
git status
- name: Dependencies
run: |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev
- name: Setup
run: |
mkdir bin
cd bin
cmake ../ -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DELUNA=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -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
./bnetserver --version
./worldserver --version
- name: Push changes
run: |
git push --force
19 changes: 12 additions & 7 deletions .github/workflows/gcc-build.yml → .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
name: GCC
name: Ubuntu build

on:
push:
pull_request:
on: [push]

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true

- name: Dependencies
run: |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
- name: Setup
run: |
mkdir bin
cd bin
cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=static -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
cmake ../ -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DELUNA=1 -DTOOLS=1 -DSCRIPTS=static -DSERVERS=1 -DNOJEM=0 -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
./bnetserver --version
./worldserver --version
./worldserver --version
71 changes: 71 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Windows build

on: [push]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
REPO_DIR : ${{github.workspace}}
BUILD_DIR: ${{github.workspace}}/bin/builddir
BOOST_TOOLSET: "msvc"
BOOST_VERSION: "1.79.0"
BOOST_PLATFORM_VERSION: "2022"

jobs:
build:
runs-on: windows-2022
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{env.REPO_DIR}}
submodules: true

- name: Create Build Environment
run: |
echo "ARCHIVE_FILENAME=${{ github.event.repository.name }}-$(git rev-parse --short HEAD).zip" >> $env:GITHUB_ENV
cmake -E make_directory ${{ env.BUILD_DIR }}
# install dependencies
- name: Install boost
uses: MarkusJx/[email protected]
id: install-boost
with:
# REQUIRED: Specify the required boost version
# A list of supported versions can be found here:
# https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json
boost_version: ${{env.BOOST_VERSION}}
# OPTIONAL: Specify a platform version
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
# OPTIONAL: Specify a toolset
toolset: ${{env.BOOST_TOOLSET}}
# NOTE: If a boost version matching all requirements cannot be found,
# this build step will fail

- name: Install OpenSSL
run: |
choco install openssl
- name: Configure
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
run: cmake -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DELUNA=1 -DSCRIPTS=static -DSERVERS=1 -B ${{env.BUILD_DIR}} -S ${{env.REPO_DIR}}

- name: Build
env:
MAKEFLAGS: "-j8"
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}}

- name: Archive files
run: |
cd ${{env.BUILD_DIR}}/bin
7z a -tzip ${{env.ARCHIVE_FILENAME}} RelWithDebInfo
- name: Archive this artifact
uses: actions/upload-artifact@v3
with:
name: snapshot
path: "${{env.BUILD_DIR}}/bin/${{env.ARCHIVE_FILENAME}}"
66 changes: 0 additions & 66 deletions Jenkinsfile

This file was deleted.

Loading

0 comments on commit 2752faf

Please sign in to comment.